[PATCH libdrm 05/11] freedreno: use new symbols checking script

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


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

diff --git a/freedreno/Makefile.am b/freedreno/Makefile.am
index cbb0d031816155755bda..571272cb63aee8e427f9 100644
--- a/freedreno/Makefile.am
+++ b/freedreno/Makefile.am
@@ -27,5 +27,6 @@ libdrm_freedrenocommoninclude_HEADERS = $(LIBDRM_FREEDRENO_H_FILES)
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_freedreno.pc
 
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
 TESTS = freedreno-symbol-check
 EXTRA_DIST = $(TESTS)
diff --git a/freedreno/freedreno-symbol-check b/freedreno/freedreno-symbol-check
index 3b119528c6cfbfd9d4a0..bc03d4e7b01a0453e57d 100755
--- a/freedreno/freedreno-symbol-check
+++ b/freedreno/freedreno-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_FREEDRENO_H_FILES
+LIB=.libs/libdrm_freedreno.so
 
-FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.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="
 fd_bo_cpu_fini
 fd_bo_cpu_prep
 fd_bo_del
@@ -56,8 +51,6 @@ fd_ringmarker_flush
 fd_ringbuffer_flush2
 fd_ringmarker_mark
 fd_ringmarker_new
-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