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