diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-02-15 11:57:08 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-18 17:07:13 +0100 |
commit | a1000de2b48d1105fcfb1e6f7ead4fdd71479b6d (patch) | |
tree | 07f6b3d52e0a3aad89800ecc7abbf9bfbdc0d829 | |
parent | dfde72e4361d82a782cb4da08ddcd0d8e8c40b07 (diff) |
Ensure that arch.test for host runs with option(host_build)
So that mkspecs and features may rely on the host_build test.
Change-Id: I18fee4820d9e2904285afcc7ddb8f1cc3d025fef
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | config.tests/arch/arch.pro | 1 | ||||
-rw-r--r-- | config.tests/arch/arch_host.pro | 2 | ||||
-rwxr-xr-x | config.tests/unix/arch.test | 12 | ||||
-rwxr-xr-x | configure | 4 |
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="" @@ -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 |