@@ -21,5 +21,6 @@ libdrm_tegrainclude_HEADERS = tegra.h
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm_tegra.pc
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
TESTS = tegra-symbol-check
EXTRA_DIST = $(TESTS)
@@ -1,18 +1,10 @@
#!/bin/bash
+set -eu
-# The following symbols (past the first nine) are taken from tegra.h.
+LIB=.libs/libdrm_tegra.so
-FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
-( grep -q "^$func$" || echo $func ) <<EOF
-__bss_end__
-__bss_start__
-__bss_start
-__end__
-_bss_end__
-_edata
-_end
-_fini
-_init
+# Official ABI, taken from the header.
+REQ_FUNCS="
drm_tegra_bo_get_flags
drm_tegra_bo_get_handle
drm_tegra_bo_get_tiling
@@ -26,8 +18,6 @@ drm_tegra_bo_unref
drm_tegra_bo_wrap
drm_tegra_close
drm_tegra_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> --- tegra/Makefile.am | 1 + tegra/tegra-symbol-check | 22 ++++++---------------- 2 files changed, 7 insertions(+), 16 deletions(-)