]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
fix auto-detection of cross compilation for bare-metal linaro compilers
authorSebastian Pop <s.pop@samsung.com>
Fri, 8 Feb 2019 20:41:07 +0000 (14:41 -0600)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 1 Mar 2019 10:36:12 +0000 (11:36 +0100)
configure

index 81ab0402fb3a02191d2ec73fca4cc367928821e4..c85421d69ed65f93f478017c0c0c7d26239a73f3 100755 (executable)
--- 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'`