From: notaz Date: Fri, 7 Jul 2023 18:27:15 +0000 (+0300) Subject: make: try a different way to detect 32bit neon X-Git-Tag: r24l~328 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=657d141e82b111e6719f499677e035cb443df537;hp=70ffca2435f9ba00c5c9173b3fd2cd0236b1f97b;p=pcsx_rearmed.git make: try a different way to detect 32bit neon --- diff --git a/Makefile.libretro b/Makefile.libretro index bd26d00f..cf8e0807 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -530,7 +530,7 @@ ARCH = $(ARCH_DETECTED) endif ifndef HAVE_NEON_ASM # asm for 32bit only -HAVE_NEON_ASM = $(shell $(CC) -E -dD $(CFLAGS) - < /dev/null 2> /dev/null | grep -q __ARM_NEON__ && echo 1 || echo 0) +HAVE_NEON_ASM = $(shell $(CC) -E -dD $(CFLAGS) include/arm_features.h | grep -q HAVE_NEON32 && echo 1 || echo 0) endif ifeq ($(NO_UNDEF_CHECK)$(shell ld -v 2> /dev/null | awk '{print $$1}'),GNU) MAIN_LDFLAGS += -Wl,--no-undefined diff --git a/include/arm_features.h b/include/arm_features.h index 7c82ff38..4f216a3c 100644 --- a/include/arm_features.h +++ b/include/arm_features.h @@ -47,7 +47,10 @@ #endif -/* no need for HAVE_NEON - GCC defines __ARM_NEON__ consistently */ +/* gcc defines __ARM_NEON__ consistently for 32bit, but apple clang defines it for 64bit also... */ +#if defined(HAVE_ARMV7) && defined(__ARM_NEON__) +#define HAVE_NEON32 +#endif /* global function/external symbol */ #ifndef __MACH__