]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Merge both without_optimizations sections in configure for arm.
authorNathan Moinvaziri <nathan@nathanm.com>
Tue, 29 Aug 2023 08:25:44 +0000 (01:25 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 13 Sep 2023 09:55:01 +0000 (11:55 +0200)
configure

index 52e72f51a1a05d4a1fdcb2a8c03827bd2a0b2dfd..b6339fbccb777f6d25330ca8c1483494c6e61131 100755 (executable)
--- a/configure
+++ b/configure
@@ -1564,6 +1564,28 @@ case "${ARCH}" in
 
         ARCHDIR=arch/arm
 
+        cat > $test.c << EOF
+int main() { return 0; }
+EOF
+        if try $CC -w -c $SFLAGS $test.c -mfloat-abi=softfp &&
+           try $LDSHARED $LDSHAREDFLAGS $LDFLAGS -o $test$shared_ext $test.o $LDSHAREDLIBC; then
+            floatabi="-mfloat-abi=softfp"
+        else
+            if try $CC -w -c $SFLAGS $test.c -mfloat-abi=hard &&
+               try $LDSHARED $LDSHAREDFLAGS $LDFLAGS -o $test$shared_ext $test.o $LDSHAREDLIBC; then
+                floatabi="-mfloat-abi=hard"
+            fi
+        fi
+
+        if [ -z $floatabi ]; then
+            echo "ARM floating point arch not auto-detected" | tee -a configure.log
+        else
+            echo "ARM floating point arch: ${floatabi}" | tee -a configure.log
+
+            CFLAGS="${CFLAGS} ${floatabi}"
+            SFLAGS="${SFLAGS} ${floatabi}"
+        fi
+
         if test $without_optimizations -eq 0; then
             CFLAGS="${CFLAGS} -DARM_FEATURES"
             SFLAGS="${SFLAGS} -DARM_FEATURES"
@@ -1637,31 +1659,7 @@ EOF
                     fi
                 fi
             fi
-        fi
-
-        cat > $test.c << EOF
-int main() { return 0; }
-EOF
-        if try $CC -w -c $SFLAGS $test.c -mfloat-abi=softfp &&
-           try $LDSHARED $LDSHAREDFLAGS $LDFLAGS -o $test$shared_ext $test.o $LDSHAREDLIBC; then
-            floatabi="-mfloat-abi=softfp"
-        else
-            if try $CC -w -c $SFLAGS $test.c -mfloat-abi=hard &&
-               try $LDSHARED $LDSHAREDFLAGS $LDFLAGS -o $test$shared_ext $test.o $LDSHAREDLIBC; then
-                floatabi="-mfloat-abi=hard"
-            fi
-        fi
-
-        if [ -z $floatabi ]; then
-            echo "ARM floating point arch not auto-detected" | tee -a configure.log
-        else
-            echo "ARM floating point arch: ${floatabi}" | tee -a configure.log
 
-            CFLAGS="${CFLAGS} ${floatabi}"
-            SFLAGS="${SFLAGS} ${floatabi}"
-        fi
-
-        if test $without_optimizations -eq 0; then
             if test $buildacle -eq 1; then
                 check_acle_compiler_flag