File: bsymbolic_functions.test

package info (click to toggle)
qtbase-opensource-src 5.3.2%2Bdfsg-4%2Bdeb8u1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 272,152 kB
  • sloc: cpp: 1,623,105; ansic: 386,069; xml: 101,194; sh: 16,504; python: 9,156; java: 4,681; asm: 4,531; perl: 2,392; yacc: 1,926; lex: 970; makefile: 498; awk: 142; objc: 70; sed: 3
file content (27 lines) | stat: -rwxr-xr-x 848 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

BSYMBOLIC_FUNCTIONS_SUPPORT=no
COMPILER=$1
VERBOSE=$2


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

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
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