summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/bsymbolic_functions.test
blob: 6c3489591b9d75727b522bf74311204a3aff1554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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