diff options
-rwxr-xr-x | config.tests/unix/arch.test | 20 | ||||
-rwxr-xr-x | configure | 8 |
2 files changed, 23 insertions, 5 deletions
diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test index 3f5f153cc0..9e18597dd3 100755 --- a/config.tests/unix/arch.test +++ b/config.tests/unix/arch.test @@ -6,6 +6,24 @@ SRCDIR=$3 OUTDIR=$4 RESULTFILE=$5 VARPREFIX=$6 +shift 6 + +LFLAGS="$SYSROOT_FLAG" +CXXFLAGS="$SYSROOT_FLAG" + +while [ "$#" -gt 0 ]; do + PARAM=$1 + case $PARAM in + -sdk) + LFLAGS="$LFLAGS -Wl,-syslibroot,$2" + CXXFLAGS="$CXXFLAGS -isysroot $2" + shift + ;; + *) ;; + esac + shift +done + # debuggery [ "$VERBOSE" = "yes" ] && echo "Determining architecture... ($*)" @@ -13,7 +31,7 @@ VARPREFIX=$6 # build a test program but don't run it test -d "$OUTDIR/config.tests/arch" || mkdir -p "$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+=$SYSROOT_FLAG" "QMAKE_CXXFLAGS+=$SYSROOT_FLAG" "$SRCDIR/config.tests/arch/arch.pro" -o "$OUTDIR/config.tests/arch/Makefile" >/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.pro" -o "$OUTDIR/config.tests/arch/Makefile" >/dev/null 2>&1 || echo "qmake is broken" >&2 cd "$OUTDIR/config.tests/arch" @@ -2541,7 +2541,7 @@ if [ -n "$CFG_SYSROOT" ]; then else SYSROOT_FLAG= fi -export SYSROOT_FLAG # used by config.tests/unix/compile.test +export SYSROOT_FLAG # used by config.tests/unix/{compile.test,arch.test} # auto-detect precompiled header support if [ "$CFG_PRECOMPILE" = "auto" ]; then @@ -3752,9 +3752,9 @@ fi # determine the target and host architectures #------------------------------------------------------------------------------- -# Use config.tests/arch/arch.pro to has the compiler tell us what the target architecture is +# 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" +"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG" $MAC_CONFIG_TEST_COMMANDLINE if [ $? -eq 0 ]; then eval `cat "$OUTFILE"` else @@ -3767,7 +3767,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" "CFG_HOST" $MAC_CONFIG_TEST_COMMANDLINE if [ $? -eq 0 ]; then eval `cat "$OUTFILE"` else |