19f4b47b45
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>
23 lines
557 B
Bash
Executable File
23 lines
557 B
Bash
Executable File
#!/bin/sh
|
|
|
|
BSYMBOLIC_FUNCTIONS_SUPPORT=no
|
|
COMPILER=$1
|
|
VERBOSE=$2
|
|
|
|
|
|
cat >>bsymbolic_functions.c << EOF
|
|
int main() { return 0; }
|
|
EOF
|
|
|
|
$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
|
|
|
|
# done
|
|
if [ "$BSYMBOLIC_FUNCTIONS_SUPPORT" != "yes" ]; then
|
|
[ "$VERBOSE" = "yes" ] && echo "Symbolic function binding disabled."
|
|
exit 0
|
|
else
|
|
[ "$VERBOSE" = "yes" ] && echo "Symbolic function binding enabled."
|
|
exit 1
|
|
fi
|