From: Mika Lindqvist Date: Fri, 18 Feb 2022 06:27:18 +0000 (+0200) Subject: Don't use -march=native when doing LD4 test for ARM/AArch64. X-Git-Tag: 2.1.0-beta1~374 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=319755304904e9f65644d0e2f5504c123f68794e;p=thirdparty%2Fzlib-ng.git Don't use -march=native when doing LD4 test for ARM/AArch64. --- diff --git a/configure b/configure index 7c6b769b4..0ff33c34c 100755 --- a/configure +++ b/configure @@ -1170,6 +1170,13 @@ EOF } check_neon_ld4_intrinsics() { + if test $buildneon -eq 1 && test $native -eq 0; then + if test "$CC_ARCH" = "aarch64" || test "$CC_ARCH" = "aarch64_be"; then + neonflag="-march=armv8-a+simd" + elif test $MFPU_NEON_AVAILABLE -eq 1; then + neonflag="-mfpu=neon" + fi + fi cat > $test.c << EOF #ifdef _M_ARM64 # include @@ -1183,7 +1190,7 @@ int main(void) { return 0; } EOF - if try $CC -c $CFLAGS -march=native $test.c; then + if try $CC -c $CFLAGS $neonflag $test.c; then NEON_HAS_LD4=1 echo "check whether compiler supports 4 wide register loads ... Yes." | tee -a configure.log else