From 69bf30596c2555b4430383d7edc4f1dbe04e72fc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 3 Jan 2012 12:10:36 -0200 Subject: 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 --- config.tests/unix/bsymbolic_functions.test | 7 ++++++- config.tests/unix/fvisibility.test | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'config.tests') diff --git a/config.tests/unix/bsymbolic_functions.test b/config.tests/unix/bsymbolic_functions.test index 70720b04ac..d495e56bef 100755 --- a/config.tests/unix/bsymbolic_functions.test +++ b/config.tests/unix/bsymbolic_functions.test @@ -9,7 +9,12 @@ 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 +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 # done diff --git a/config.tests/unix/fvisibility.test b/config.tests/unix/fvisibility.test index 6e56410075..890f473d10 100755 --- a/config.tests/unix/fvisibility.test +++ b/config.tests/unix/fvisibility.test @@ -25,6 +25,7 @@ __global void blah(); EOF if [ "$VERBOSE" = "yes" ] ; then + echo $COMPILER -c $CMDLINE fvisibility.c $COMPILER -c $CMDLINE fvisibility.c && FVISIBILITY_SUPPORT=yes else $COMPILER -c $CMDLINE fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes -- cgit v1.2.1