From: Sebastian Pop Date: Fri, 8 Feb 2019 20:41:07 +0000 (-0600) Subject: fix auto-detection of cross compilation for bare-metal linaro compilers X-Git-Tag: 1.9.9-b1~525 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5480df526b5a19ee2fcfce93b8121d2cdfb70ef;p=thirdparty%2Fzlib-ng.git fix auto-detection of cross compilation for bare-metal linaro compilers --- diff --git a/configure b/configure index 81ab0402..c85421d6 100755 --- a/configure +++ b/configure @@ -268,7 +268,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then CFLAGS="${CFLAGS} -std=c99" # Re-check ARCH if the compiler is a cross-compiler. - if $CC -print-multiarch 1> /dev/null 2>&1; then + if $CC -print-multiarch && test -n "$($CC -print-multiarch)" 1> /dev/null 2>&1; then CC_ARCH=`$CC $CFLAGS -print-multiarch | sed 's/-.*//g'` else CC_ARCH=`$CC $CFLAGS -dumpmachine | sed 's/-.*//g'`