summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-02-07 16:08:04 +0000
committerEmil Velikov <[email protected]>2014-02-11 19:00:09 +0000
commit5c7f75f70a833d861c835aac2c008e03599f7b50 (patch)
treeb0fb2d80450072b379d1eb7e0dc9143022d897ac /src/gallium
parent33b9c0d46527563d5a5e0f1f4f4017cf799f5782 (diff)
gbm: automake: add symbol tests
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/targets/gbm/Makefile.am2
-rwxr-xr-xsrc/gallium/targets/gbm/gallium-gbm-symbols-check13
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/targets/gbm/Makefile.am b/src/gallium/targets/gbm/Makefile.am
index 7c6733b3453..f44aee88962 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -65,3 +65,5 @@ gbm_gallium_drm_la_LINK = $(CXXLINK) $(gbm_gallium_drm_la_LDFLAGS)
# Mention a dummy pure C file to trigger generation of the $(LINK) variable
nodist_EXTRA_gbm_gallium_drm_la_SOURCES = dummy-c.c
endif
+
+TESTS = gallium-gbm-symbols-check
diff --git a/src/gallium/targets/gbm/gallium-gbm-symbols-check b/src/gallium/targets/gbm/gallium-gbm-symbols-check
new file mode 100755
index 00000000000..52b20ab858b
--- /dev/null
+++ b/src/gallium/targets/gbm/gallium-gbm-symbols-check
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+FUNCS=$(nm -D --defined-only ${1-.libs/gbm_gallium_drm.so} | egrep -o "T .*|D .*" | cut -c 3- | while read func; do
+( grep -q "^$func$" || echo $func ) <<EOF
+gbm_backend
+_edata
+_fini
+_init
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"