[PATCH libdrm 07/11] libkms: use new symbols checking script

Eric Engestrom eric.engestrom at imgtec.com
Wed Apr 4 15:41:41 UTC 2018


Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
 libkms/Makefile.am      |  1 +
 libkms/kms-symbol-check | 19 ++++++-------------
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/libkms/Makefile.am b/libkms/Makefile.am
index 461fc35b6ff08fdd1a7f..2742c9357250b70661cf 100644
--- a/libkms/Makefile.am
+++ b/libkms/Makefile.am
@@ -39,5 +39,6 @@ libkmsinclude_HEADERS = $(LIBKMS_H_FILES)
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libkms.pc
 
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
 TESTS = kms-symbol-check
 EXTRA_DIST = $(TESTS)
diff --git a/libkms/kms-symbol-check b/libkms/kms-symbol-check
index a5c2120d5ce75616f489..3ff2f98c83a793c53073 100755
--- a/libkms/kms-symbol-check
+++ b/libkms/kms-symbol-check
@@ -1,15 +1,10 @@
 #!/bin/bash
+set -eu
 
-# The following symbols (past the first five) are taken from the public headers.
-# A list of the latter should be available Makefile.sources/LIBKMS_H_FILES
+LIB=.libs/libkms.so
 
-FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
-( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
-_fini
-_init
+# Official ABI, taken from the header.
+REQ_FUNCS="
 kms_bo_create
 kms_bo_destroy
 kms_bo_get_prop
@@ -18,8 +13,6 @@ kms_bo_unmap
 kms_create
 kms_destroy
 kms_get_prop
-EOF
-done)
+"
 
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+source "$top_srcdir"/symbols-check
-- 
Cheers,
  Eric



More information about the dri-devel mailing list