[PATCH libdrm 08/11] nouveau: use new symbols checking script

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


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

diff --git a/nouveau/Makefile.am b/nouveau/Makefile.am
index 60ebe243d4236e6aa814..5de4bd2a96a57aac74a4 100644
--- a/nouveau/Makefile.am
+++ b/nouveau/Makefile.am
@@ -28,5 +28,6 @@ libdrm_nouveaunvifinclude_HEADERS = nvif/class.h \
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_nouveau.pc
 
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
 TESTS = nouveau-symbol-check
 EXTRA_DIST = $(TESTS)
diff --git a/nouveau/nouveau-symbol-check b/nouveau/nouveau-symbol-check
index b3a24101e52d8aae1bba..5dab5686fe3d9d8790a6 100755
--- a/nouveau/nouveau-symbol-check
+++ b/nouveau/nouveau-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/LIBDRM_NOUVEAU_H_FILES
+LIB=.libs/libdrm_nouveau.so
 
-FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.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="
 nouveau_bo_map
 nouveau_bo_name_get
 nouveau_bo_name_ref
@@ -51,8 +46,6 @@ nouveau_pushbuf_reloc
 nouveau_pushbuf_space
 nouveau_pushbuf_validate
 nouveau_setparam
-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