diff options
Diffstat (limited to 'config.tests/unix/arch.test')
-rwxr-xr-x | config.tests/unix/arch.test | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test index dacdcda8bf..e65541cda7 100755 --- a/config.tests/unix/arch.test +++ b/config.tests/unix/arch.test @@ -5,26 +5,20 @@ 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" -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... ($*)" @@ -32,7 +26,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="" @@ -42,6 +36,8 @@ if [ -f ./arch.exe ]; then binary=./arch.exe elif [ -f ./arch ]; then binary=./arch +elif [ -f ./libarch.so ]; then + binary=./libarch.so else [ "$VERBOSE" = "yes" ] && echo "Unable to determine architecture!" exit 2 |