Closed undisputed-seraphim closed 1 year ago
Actually even it is not required
In my hobby project there is a variable like this. This works without config, which means they are defined by compiler itself.
const char *version_info_arch=
#if defined(__x86_64__)
#if defined(__ILP32__)
"x32"
#else
"amd64"
#endif
#elif defined(__i386__)
"i386"
#elif defined(__aarch64__)
"arm64"
#elif defined(__arm__)
"arm"
#elif defined(__sparc__)
"sparc"
#else
"other"
#endif
;
Yeah I think I will add a commit to remove it completely instead.
thanks
cmake: Use CMAKE_SYSTEM_PROCESSOR as a cross-compilation-compatible way to detect target architecture. Current cmake code breaks when trying to do cross-compilation.
(Not even sure if it is necessary, I grepped the code and no file uses the
__x86_64__
define, and one commented-out line uses theIS_X86_64
cmake variable. I secondarily propose that we remove it completely)UPDATE: Check for x86 has been removed.