[PATCH libdrm 03/11] etnaviv: use new symbols checking script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Eric Engestrom <eric.engestrom@xxxxxxxxxx>
---
 etnaviv/Makefile.am          |  1 +
 etnaviv/etnaviv-symbol-check | 19 ++++++-------------
 etnaviv/meson.build          |  1 +
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/etnaviv/Makefile.am b/etnaviv/Makefile.am
index be96ba868f0d3949c9fa..0ceda75049dc400e07c7 100644
--- a/etnaviv/Makefile.am
+++ b/etnaviv/Makefile.am
@@ -22,5 +22,6 @@ libdrm_etnavivinclude_HEADERS = $(LIBDRM_ETNAVIV_H_FILES)
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_etnaviv.pc
 
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
 TESTS = etnaviv-symbol-check
 EXTRA_DIST = $(TESTS)
diff --git a/etnaviv/etnaviv-symbol-check b/etnaviv/etnaviv-symbol-check
index b1598ce52838c847096a..14eb56ce4c5ee00753d0 100755
--- a/etnaviv/etnaviv-symbol-check
+++ b/etnaviv/etnaviv-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_ETNAVIV_H_FILES
+LIB=.libs/libdrm_etnaviv.so
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_etnaviv.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="
 etna_device_new
 etna_device_new_dup
 etna_device_ref
@@ -46,8 +41,6 @@ etna_perfmon_create
 etna_perfmon_del
 etna_perfmon_get_dom_by_name
 etna_perfmon_get_sig_by_name
-EOF
-done)
+"
 
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+source "$top_srcdir"/symbols-check
diff --git a/etnaviv/meson.build b/etnaviv/meson.build
index ca2aa544c58924a15d8b..74e3679eaad83db09636 100644
--- a/etnaviv/meson.build
+++ b/etnaviv/meson.build
@@ -55,5 +55,6 @@ ext_libdrm_etnaviv = declare_dependency(
 test(
   'etnaviv-symbol-check',
   prog_bash,
+  env : env_test,
   args : [files('etnaviv-symbol-check'), libdrm_etnaviv]
 )
-- 
Cheers,
  Eric

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux