From: Nathan Moinvaziri Date: Tue, 29 Aug 2023 08:25:44 +0000 (-0700) Subject: Merge both without_optimizations sections in configure for arm. X-Git-Tag: 2.1.4~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=881aa3e60e9030912f3ee550ad57314db0ab9eb3;p=thirdparty%2Fzlib-ng.git Merge both without_optimizations sections in configure for arm. --- diff --git a/configure b/configure index 52e72f51a..b6339fbcc 100755 --- 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