summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-0.9.34/src/check-static-inits.sh
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-08-03 12:38:18 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-08-03 12:38:18 +0000
commit763e0cee93b0e0a397fbe9f62e549a2e6ecf8022 (patch)
treefa75aa4d7ecd2cfe24196ed1cc8dee5c94b2ade7 /Build/source/libs/harfbuzz/harfbuzz-0.9.34/src/check-static-inits.sh
parent9b1a7933abd546e9e473f267cf90293445d7e048 (diff)
harfbuzz 0.9.34
git-svn-id: svn://tug.org/texlive/trunk@34807 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-0.9.34/src/check-static-inits.sh')
-rwxr-xr-xBuild/source/libs/harfbuzz/harfbuzz-0.9.34/src/check-static-inits.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-0.9.34/src/check-static-inits.sh b/Build/source/libs/harfbuzz/harfbuzz-0.9.34/src/check-static-inits.sh
new file mode 100755
index 00000000000..83d02c8a9bf
--- /dev/null
+++ b/Build/source/libs/harfbuzz/harfbuzz-0.9.34/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 '[.]ctors'; then
+ echo "Ouch, $obj has static initializers"
+ 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