From: Hans Kristian Rosbach Date: Wed, 12 Dec 2018 14:25:56 +0000 (+0100) Subject: Move "-O2" compiler flag before CFLAGS from environment, this ensures X-Git-Tag: 1.9.9-b1~595 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edb9fb1e3acc4ff82845518fd50cf51185c47ad7;p=thirdparty%2Fzlib-ng.git Move "-O2" compiler flag before CFLAGS from environment, this ensures CFLAGS can properly override the optimizer flag. --- diff --git a/configure b/configure index 61cde7841..22e7a6a1d 100755 --- 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"