config.tests/unix/bsymbolic_functions.test
author Eckhart Koeppen <eckhart.koppen@nokia.com>
Thu, 29 Apr 2010 15:15:16 +0300
branchRCL_3
changeset 16 4b6ee5efea19
parent 0 1918ee327afb
permissions -rwxr-xr-x
2010-17 9996a03743ab23f83c83c5bc7ade0f82f71b1506

#!/bin/sh

BSYMBOLIC_FUNCTIONS_SUPPORT=no
COMPILER=$1
VERBOSE=$2

cat >>bsymbolic_functions.c << EOF
int main() { return 0; }
EOF

"$COMPILER" -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