author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 15:10:48 +0300 | |
changeset 30 | 5dc02b23752f |
parent 0 | 1918ee327afb |
permissions | -rw-r--r-- |
0 | 1 |
#!/bin/sh |
2 |
||
3 |
BSYMBOLIC_FUNCTIONS_SUPPORT=no |
|
4 |
COMPILER=$1 |
|
5 |
VERBOSE=$2 |
|
6 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
7 |
|
0 | 8 |
cat >>bsymbolic_functions.c << EOF |
9 |
int main() { return 0; } |
|
10 |
EOF |
|
11 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
12 |
$COMPILER -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes |
0 | 13 |
rm -f bsymbolic_functions.c libtest.so |
14 |
||
15 |
# done |
|
16 |
if [ "$BSYMBOLIC_FUNCTIONS_SUPPORT" != "yes" ]; then |
|
17 |
[ "$VERBOSE" = "yes" ] && echo "Symbolic function binding disabled." |
|
18 |
exit 0 |
|
19 |
else |
|
20 |
[ "$VERBOSE" = "yes" ] && echo "Symbolic function binding enabled." |
|
21 |
exit 1 |
|
22 |
fi |