summaryrefslogtreecommitdiffstats
path: root/gfx/harfbuzz/src/check-static-inits.sh
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /gfx/harfbuzz/src/check-static-inits.sh
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/harfbuzz/src/check-static-inits.sh')
-rwxr-xr-xgfx/harfbuzz/src/check-static-inits.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/gfx/harfbuzz/src/check-static-inits.sh b/gfx/harfbuzz/src/check-static-inits.sh
new file mode 100755
index 000000000..1446fa734
--- /dev/null
+++ b/gfx/harfbuzz/src/check-static-inits.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+LC_ALL=C
+export LC_ALL
+
+test -z "$srcdir" && srcdir=.
+stat=0
+
+
+if which objdump 2>/dev/null >/dev/null; then
+ :
+else
+ echo "check-static-inits.sh: 'objdump' not found; skipping test"
+ exit 77
+fi
+
+OBJS=.libs/*.o
+if test "x`echo $OBJS`" = "x$OBJS" 2>/dev/null >/dev/null; then
+ echo "check-static-inits.sh: object files not found; skipping test"
+ exit 77
+fi
+
+echo "Checking that no object file has static initializers"
+for obj in $OBJS; do
+ if objdump -t "$obj" | grep '[.][cd]tors' | grep -v '\<00*\>'; then
+ echo "Ouch, $obj has static initializers/finalizers"
+ stat=1
+ fi
+done
+
+echo "Checking that no object file has lazy static C++ constructors/destructors or other such stuff"
+for obj in $OBJS; do
+ if objdump -t "$obj" | grep '__cxa_'; then
+ echo "Ouch, $obj has lazy static C++ constructors/destructors or other such stuff"
+ stat=1
+ fi
+done
+
+exit $stat