diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-06-29 11:39:27 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-07-02 06:18:32 +0000 |
commit | 31142378774c3aa6f4c137441e23c89b15355a31 (patch) | |
tree | e2019f3041b3da52cb89ec3143b162b23ad9a0a8 /config.tests | |
parent | d72ac3f35f4c6d6405e9675d54124b3ddb8d80ab (diff) |
Call arch test through the new qmake based configure system
Detect host and target architecture from within qmake, and set
QT_ARCH accordingly.
Change-Id: I30255f88c7645d197bd07355a1dff02b377cbbe8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'config.tests')
-rwxr-xr-x | config.tests/unix/arch.test | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test deleted file mode 100755 index cfb47def4f..0000000000 --- a/config.tests/unix/arch.test +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -QMKSPEC=$1 -VERBOSE=$2 -SRCDIR=$3 -OUTDIR=$4 -RESULTFILE=$5 -TARGET=$6 -QMAKE=$7 -QTCONF=$8 -shift 8 - -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 - -L*|-l*) - LFLAGS="$LFLAGS \"$PARAM\"" - ;; - -I*) - INC=`echo $PARAM | sed -e 's/^-I//'` - INCLUDEPATH="$INCLUDEPATH \"$INC\"" - ;; - -D*) - CXXFLAGS="$CXXFLAGS \"$PARAM\"" - ;; - *) ;; - esac - shift -done - -# debuggery -[ "$VERBOSE" = "yes" ] && echo "Determining architecture... ($*)" - -# build a test program but don't run it -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 "$QMAKE" -qtconf "$QTCONF" -nocache -spec "$QMKSPEC" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "INCLUDEPATH+=$INCLUDEPATH" "CONFIG-=app_bundle" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2 - - -ARCH="" -[ "$VERBOSE" = "yes" ] && $MAKE || $MAKE >/dev/null 2>&1 - -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 -fi - -if strings - $binary 2>/dev/null | \ - awk -F: '/\=\=Qt\=magic\=Qt\=\= Architecture/ { print "'$VARPREFIX'_ARCH=\"" $2 "\"" } - /\=\=Qt\=magic\=Qt\=\= Sub-architecture/ { print "'$VARPREFIX'_CPUFEATURES=\"" $2 "\"" }' > "$RESULTFILE" -then - [ "$VERBOSE" = "yes" ] && echo " Found architecture in binary" && \ - cat "$RESULTFILE" -else - [ "$VERBOSE" = "yes" ] && echo "Unable to determine architecture!" - exit 2 -fi - -$MAKE distclean >/dev/null 2>&1 |