Improve sysroot handling with regards to configure tests.
Some configure tests try to link programs, which when compiling against a sysroot _does_ require the --sysroot= argument in order to find crt0.o. This patch uses the existing pattern of using the export SYSROOT_FLAG in the missing linking tests. Change-Id: I063849c814f393d5f88de1b486ce9035b9f7bf65 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
b184dd0a01
commit
19f4b47b45
@ -9,7 +9,7 @@ cat >>bsymbolic_functions.c << EOF
|
|||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
$COMPILER -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
|
$COMPILER $SYSROOT_FLAG -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
|
||||||
rm -f bsymbolic_functions.c libtest.so
|
rm -f bsymbolic_functions.c libtest.so
|
||||||
|
|
||||||
# done
|
# done
|
||||||
|
@ -10,7 +10,7 @@ OUTDIR=$4
|
|||||||
|
|
||||||
# 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" "$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" "QMAKE_LFLAGS+=$SYSROOT_FLAG" "$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"
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ VERBOSE=$3
|
|||||||
|
|
||||||
if [ -n "$QMAKE_OBJCOPY" ]; then
|
if [ -n "$QMAKE_OBJCOPY" ]; then
|
||||||
echo "int main() { return 0; }" > objcopy_test.cpp
|
echo "int main() { return 0; }" > objcopy_test.cpp
|
||||||
if $TEST_PATH/which.test "$QMAKE_OBJCOPY" >/dev/null 2>&1 && $COMPILER -g -o objcopy_test objcopy_test.cpp >/dev/null 2>&1; then
|
if $TEST_PATH/which.test "$QMAKE_OBJCOPY" >/dev/null 2>&1 && $COMPILER $SYSROOT_FLAG -g -o objcopy_test objcopy_test.cpp >/dev/null 2>&1; then
|
||||||
"$QMAKE_OBJCOPY" --only-keep-debug objcopy_test objcopy_test.debug >/dev/null 2>&1 \
|
"$QMAKE_OBJCOPY" --only-keep-debug objcopy_test objcopy_test.debug >/dev/null 2>&1 \
|
||||||
&& "$QMAKE_OBJCOPY" --strip-debug objcopy_test >/dev/null 2>&1 \
|
&& "$QMAKE_OBJCOPY" --strip-debug objcopy_test >/dev/null 2>&1 \
|
||||||
&& "$QMAKE_OBJCOPY" --add-gnu-debuglink=objcopy_test.debug objcopy_test >/dev/null 2>&1 \
|
&& "$QMAKE_OBJCOPY" --add-gnu-debuglink=objcopy_test.debug objcopy_test >/dev/null 2>&1 \
|
||||||
|
Loading…
Reference in New Issue
Block a user