[Mesa-dev] [PATCH mesa 4/5] gbm: use new symbols checking script
Eric Engestrom
eric.engestrom at imgtec.com
Wed Mar 28 17:07:49 UTC 2018
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
src/gbm/Makefile.am | 1 +
src/gbm/gbm-symbols-check | 20 ++++++--------------
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
index 5097212cda0aa54fb57c..e22e72dec922367d73e2 100644
--- a/src/gbm/Makefile.am
+++ b/src/gbm/Makefile.am
@@ -52,6 +52,7 @@ libgbm_la_LIBADD += \
endif
TESTS = gbm-symbols-check
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
EXTRA_DIST = gbm-symbols-check meson.build
include $(top_srcdir)/install-lib-links.mk
diff --git a/src/gbm/gbm-symbols-check b/src/gbm/gbm-symbols-check
index 9b1508ede00e7e12c7af..ffce33728232473f4f24 100755
--- a/src/gbm/gbm-symbols-check
+++ b/src/gbm/gbm-symbols-check
@@ -1,15 +1,10 @@
#!/bin/sh
set -eu
-LIB=${1-.libs/libgbm.so}
+LIB=.libs/libgbm.so
-if ! [ -f "$LIB" ]
-then
- exit 1
-fi
-
-FUNCS=$($NM -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
-( grep -q "^$func$" || echo $func ) <<EOF
+# Official ABI, taken from the header.
+REQ_FUNCS="
gbm_device_get_fd
gbm_device_get_backend_name
gbm_device_is_format_supported
@@ -44,10 +39,7 @@ 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"
+# Run the checks
+source "$top_srcdir"/scripts/symbols-check
--
Cheers,
Eric
More information about the mesa-dev
mailing list