Fix the bsymbolic_functions test and improve the error reporting
The bsymbolic_functions test was missing $SYSROOT_FLAG, so the linking was always failing and the test falsely negative. Also make the error reporting better: if the flag was requested, error out if the check fails and report more information in -v mode. Change-Id: Ie2615f8083e7e58d63d9ee9c23be937dc864b30d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
160a93bc2f
commit
69bf30596c
@ -9,7 +9,12 @@ cat >>bsymbolic_functions.c << EOF
|
|||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
$COMPILER $SYSROOT_FLAG -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
|
if [ "$VERBOSE" = "yes" ] ; then
|
||||||
|
echo $COMPILER $SYSROOT_FLAG -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
|
||||||
|
$COMPILER $SYSROOT_FLAG -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
|
||||||
|
else
|
||||||
|
$COMPILER $SYSROOT_FLAG -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
|
||||||
|
fi
|
||||||
rm -f bsymbolic_functions.c libtest.so
|
rm -f bsymbolic_functions.c libtest.so
|
||||||
|
|
||||||
# done
|
# done
|
||||||
|
@ -25,6 +25,7 @@ __global void blah();
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "$VERBOSE" = "yes" ] ; then
|
if [ "$VERBOSE" = "yes" ] ; then
|
||||||
|
echo $COMPILER -c $CMDLINE fvisibility.c
|
||||||
$COMPILER -c $CMDLINE fvisibility.c && FVISIBILITY_SUPPORT=yes
|
$COMPILER -c $CMDLINE fvisibility.c && FVISIBILITY_SUPPORT=yes
|
||||||
else
|
else
|
||||||
$COMPILER -c $CMDLINE fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
|
$COMPILER -c $CMDLINE fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
|
||||||
|
12
configure
vendored
12
configure
vendored
@ -2601,8 +2601,13 @@ if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# auto-detect -fvisibility support
|
# auto-detect -fvisibility support
|
||||||
if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
|
if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
|
||||||
if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
|
if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
|
||||||
|
if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
|
||||||
|
echo "-reduce-exports was requested but this compiler does not support it"
|
||||||
|
echo "Re-run configure with -v for more information"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
CFG_REDUCE_EXPORTS=no
|
CFG_REDUCE_EXPORTS=no
|
||||||
else
|
else
|
||||||
CFG_REDUCE_EXPORTS=yes
|
CFG_REDUCE_EXPORTS=yes
|
||||||
@ -2612,6 +2617,11 @@ fi
|
|||||||
# detect the availability of the -Bsymbolic-functions linker optimization
|
# detect the availability of the -Bsymbolic-functions linker optimization
|
||||||
if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
|
if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
|
||||||
if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
|
if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
|
||||||
|
if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
|
||||||
|
echo "-reduce-relocations was requested but this compiler does not support it"
|
||||||
|
echo "Re-run configure with -v for more information"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
CFG_REDUCE_RELOCATIONS=no
|
CFG_REDUCE_RELOCATIONS=no
|
||||||
else
|
else
|
||||||
CFG_REDUCE_RELOCATIONS=yes
|
CFG_REDUCE_RELOCATIONS=yes
|
||||||
|
Loading…
Reference in New Issue
Block a user