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

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rwxr-xr-x

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

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

mercurial