diff mbox

[libdrm,06/11] intel: use new symbols checking script

Message ID 20180404154145.27607-6-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>
---
 intel/Makefile.am        |  2 ++
 intel/intel-symbol-check | 19 ++++++-------------
 2 files changed, 8 insertions(+), 13 deletions(-)
diff mbox

Patch

diff --git a/intel/Makefile.am b/intel/Makefile.am
index c52e8c086a86cf523da4..448a79fbc48e97e3f500 100644
--- a/intel/Makefile.am
+++ b/intel/Makefile.am
@@ -56,6 +56,8 @@  BATCHES = \
 	tests/gen7-2d-copy.batch \
 	tests/gen7-3d.batch
 
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
+
 TESTS = \
 	$(BATCHES:.batch=.batch.sh) \
 	intel-symbol-check
diff --git a/intel/intel-symbol-check b/intel/intel-symbol-check
index 4d30a4b15feb94e9523d..5962292a91fcfda3788f 100755
--- a/intel/intel-symbol-check
+++ b/intel/intel-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_INTEL_H_FILES
+LIB=.libs/libdrm_intel.so
 
-FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_intel.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="
 drm_intel_bo_alloc
 drm_intel_bo_alloc_for_render
 drm_intel_bo_alloc_tiled
@@ -93,8 +88,6 @@  drm_intel_get_pooled_eu
 drm_intel_get_reset_stats
 drm_intel_get_subslice_total
 drm_intel_reg_read
-EOF
-done)
+"
 
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+source "$top_srcdir"/symbols-check