diff mbox

[libdrm,09/11] omap: use new symbols checking script

Message ID 20180404154145.27607-9-eric.engestrom@imgtec.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Engestrom April 4, 2018, 3:41 p.m. UTC
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
 omap/Makefile.am       |  1 +
 omap/omap-symbol-check | 19 ++++++-------------
 2 files changed, 7 insertions(+), 13 deletions(-)
diff mbox

Patch

diff --git a/omap/Makefile.am b/omap/Makefile.am
index 599bb9ded5003f17a2f7..bdb809907df0c12aa3ac 100644
--- a/omap/Makefile.am
+++ b/omap/Makefile.am
@@ -20,5 +20,6 @@  libdrm_omapinclude_HEADERS = omap_drmif.h
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_omap.pc
 
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
 TESTS = omap-symbol-check
 EXTRA_DIST = $(TESTS)
diff --git a/omap/omap-symbol-check b/omap/omap-symbol-check
index 0fb4a0f2664cf9edbc27..843b410933e49889552d 100755
--- a/omap/omap-symbol-check
+++ b/omap/omap-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.am/libdrm_omap*HEADERS
+LIB=.libs/libdrm_omap.so
 
-FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_omap.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="
 omap_bo_cpu_fini
 omap_bo_cpu_prep
 omap_bo_del
@@ -28,8 +23,6 @@  omap_device_new
 omap_device_ref
 omap_get_param
 omap_set_param
-EOF
-done)
+"
 
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+source "$top_srcdir"/symbols-check