[Mesa-dev] [PATCH 1/2] gallium/targets/dri: explicitly link against glapi, use -no-undefined

Emil Velikov emil.l.velikov at gmail.com
Sat Oct 25 20:21:23 PDT 2014


From: Jon TURNEY <jon.turney at dronecode.org.uk>

Currently the dri modules contain unresolved glapi symbols which were
provided by xserver 1.14 and older. Since 1.15 the xserver does not
provide them and mesa's glapi is the only provider.

As discussed with Adam Jackson, the new (linked against glapi) dri
modules should still work with older xserver, so let's fix this.

Thus way no library provided by mesa is provides libraries with
unresolved symbols :)

v2 [Emil Velikov]
 - Rebase on top of master, reword commit message.

Cc: Adam Jackson <ajax at redhat.com>
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/targets/dri/Makefile.am | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index 1094ffd..8075b2c 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -25,8 +25,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 += \
@@ -53,6 +55,12 @@ gallium_dri_la_LIBADD = \
 	$(LIBDRM_LIBS) \
 	$(GALLIUM_COMMON_LIB_DEPS)
 
+if HAVE_SHARED_GLAPI
+gallium_dri_la_LIBADD += $(top_builddir)/src/mapi/shared-glapi/libglapi.la
+else
+gallium_dri_la_LIBADD += $(top_builddir)/src/mapi/glapi/libglapi.la
+endif
+
 # XXX: Temporary allow duplicated symbols, as the loader pulls in xmlconfig.c
 # which already provides driParse* and driQuery* amongst others.
 # Remove this hack as we come up with a cleaner solution.
-- 
2.1.2



More information about the mesa-dev mailing list