From: Hans Kristian Rosbach Date: Thu, 6 Dec 2018 11:58:17 +0000 (+0100) Subject: - Fix string concatenation failing in configure, causing it to compile without optimi... X-Git-Tag: 1.9.9-b1~602 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b25ae47e3f49d2fa6fe3d1a74b44bf1e658c3ca0;p=thirdparty%2Fzlib-ng.git - Fix string concatenation failing in configure, causing it to compile without optimizations by default. - Change default optimization level in configure to -O2, same as in cmake. - Remove unused variable "cflags". --- diff --git a/configure b/configure index cb7e27d6b..bcffbd6e2 100755 --- a/configure +++ b/configure @@ -214,7 +214,6 @@ EOF test -z "$CC" && echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log cc=${CC-${CROSS_PREFIX}gcc} -cflags=${CFLAGS-"-O3"} case "$cc" in *gcc*) gcc=1 ;; *clang*) gcc=1 ;; @@ -314,13 +313,13 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then ARCH=native fi ;; esac - CFLAGS="${CFLAGS--O3}" + CFLAGS="${CFLAGS} -O2" if test -n "${ARCHS}"; then CFLAGS="${CFLAGS} ${ARCHS}" LDFLAGS="${LDFLAGS} ${ARCHS}" fi CFLAGS="${CFLAGS} -Wall" - SFLAGS="${CFLAGS--O3} -fPIC" + SFLAGS="${CFLAGS} -O2 -fPIC" if test $native -eq 1; then CFLAGS="${CFLAGS} -march=native" SFLAGS="${SFLAGS} -march=native"