automake: Link all libGL.so variants with -Bsymbolic.
authorJose Fonseca <jfonseca@vmware.com>
Thu, 1 Jun 2017 15:41:13 +0000 (16:41 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Thu, 1 Jun 2017 20:24:38 +0000 (21:24 +0100)
We were linking src/glx with -Bsymbolic, but not the classic/gallium X11
libGL.so.

But it's always a good idea to build all libGL.so and all DRI drivers
with -Bsymbolic, otherwise they might resolve symbols from the 3rd party
application executable or shared libraries, which is _never_ what we
want.

In particular, this can happen when intercepting OpenGL calls with
apitrace, before
https://github.com/apitrace/apitrace/commit/63194b2573176ef34efce1a5c8b08e624b8dddf5

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/targets/libgl-xlib/Makefile.am
src/mesa/drivers/x11/Makefile.am

index d3a7818..a29199f 100644 (file)
@@ -52,6 +52,7 @@ lib@GL_LIB@_la_SOURCES = xlib.c
 lib@GL_LIB@_la_LDFLAGS = \
        -no-undefined \
        -version-number $(GL_MAJOR):$(GL_MINOR):$(GL_TINY) \
+       $(BSYMBOLIC) \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
index 8c6b67d..6e123ba 100644 (file)
@@ -74,6 +74,7 @@ lib@GL_LIB@_la_LIBADD = \
 lib@GL_LIB@_la_LDFLAGS = \
        -no-undefined \
        -version-number $(GL_MAJOR):$(GL_MINOR):$(GL_PATCH) \
+       $(BSYMBOLIC) \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)