egl: add glvnd symbols check
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 11 Oct 2018 17:38:52 +0000 (18:38 +0100)
committerEric Engestrom <eric@engestrom.ch>
Wed, 10 Jul 2019 11:27:51 +0000 (11:27 +0000)
According to the spec [1], `__egl_Main` is the only symbol that needs to
be exported. We don't want applications directly linking against
libEGL_mesa.so (apps should always go through libEGL.so, regardless of
who is providing it), so we shouldn't export any other symbols either.

[1] https://github.com/NVIDIA/libglvnd/blob/master/include/glvnd/libeglabi.h
    (this header is the closest there is to a spec)

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/egl-glvnd-symbols.txt [new file with mode: 0644]
src/egl/meson.build

diff --git a/src/egl/egl-glvnd-symbols.txt b/src/egl/egl-glvnd-symbols.txt
new file mode 100644 (file)
index 0000000..40d931e
--- /dev/null
@@ -0,0 +1 @@
+__egl_Main
index 019f79ee212badd0c05f4630e978babb3d34c741..d864c099efa200e4c8c54497e42a8a549b47ee0a 100644 (file)
@@ -194,7 +194,7 @@ pkg.generate(
 
 if with_tests and prog_nm.found()
   if with_glvnd
 
 if with_tests and prog_nm.found()
   if with_glvnd
-    # TODO: add glvnd symbol check
+    egl_symbols = files('egl-glvnd-symbols.txt')
   else
     egl_symbols = files('egl-symbols.txt')
   endif
   else
     egl_symbols = files('egl-symbols.txt')
   endif