[Mesa-dev] [PATCH 22/22] targets/omx: automake: add symbol test
Emil Velikov
emil.l.velikov at gmail.com
Sat Feb 8 08:04:07 PST 2014
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/gallium/targets/omx-symbols-check | 13 +++++++++++++
src/gallium/targets/r600/omx/Makefile.am | 6 ++++++
src/gallium/targets/radeonsi/omx/Makefile.am | 6 ++++++
3 files changed, 25 insertions(+)
create mode 100755 src/gallium/targets/omx-symbols-check
diff --git a/src/gallium/targets/omx-symbols-check b/src/gallium/targets/omx-symbols-check
new file mode 100755
index 0000000..84616f4
--- /dev/null
+++ b/src/gallium/targets/omx-symbols-check
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+FUNCS=$(nm -D --defined-only ${1-.libs/libomx_${TARGET}.so} | grep -o "T .*" | cut -c 3- | while read func; do
+( grep -q "^$func$" || echo $func ) <<EOF
+omx_component_library_Setup
+${WINSYS_FUNC}
+_fini
+_init
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
diff --git a/src/gallium/targets/r600/omx/Makefile.am b/src/gallium/targets/r600/omx/Makefile.am
index b46c35a..1ddcb43 100644
--- a/src/gallium/targets/r600/omx/Makefile.am
+++ b/src/gallium/targets/r600/omx/Makefile.am
@@ -67,6 +67,12 @@ libomx_r600_la_LINK = $(LINK) $(libomx_r600_la_LDFLAGS)
nodist_EXTRA_libomx_r600_la_SOURCES = dummy-c.c
endif
+AM_TESTS_ENVIRONMENT = \
+ export TARGET=r600; \
+ export WINSYS_FUNC=radeon_drm_winsys_create;
+
+TESTS = ../../omx-symbols-check
+
# Provide compatibility with scripts for the old Mesa build system for
# a while by putting a link to the driver into /lib of the build tree.
all-local: libomx_r600.la
diff --git a/src/gallium/targets/radeonsi/omx/Makefile.am b/src/gallium/targets/radeonsi/omx/Makefile.am
index efc317e..d19ce16 100644
--- a/src/gallium/targets/radeonsi/omx/Makefile.am
+++ b/src/gallium/targets/radeonsi/omx/Makefile.am
@@ -58,6 +58,12 @@ libomx_radeonsi_la_LDFLAGS += $(LLVM_LDFLAGS)
libomx_radeonsi_la_LIBADD += $(LLVM_LIBS)
endif
+AM_TESTS_ENVIRONMENT = \
+ export TARGET=radeonsi; \
+ export WINSYS_FUNC=radeon_drm_winsys_create;
+
+TESTS = ../../omx-symbols-check
+
# Provide compatibility with scripts for the old Mesa build system for
# a while by putting a link to the driver into /lib of the build tree.
all-local: libomx_radeonsi.la
--
1.8.5.2
More information about the mesa-dev
mailing list