From 4cc9523a3153a0e7b012de3919e0c4f4ccb96265 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 20 Mar 2012 21:01:20 -0700 Subject: Make architecture detection more robust. Any message/error in mkspecs or qmake feature files ends up confusing the current arch detection logic. Instead, search for "Project MESSAGE: .* Architecture: ". Change-Id: I308932a5b75f3a1fcbc4fe30c74faf2e83b2d752 Reviewed-by: Oswald Buddenhagen --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 1d03e14a79..6b2cca4aac 100755 --- a/configure +++ b/configure @@ -3933,11 +3933,12 @@ fi # Build qmake #------------------------------------------------------------------------------- # Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is -CFG_ARCH=`"$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -e "s,^Project MESSAGE: ,," -e "s,^#.*$,,g" | grep -v "^$"` +CFG_ARCH=`"$outpath/bin/qmake" -spec "$XQMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9]*\).*,\1,p'` + [ -z "$CFG_ARCH" ] && CFG_ARCH="unknown" if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then # Do the same test again, using the host compiler - CFG_HOST_ARCH=`"$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -e "s,^Project MESSAGE: ,," -e "s,^#.*$,,g" | grep -v "^$"` + CFG_HOST_ARCH=`"$outpath/bin/qmake" -spec "$QMAKESPEC" -o /dev/null "$relpath/config.tests/arch/arch.pro" 2>&1 | sed -n -e 's,^Project MESSAGE:.*Architecture: \([a-zA-Z0-9]*\).*,\1,p'` [ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown" else # not cross compiling, host == target -- cgit v1.2.3