gallium makefiles: use a linker script for building dri drivers
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Wed, 12 Feb 2014 12:50:43 +0000 (13:50 +0100)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Wed, 12 Feb 2014 12:51:51 +0000 (13:51 +0100)
Only export __driDriverExtensions by default, and radeon_drm_winsys_create on radeons.
Remove -Bsymbolic which should no longer be needed.

As a side effect, it ought to fix a manifestation of bug 73200 on radeon.

Signed-off-by: Maarten Lankhorst<maarten.lankhorst@canonical.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/Automake.inc
src/gallium/state_trackers/dri/dri.link [new file with mode: 0644]
src/gallium/targets/r300/dri/Makefile.am
src/gallium/targets/r300/dri/radeon.link [new file with mode: 0644]
src/gallium/targets/r600/dri/Makefile.am
src/gallium/targets/radeonsi/dri/Makefile.am

index 1e4a34f..fec69cc 100644 (file)
@@ -51,12 +51,14 @@ GALLIUM_VIDEO_CFLAGS = \
        $(VISIBILITY_CFLAGS)
 
 
-# TODO: add -export-symbols-regex
+DRI_VERSION_SCRIPT ?= $(top_srcdir)/src/gallium/state_trackers/dri/dri.link
+
 GALLIUM_DRI_LINKER_FLAGS = \
        -module \
        -avoid-version \
+       -Wl,--version-script=$(DRI_VERSION_SCRIPT) \
        -shared \
-       -Wl,-Bsymbolic
+       -no-undefined
 
 GALLIUM_VDPAU_LINKER_FLAGS = \
        -module \
diff --git a/src/gallium/state_trackers/dri/dri.link b/src/gallium/state_trackers/dri/dri.link
new file mode 100644 (file)
index 0000000..163902e
--- /dev/null
@@ -0,0 +1,5 @@
+VERSION {
+       global:
+               __driDriverExtensions;
+       local: *;
+};
index d6d8f2d..4bd9ea4 100644 (file)
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+DRI_VERSION_SCRIPT = $(srcdir)/radeon.link
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
diff --git a/src/gallium/targets/r300/dri/radeon.link b/src/gallium/targets/r300/dri/radeon.link
new file mode 100644 (file)
index 0000000..618058b
--- /dev/null
@@ -0,0 +1,6 @@
+VERSION {
+       global:
+               __driDriverExtensions;
+               radeon_drm_winsys_create;
+       local: *;
+};
index 42db72f..1f13b80 100644 (file)
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+DRI_VERSION_SCRIPT = $(srcdir)/../../r300/dri/radeon.link
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
index 2c1a58d..eab28b5 100644 (file)
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+DRI_VERSION_SCRIPT = $(srcdir)/../../r300/dri/radeon.link
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \