egl: use new symbols check script
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 11 Oct 2018 13:40:28 +0000 (14:40 +0100)
committerEric Engestrom <eric@engestrom.ch>
Wed, 10 Jul 2019 11:27:51 +0000 (11:27 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/egl-symbols-check [deleted file]
src/egl/egl-symbols.txt [new file with mode: 0644]
src/egl/meson.build

diff --git a/src/egl/egl-symbols-check b/src/egl/egl-symbols-check
deleted file mode 100755 (executable)
index 4200f9c..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-set -eu
-
-if [ "$(uname)" = "Darwin" ]
-then
-  LIB=${1-.libs/libEGL.dylib}
-else
-  LIB=${1-.libs/libEGL.so}
-fi
-
-if ! [ -f "$LIB" ]
-then
-  exit 1
-fi
-
-FUNCS=$($NM -D --defined-only $LIB | 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
-MesaGLInteropEGLQueryDeviceInfo
-MesaGLInteropEGLExportObject
-_fini
-_init
-EOF
-done)
-
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
diff --git a/src/egl/egl-symbols.txt b/src/egl/egl-symbols.txt
new file mode 100644 (file)
index 0000000..0b1929a
--- /dev/null
@@ -0,0 +1,46 @@
+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
+MesaGLInteropEGLQueryDeviceInfo
+MesaGLInteropEGLExportObject
index 97d79823b663e15cbc4698d76b513720837109eb..a6b66a06857d26742bfd9b9924202e03fe8ea18a 100644 (file)
@@ -196,13 +196,17 @@ if with_tests and prog_nm.found()
   if with_glvnd
     # TODO: add glvnd symbol check
   else
-    test('egl-symbols-check',
-      find_program('egl-symbols-check'),
-      env : env_test,
-      args : libegl,
-      suite : ['egl'],
-    )
+    egl_symbols = files('egl-symbols.txt')
   endif
+  test('egl-symbols-check',
+    symbols_check,
+    args : [
+      '--lib', libegl,
+      '--symbols-file', egl_symbols,
+      '--nm', prog_nm.path(),
+    ],
+    suite : ['egl'],
+  )
   test('egl-entrypoint-check',
     find_program('egl-entrypoint-check'),
     env : ['srcdir=' + meson.current_source_dir()],