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