Fix host endian detection when compiling with sysroot
Apply the sysroot argument for the endian test only for the test used for detecting the target endianness, don't use --sysroot for the host detection. Change-Id: I53edda6ebfd06e73cc64f2561b707bd2ba052ae7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
e0fd9b5b06
commit
c954bf8b91
@ -4,13 +4,14 @@ QMKSPEC=$1
|
|||||||
VERBOSE=$2
|
VERBOSE=$2
|
||||||
SRCDIR=$3
|
SRCDIR=$3
|
||||||
OUTDIR=$4
|
OUTDIR=$4
|
||||||
|
QMFLAGS=$5
|
||||||
|
|
||||||
# debuggery
|
# debuggery
|
||||||
[ "$VERBOSE" = "yes" ] && echo "Determining machine byte-order... ($*)"
|
[ "$VERBOSE" = "yes" ] && echo "Determining machine byte-order... ($*)"
|
||||||
|
|
||||||
# build and run a test program
|
# build and run a test program
|
||||||
test -d "$OUTDIR/config.tests/unix/endian" || mkdir -p "$OUTDIR/config.tests/unix/endian"
|
test -d "$OUTDIR/config.tests/unix/endian" || mkdir -p "$OUTDIR/config.tests/unix/endian"
|
||||||
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "QMAKE_LFLAGS+=$SYSROOT_FLAG" "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1
|
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" $QMFLAGS "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1
|
||||||
cd "$OUTDIR/config.tests/unix/endian"
|
cd "$OUTDIR/config.tests/unix/endian"
|
||||||
|
|
||||||
|
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -5979,7 +5979,7 @@ if [ "$CFG_ENDIAN" = "auto" ]; then
|
|||||||
elif [ "$PLATFORM_MAC" = "yes" ]; then
|
elif [ "$PLATFORM_MAC" = "yes" ]; then
|
||||||
true #leave as auto
|
true #leave as auto
|
||||||
else
|
else
|
||||||
"$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
|
"$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
|
||||||
F="$?"
|
F="$?"
|
||||||
if [ "$F" -eq 0 ]; then
|
if [ "$F" -eq 0 ]; then
|
||||||
CFG_ENDIAN="Q_LITTLE_ENDIAN"
|
CFG_ENDIAN="Q_LITTLE_ENDIAN"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user