summaryrefslogtreecommitdiff
path: root/src/gallium/targets/dri/Makefile.am
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2017-04-13 18:54:03 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2017-05-04 18:11:29 +0100
commit79a26b663acdffc3f21d6e37f3334495aed16ae5 (patch)
treeeca1096ab08898a3eb0d915cf49b075534fe7dd8 /src/gallium/targets/dri/Makefile.am
parent9d2aa6e5067752efbc0acbd728bc0bde49aefb61 (diff)
gallium/dri: always link against shared glapi
In the early days of Xorg and Mesa we had multiple providers of the GLAPI. All of those were the ones responsible for dlopening the DRI module. Hence it was perfectly fine, and actually expected, for the DRI modules to have unresolved symbols. Since then we've moved the API to a separate shared library and no other libraries provide the symbols. Here comes the picky part: It's possible that one uses old Xorg (where libglx.so provides the GLAPI) and new Mesa (with DRI modules linking against libglapi.so). That should still work, since the the libglx.so symbols will take precedence over the libglapi.so ones. I've verified this while running 1.14 series Xorg alongside this (and next) patch. It may seem a bit fragile, but that's of reasonably OK since all of the affected Xorg versions have been EOL for years. The final one being the 1.14 series, which saw its final bug fix release 1.14.7 in June 2014. To ensure that the binaries do not have unresolved symbols add -no-undefined and $(LD_NO_UNDEFINED), just like we do everywhere else throughout mesa. Cc: mesa-stable@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98428 Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/gallium/targets/dri/Makefile.am')
-rw-r--r--src/gallium/targets/dri/Makefile.am6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index 459459ebed..8363406c58 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -1,10 +1,8 @@
include $(top_srcdir)/src/gallium/Automake.inc
-if HAVE_ANDROID
if HAVE_SHARED_GLAPI
SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
endif
-endif
AM_CFLAGS = \
-I$(top_srcdir)/src/mapi \
@@ -31,8 +29,10 @@ gallium_dri_la_LDFLAGS = \
-shared \
-shrext .so \
-module \
+ -no-undefined \
-avoid-version \
- $(GC_SECTIONS)
+ $(GC_SECTIONS) \
+ $(LD_NO_UNDEFINED)
if HAVE_LD_VERSION_SCRIPT
gallium_dri_la_LDFLAGS += \