targets/libgl-xlib: hide all the exported symbol mayhem
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 25 May 2014 00:54:42 +0000 (01:54 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 25 May 2014 22:21:47 +0000 (23:21 +0100)
Leave only the gl/glx and mangled gl symbols.
XMesa* was never an official interface and the only
user of it was mesa-demos, while they were still in
the same repo as mesa.

v2: Conditionally use the version-script.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/targets/libgl-xlib/Makefile.am
src/gallium/targets/libgl-xlib/libgl-xlib.sym [new file with mode: 0644]

index 76513332a5b3df189c8289c56b5eba7f01c16893..4ed2025a7654d68202e8b5dca2734905e64d50ad 100644 (file)
@@ -50,6 +50,11 @@ lib@GL_LIB@_la_LDFLAGS = \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+lib@GL_LIB@_la_LDFLAGS += \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/libgl-xlib/libgl-xlib.sym
+endif
+
 lib@GL_LIB@_la_LIBADD = \
        $(top_builddir)/src/gallium/state_trackers/glx/xlib/libxlib.la \
        $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
diff --git a/src/gallium/targets/libgl-xlib/libgl-xlib.sym b/src/gallium/targets/libgl-xlib/libgl-xlib.sym
new file mode 100644 (file)
index 0000000..956fa40
--- /dev/null
@@ -0,0 +1,7 @@
+{
+       global:
+               gl*;
+               mgl*;
+       local:
+               *;
+};
\ No newline at end of file