Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
---
 src/gallium/targets/gbm/Makefile.am               |  2 ++
 src/gallium/targets/gbm/gallium-gbm-symbols-check | 13 +++++++++
 src/gbm/Makefile.am                               |  2 ++
 src/gbm/gbm-symbols-check                         | 33 +++++++++++++++++++++++
 4 files changed, 50 insertions(+)
 create mode 100755 src/gallium/targets/gbm/gallium-gbm-symbols-check
 create mode 100755 src/gbm/gbm-symbols-check

diff --git a/src/gallium/targets/gbm/Makefile.am 
b/src/gallium/targets/gbm/Makefile.am
index 5398f11..89e1023 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -67,3 +67,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 0000000..52b20ab
--- /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"
diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
index b144b17..8503242 100644
--- a/src/gbm/Makefile.am
+++ b/src/gbm/Makefile.am
@@ -48,4 +48,6 @@ libgbm_la_LIBADD += \
        libgbm_dri.la $(top_builddir)/src/mapi/shared-glapi/libglapi.la 
$(LIBDRM_LIBS)
 endif
 
+TESTS = gbm-symbols-check
+
 include $(top_srcdir)/install-lib-links.mk
diff --git a/src/gbm/gbm-symbols-check b/src/gbm/gbm-symbols-check
new file mode 100755
index 0000000..184cb22
--- /dev/null
+++ b/src/gbm/gbm-symbols-check
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+FUNCS=$(nm -D --defined-only ${1-.libs/libgbm.so} | grep -o "T .*" | cut -c 3- 
| while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+gbm_device_get_fd
+gbm_device_get_backend_name
+gbm_device_is_format_supported
+gbm_device_destroy
+gbm_create_device
+gbm_bo_create
+gbm_bo_import
+gbm_bo_get_width
+gbm_bo_get_height
+gbm_bo_get_stride
+gbm_bo_get_format
+gbm_bo_get_device
+gbm_bo_get_handle
+gbm_bo_write
+gbm_bo_set_user_data
+gbm_bo_get_user_data
+gbm_bo_destroy
+gbm_surface_create
+gbm_surface_lock_front_buffer
+gbm_surface_release_buffer
+gbm_surface_has_free_buffers
+gbm_surface_destroy
+_fini
+_init
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
1.8.5.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to