Module: Mesa Branch: master Commit: 2c2e64edaba0f6aeb181ca5b51eb8dea8e9b39f9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c2e64edaba0f6aeb181ca5b51eb8dea8e9b39f9
Author: Chad Versace <[email protected]> Date: Thu Aug 1 08:10:31 2013 -0700 egl: Do not export private symbols libEGL was incorrectly exporting *all* symbols, public and private. This patch adds -fvisibility=hidden to libEGL's linker flags to ensure that only symbols annotated with __attribute__((visibility("default"))) get exported. Sanity-checked with libEGL's builtin DRI2 driver and the i965 DRI driver by running Piglit on X/EGL and by running weston-gears on Weston as an X client. Sanity-checked with libEGL's Gallium driver (which is not built-in) and the swrast Gallium driver by running es2gears_x11. Kristian reviewed the symbol diff in `nm libEGL.so`. CC: "9.2" <[email protected]> CC: Ian Romanick <[email protected]> Acked-by: Kristian Høgsberg <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Signed-off-by: Chad Versace <[email protected]> --- src/egl/drivers/dri2/Makefile.am | 1 + src/egl/drivers/glx/Makefile.am | 1 + src/egl/main/Makefile.am | 1 + src/egl/wayland/wayland-drm/Makefile.am | 1 + src/egl/wayland/wayland-egl/Makefile.am | 1 + 5 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am index 45f7dfa..823ef5e 100644 --- a/src/egl/drivers/dri2/Makefile.am +++ b/src/egl/drivers/dri2/Makefile.am @@ -28,6 +28,7 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/egl/wayland/wayland-drm \ -I$(top_builddir)/src/egl/wayland/wayland-drm \ $(DEFINES) \ + $(VISIBILITY_CFLAGS) \ $(LIBDRM_CFLAGS) \ $(LIBUDEV_CFLAGS) \ $(LIBKMS_CFLAGS) \ diff --git a/src/egl/drivers/glx/Makefile.am b/src/egl/drivers/glx/Makefile.am index 6bf67ea..6db95b4 100644 --- a/src/egl/drivers/glx/Makefile.am +++ b/src/egl/drivers/glx/Makefile.am @@ -22,6 +22,7 @@ AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/egl/main \ + $(VISIBILITY_CFLAGS) \ $(X11_CFLAGS) \ $(DEFINES) diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am index 1cfdce2..2e43860 100644 --- a/src/egl/main/Makefile.am +++ b/src/egl/main/Makefile.am @@ -27,6 +27,7 @@ AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/gbm/main \ $(DEFINES) \ + $(VISIBILITY_CFLAGS) \ $(EGL_CFLAGS) \ -D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \ -D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \ diff --git a/src/egl/wayland/wayland-drm/Makefile.am b/src/egl/wayland/wayland-drm/Makefile.am index 4b2aeb3..08ee497 100644 --- a/src/egl/wayland/wayland-drm/Makefile.am +++ b/src/egl/wayland/wayland-drm/Makefile.am @@ -1,6 +1,7 @@ AM_CFLAGS = -I$(top_srcdir)/src/egl/main \ -I$(top_srcdir)/include \ $(DEFINES) \ + $(VISIBILITY_CFLAGS) \ $(WAYLAND_CFLAGS) noinst_LTLIBRARIES = libwayland-drm.la diff --git a/src/egl/wayland/wayland-egl/Makefile.am b/src/egl/wayland/wayland-egl/Makefile.am index 7d20a1a..138c170 100644 --- a/src/egl/wayland/wayland-egl/Makefile.am +++ b/src/egl/wayland/wayland-egl/Makefile.am @@ -2,6 +2,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = wayland-egl.pc AM_CFLAGS = $(DEFINES) \ + $(VISIBILITY_CFLAGS) \ $(WAYLAND_CFLAGS) lib_LTLIBRARIES = libwayland-egl.la _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
