gfx/harfbuzz/src/check-static-inits.sh

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rwxr-xr-x

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 #!/bin/sh
     3 LC_ALL=C
     4 export LC_ALL
     6 test -z "$srcdir" && srcdir=.
     7 stat=0
    10 if which objdump 2>/dev/null >/dev/null; then
    11 	:
    12 else
    13 	echo "check-static-inits.sh: 'objdump' not found; skipping test"
    14 	exit 77
    15 fi
    17 OBJS=.libs/*.o
    18 if test "x`echo $OBJS`" = "x$OBJS" 2>/dev/null >/dev/null; then
    19 	echo "check-static-inits.sh: object files not found; skipping test"
    20 	exit 77
    21 fi
    23 echo "Checking that no object file has static initializers"
    24 for obj in $OBJS; do
    25 	if objdump -t "$obj" | grep '[.]ctors'; then
    26 		echo "Ouch, $obj has static initializers"
    27 		stat=1
    28 	fi
    29 done
    31 echo "Checking that no object file has lazy static C++ constructors/destructors or other such stuff"
    32 for obj in $OBJS; do
    33 	if objdump -t "$obj" | grep '__c'; then
    34 		echo "Ouch, $obj has lazy static C++ constructors/destructors or other such stuff"
    35 		stat=1
    36 	fi
    37 done
    39 exit $stat

mercurial