From: notaz Date: Sat, 23 Sep 2023 19:39:52 +0000 (+0300) Subject: log some build info X-Git-Tag: r24l~164 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=ead6fd751369f6fe50cb5092ab5530fbf1d66b67;p=pcsx_rearmed.git log some build info helpful for bug reports --- diff --git a/Makefile b/Makefile index 4429fa74..a083d528 100644 --- a/Makefile +++ b/Makefile @@ -376,7 +376,7 @@ endif # misc OBJS += frontend/main.o frontend/plugin.o - +frontend/main.o: CFLAGS += -DBUILTIN_GPU=$(BUILTIN_GPU) frontend/menu.o frontend/main.o: frontend/revision.h frontend/plat_sdl.o frontend/libretro.o: frontend/revision.h diff --git a/frontend/main.c b/frontend/main.c index 902acb75..e1141d6b 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -441,6 +441,49 @@ static void log_wrong_cpu(void) #endif // DO_CPU_CHECKS } +#define MKSTR2(x) #x +#define MKSTR(x) MKSTR2(x) +static const char *get_build_info(void) +{ + return " (" +#ifdef __VERSION__ + "cc " __VERSION__ " " +#endif +#if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 8 + "64bit " +#elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 4 + "32bit " +#endif +#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + "be " +#endif +#if defined(__PIC__) || defined(__pic__) + "pic " +#endif +#if defined(__aarch64__) + "arm64" +#elif defined(__arm__) + "arm" +#endif +#ifdef __ARM_ARCH + "v" MKSTR(__ARM_ARCH) " " +#endif +#if defined(__AVX__) + "avx " +#elif defined(__SSSE3__) + "ssse3 " +#elif defined(__ARM_NEON) || defined(__ARM_NEON__) + "neon " +#endif +#if defined(LIGHTREC) + "lightrec " +#elif !defined(DRC_DISABLE) + "ari64 " +#endif + "gpu=" MKSTR(BUILTIN_GPU) + ")"; +} + int emu_core_preinit(void) { // what is the name of the config file? @@ -470,7 +513,7 @@ int emu_core_preinit(void) int emu_core_init(void) { - SysPrintf("Starting PCSX-ReARMed " REV "\n"); + SysPrintf("Starting PCSX-ReARMed " REV "%s\n", get_build_info()); #ifndef NO_FRONTEND check_profile();