]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Move "-O2" compiler flag before CFLAGS from environment, this ensures
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 12 Dec 2018 14:25:56 +0000 (15:25 +0100)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 12 Dec 2018 14:25:56 +0000 (15:25 +0100)
CFLAGS can properly override the optimizer flag.

configure

index 61cde7841d389b4ac40b45c243fed1970a9efd11..22e7a6a1d723bea56ea0b006aba969943b5bfbf7 100755 (executable)
--- a/configure
+++ b/configure
@@ -313,13 +313,13 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
         ARCH=native
       fi ;;
   esac
-  CFLAGS="${CFLAGS} -O2"
+  CFLAGS="-O2 ${CFLAGS}"
   if test -n "${ARCHS}"; then
     CFLAGS="${CFLAGS} ${ARCHS}"
     LDFLAGS="${LDFLAGS} ${ARCHS}"
   fi
   CFLAGS="${CFLAGS} -Wall"
-  SFLAGS="${CFLAGS} -O2 -fPIC"
+  SFLAGS="-O2 ${CFLAGS} -fPIC"
   if test $native -eq 1; then
     CFLAGS="${CFLAGS} -march=native"
     SFLAGS="${SFLAGS} -march=native"