summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.tests/arch/arch.pro1
-rw-r--r--config.tests/arch/arch_host.pro2
-rwxr-xr-xconfig.tests/unix/arch.test12
-rwxr-xr-xconfigure4
4 files changed, 15 insertions, 4 deletions
diff --git a/config.tests/arch/arch.pro b/config.tests/arch/arch.pro
index c6801264b4..fda4acc601 100644
--- a/config.tests/arch/arch.pro
+++ b/config.tests/arch/arch.pro
@@ -1,3 +1,4 @@
+TARGET = arch
SOURCES = arch.cpp
CONFIG -= qt dylib release debug_and_release
CONFIG += debug console
diff --git a/config.tests/arch/arch_host.pro b/config.tests/arch/arch_host.pro
new file mode 100644
index 0000000000..f7acef0c5d
--- /dev/null
+++ b/config.tests/arch/arch_host.pro
@@ -0,0 +1,2 @@
+option(host_build)
+include(arch.pro)
diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test
index dacdcda8bf..f25076600c 100755
--- a/config.tests/unix/arch.test
+++ b/config.tests/unix/arch.test
@@ -5,9 +5,17 @@ VERBOSE=$2
SRCDIR=$3
OUTDIR=$4
RESULTFILE=$5
-VARPREFIX=$6
+TARGET=$6
shift 6
+if [ "$TARGET" = "host" ]; then
+ VARPREFIX="CFG_HOST"
+ PROSUFFIX="_host"
+else
+ VARPREFIX="CFG"
+ PROSUFFIX=""
+fi
+
LFLAGS="$SYSROOT_FLAG"
CXXFLAGS="$SYSROOT_FLAG"
@@ -32,7 +40,7 @@ done
test -d "$OUTDIR/config.tests/arch" || mkdir -p "$OUTDIR/config.tests/arch"
cd "$OUTDIR/config.tests/arch"
[ -f Makefile ] && $MAKE distclean >/dev/null 2>&1
-OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "$SRCDIR/config.tests/arch/arch.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2
+OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2
ARCH=""
diff --git a/configure b/configure
index 39e436d57c..47640b1026 100755
--- a/configure
+++ b/configure
@@ -3824,7 +3824,7 @@ compileTest()
# Use config.tests/arch/arch.pro to have the compiler tell us what the target architecture is
OUTFILE=$outpath/arch.result
-"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG" $MAC_SDK_FLAG
+"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target" $MAC_SDK_FLAG
if [ $? -eq 0 ]; then
eval `cat "$OUTFILE"`
else
@@ -3837,7 +3837,7 @@ rm -f "$OUTFILE" 2>/dev/null
if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
# Do the same test again, using the host compiler
- SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG_HOST"
+ SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host"
if [ $? -eq 0 ]; then
eval `cat "$OUTFILE"`
else