mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 11:30:11 +01:00
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" <mesa-stable@lists.freedesktop.org>
CC: Ian Romanick <idr@freedesktop.org>
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
parent
fb3d62fe3d
commit
2c2e64edab
5 changed files with 5 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ AM_CFLAGS = \
|
||||||
-I$(top_srcdir)/src/egl/wayland/wayland-drm \
|
-I$(top_srcdir)/src/egl/wayland/wayland-drm \
|
||||||
-I$(top_builddir)/src/egl/wayland/wayland-drm \
|
-I$(top_builddir)/src/egl/wayland/wayland-drm \
|
||||||
$(DEFINES) \
|
$(DEFINES) \
|
||||||
|
$(VISIBILITY_CFLAGS) \
|
||||||
$(LIBDRM_CFLAGS) \
|
$(LIBDRM_CFLAGS) \
|
||||||
$(LIBUDEV_CFLAGS) \
|
$(LIBUDEV_CFLAGS) \
|
||||||
$(LIBKMS_CFLAGS) \
|
$(LIBKMS_CFLAGS) \
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/src/egl/main \
|
-I$(top_srcdir)/src/egl/main \
|
||||||
|
$(VISIBILITY_CFLAGS) \
|
||||||
$(X11_CFLAGS) \
|
$(X11_CFLAGS) \
|
||||||
$(DEFINES)
|
$(DEFINES)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ AM_CFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/src/gbm/main \
|
-I$(top_srcdir)/src/gbm/main \
|
||||||
$(DEFINES) \
|
$(DEFINES) \
|
||||||
|
$(VISIBILITY_CFLAGS) \
|
||||||
$(EGL_CFLAGS) \
|
$(EGL_CFLAGS) \
|
||||||
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
|
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
|
||||||
-D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \
|
-D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
AM_CFLAGS = -I$(top_srcdir)/src/egl/main \
|
AM_CFLAGS = -I$(top_srcdir)/src/egl/main \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
$(DEFINES) \
|
$(DEFINES) \
|
||||||
|
$(VISIBILITY_CFLAGS) \
|
||||||
$(WAYLAND_CFLAGS)
|
$(WAYLAND_CFLAGS)
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libwayland-drm.la
|
noinst_LTLIBRARIES = libwayland-drm.la
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = wayland-egl.pc
|
pkgconfig_DATA = wayland-egl.pc
|
||||||
|
|
||||||
AM_CFLAGS = $(DEFINES) \
|
AM_CFLAGS = $(DEFINES) \
|
||||||
|
$(VISIBILITY_CFLAGS) \
|
||||||
$(WAYLAND_CFLAGS)
|
$(WAYLAND_CFLAGS)
|
||||||
|
|
||||||
lib_LTLIBRARIES = libwayland-egl.la
|
lib_LTLIBRARIES = libwayland-egl.la
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue