summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-11-19 15:50:50 +0000
committerEmil Velikov <[email protected]>2015-11-20 10:40:23 +0000
commit166314dd8829c80f1df5a3b7070b6c86cccf1b9e (patch)
treee1b68c35b103b3aea4ef247826e00b1f6606456a /src
parent5a79e0a8e37ea10cfa6fc39f4fbe315f9620fe52 (diff)
automake: egl: add symbols test
Should help us catch issues where we expose any extra symbols by mistake. Just like the ones fixes with previous commit. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Acked-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/egl/Makefile.am3
-rwxr-xr-xsrc/egl/egl-symbols-check55
2 files changed, 58 insertions, 0 deletions
diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index 88fe13acbd4..0b463c8deb0 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -119,7 +119,10 @@ egl_HEADERS = \
$(top_srcdir)/include/EGL/eglmesaext.h \
$(top_srcdir)/include/EGL/eglplatform.h
+TESTS = egl-symbols-check
+
EXTRA_DIST = \
+ egl-symbols-check \
SConscript \
drivers/haiku \
docs \
diff --git a/src/egl/egl-symbols-check b/src/egl/egl-symbols-check
new file mode 100755
index 00000000000..5d46fed57c9
--- /dev/null
+++ b/src/egl/egl-symbols-check
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+FUNCS=$(nm -D --defined-only ${1-.libs/libEGL.so} | grep -o "T .*" | cut -c 3- | while read func; do
+( grep -q "^$func$" || echo $func ) <<EOF
+eglBindAPI
+eglBindTexImage
+eglChooseConfig
+eglClientWaitSync
+eglCopyBuffers
+eglCreateContext
+eglCreateImage
+eglCreatePbufferFromClientBuffer
+eglCreatePbufferSurface
+eglCreatePixmapSurface
+eglCreatePlatformPixmapSurface
+eglCreatePlatformWindowSurface
+eglCreateSync
+eglCreateWindowSurface
+eglDestroyContext
+eglDestroyImage
+eglDestroySurface
+eglDestroySync
+eglGetConfigAttrib
+eglGetConfigs
+eglGetCurrentContext
+eglGetCurrentDisplay
+eglGetCurrentSurface
+eglGetDisplay
+eglGetError
+eglGetPlatformDisplay
+eglGetProcAddress
+eglGetSyncAttrib
+eglInitialize
+eglMakeCurrent
+eglQueryAPI
+eglQueryContext
+eglQueryString
+eglQuerySurface
+eglReleaseTexImage
+eglReleaseThread
+eglSurfaceAttrib
+eglSwapBuffers
+eglSwapInterval
+eglTerminate
+eglWaitClient
+eglWaitGL
+eglWaitNative
+eglWaitSync
+_fini
+_init
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"