summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-08-19 13:21:35 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-08-21 12:43:41 +0000
commit19e61ac2907fd453d629d270668139cd1da7e10b (patch)
treed7ccf0752f256d4d816d995b0e60548fb46308de /config.tests
parent5549ba4fa512e0fed8f8dbf4f316293d04793d2f (diff)
Fix pointer size detection when cross-compiling
The initial configure fails to build the pointer size test correctly due to the missing --sysroot argument. This breaks 64-bit targets as the pointer size is set to 4. A subsequent configure correctly builds and picks 8 up, but we expect the first attempt to work as well. Task-number: QTBUG-47840 Change-Id: Iaf9450635f1bbc12e18062fa0a51f35cf690ce08 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'config.tests')
-rwxr-xr-xconfig.tests/unix/ptrsize.test5
1 files changed, 4 insertions, 1 deletions
diff --git a/config.tests/unix/ptrsize.test b/config.tests/unix/ptrsize.test
index 4f42c6d11d..7d7bde57e5 100755
--- a/config.tests/unix/ptrsize.test
+++ b/config.tests/unix/ptrsize.test
@@ -5,12 +5,15 @@ VERBOSE=$2
SRCDIR=$3
OUTDIR=$4
+LFLAGS=$SYSROOT_FLAG
+CXXFLAGS=$SYSROOT_FLAG
+
# debuggery
[ "$VERBOSE" = "yes" ] && echo "Testing size of pointers ... ($*)"
# build and run a test program
test -d "$OUTDIR/config.tests/unix/ptrsize" || mkdir -p "$OUTDIR/config.tests/unix/ptrsize"
-"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG-=app_bundle" "$SRCDIR/config.tests/unix/ptrsize/ptrsizetest.pro" -o "$OUTDIR/config.tests/unix/ptrsize/Makefile" >/dev/null 2>&1
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG-=app_bundle" "QMAKE_LFLAGS*=$LFLAGS" "QMAKE_CXXFLAGS*=$CXXFLAGS" "$SRCDIR/config.tests/unix/ptrsize/ptrsizetest.pro" -o "$OUTDIR/config.tests/unix/ptrsize/Makefile" >/dev/null 2>&1
cd "$OUTDIR/config.tests/unix/ptrsize"
if [ "$VERBOSE" = "yes" ]; then