diff mbox

[libdrm,04/11] exynos: use new symbols checking script

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

Patch

diff --git a/exynos/Makefile.am b/exynos/Makefile.am
index f99f8981ff9ef0bf9d4f..9dd1161c6cc4d9f84b64 100644
--- a/exynos/Makefile.am
+++ b/exynos/Makefile.am
@@ -23,5 +23,6 @@  libdrm_exynosinclude_HEADERS = exynos_drmif.h
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_exynos.pc
 
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
 TESTS = exynos-symbol-check
 EXTRA_DIST = $(TESTS)
diff --git a/exynos/exynos-symbol-check b/exynos/exynos-symbol-check
index e9f1b04d5b0a7a258cf1..f1df6645ec243eccce5b 100755
--- a/exynos/exynos-symbol-check
+++ b/exynos/exynos-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_exynos*_HEADERS
+LIB=.libs/libdrm_exynos.so
 
-FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.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="
 exynos_bo_create
 exynos_bo_destroy
 exynos_bo_from_name
@@ -33,8 +28,6 @@  g2d_init
 g2d_move
 g2d_scale_and_blend
 g2d_solid_fill
-EOF
-done)
+"
 
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+source "$top_srcdir"/symbols-check