egl: Do not export private symbols
authorChad Versace <chad.versace@linux.intel.com>
Thu, 1 Aug 2013 15:10:31 +0000 (08:10 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Thu, 8 Aug 2013 22:17:51 +0000 (15:17 -0700)
commit2c2e64edaba0f6aeb181ca5b51eb8dea8e9b39f9
tree01dbda144eb51ee72d134f32bdea215fd0cfcd4d
parentfb3d62fe3d4fc40ba4ad9804d8b6f451316c9ae2
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>
src/egl/drivers/dri2/Makefile.am
src/egl/drivers/glx/Makefile.am
src/egl/main/Makefile.am
src/egl/wayland/wayland-drm/Makefile.am
src/egl/wayland/wayland-egl/Makefile.am