[Mesa-dev] [PATCH] gallium makefiles: use -export-symbols-regex for building dri drivers
Maarten Lankhorst
maarten.lankhorst at canonical.com
Tue Feb 11 06:55:55 PST 2014
Hide most symbols, except radeon_drm_winsys_create.
As a side effect, it ought to fix bug 73200 on radeon.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
---
diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 1e4a34f..b70b940 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -51,12 +51,14 @@ GALLIUM_VIDEO_CFLAGS = \
$(VISIBILITY_CFLAGS)
-# TODO: add -export-symbols-regex
+DRI_EXPORTS ?= '^(__dri2ConfigOptions|__driDriverExtensions.*)$$'
+
GALLIUM_DRI_LINKER_FLAGS = \
-module \
-avoid-version \
+ -export-symbols-regex $(DRI_EXPORTS) \
-shared \
- -Wl,-Bsymbolic
+ -no-undefined
GALLIUM_VDPAU_LINKER_FLAGS = \
-module \
diff --git a/src/gallium/targets/r300/dri/Makefile.am b/src/gallium/targets/r300/dri/Makefile.am
index d6d8f2d..a2ae263 100644
--- a/src/gallium/targets/r300/dri/Makefile.am
+++ b/src/gallium/targets/r300/dri/Makefile.am
@@ -20,6 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
+DRI_EXPORTS = '^(__dri2ConfigOptions|__driDriverExtensions.*|radeon_drm_winsys_create)$$'
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
diff --git a/src/gallium/targets/r600/dri/Makefile.am b/src/gallium/targets/r600/dri/Makefile.am
index 42db72f..374b2ce 100644
--- a/src/gallium/targets/r600/dri/Makefile.am
+++ b/src/gallium/targets/r600/dri/Makefile.am
@@ -20,6 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
+DRI_EXPORTS = '^(__dri2ConfigOptions|__driDriverExtensions.*|radeon_drm_winsys_create)$$'
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
diff --git a/src/gallium/targets/radeonsi/dri/Makefile.am b/src/gallium/targets/radeonsi/dri/Makefile.am
index 2c1a58d..79ce23f 100644
--- a/src/gallium/targets/radeonsi/dri/Makefile.am
+++ b/src/gallium/targets/radeonsi/dri/Makefile.am
@@ -20,6 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
+DRI_EXPORTS = '^(__dri2ConfigOptions|__driDriverExtensions.*|radeon_drm_winsys_create)$$'
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
More information about the mesa-dev
mailing list