equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 BSYMBOLIC_FUNCTIONS_SUPPORT=no |
|
4 COMPILER=$1 |
|
5 VERBOSE=$2 |
|
6 |
|
7 cat >>bsymbolic_functions.c << EOF |
|
8 int main() { return 0; } |
|
9 EOF |
|
10 |
|
11 "$COMPILER" -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes |
|
12 rm -f bsymbolic_functions.c libtest.so |
|
13 |
|
14 # done |
|
15 if [ "$BSYMBOLIC_FUNCTIONS_SUPPORT" != "yes" ]; then |
|
16 [ "$VERBOSE" = "yes" ] && echo "Symbolic function binding disabled." |
|
17 exit 0 |
|
18 else |
|
19 [ "$VERBOSE" = "yes" ] && echo "Symbolic function binding enabled." |
|
20 exit 1 |
|
21 fi |