[Mesa-dev] [PATCH 2/2] megadriver: explicitly link against glapi, link with -no-undefined

Emil Velikov emil.l.velikov at gmail.com
Sat Oct 25 20:21:24 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.
 - Use tabs instead of spaces in makefile.

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/mesa/drivers/dri/Makefile.am | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
index 2009da9..6075f71 100644
--- a/src/mesa/drivers/dri/Makefile.am
+++ b/src/mesa/drivers/dri/Makefile.am
@@ -51,10 +51,15 @@ driinclude_HEADERS = $(top_srcdir)/include/GL/internal/dri_interface.h
 nodist_EXTRA_mesa_dri_drivers_la_SOURCES = dummy.cpp
 mesa_dri_drivers_la_SOURCES =
 mesa_dri_drivers_la_LDFLAGS = \
-        -module -avoid-version -shared -shrext .so \
-        $(BSYMBOLIC) \
-        $(GC_SECTIONS) \
-        $()
+	-shared \
+	-shrext .so \
+	-module \
+	-no-undefined \
+	-avoid-version \
+	$(BSYMBOLIC) \
+	$(GC_SECTIONS) \
+	$(LD_NO_UNDEFINED) \
+	$()
 mesa_dri_drivers_la_LIBADD = \
         ../../libmesa.la \
         common/libmegadriver_stub.la \
@@ -63,6 +68,12 @@ mesa_dri_drivers_la_LIBADD = \
         $(DRI_LIB_DEPS) \
         $()
 
+if HAVE_SHARED_GLAPI
+mesa_dri_drivers_la_LIBADD += $(top_builddir)/src/mapi/shared-glapi/libglapi.la
+else
+mesa_dri_drivers_la_LIBADD += $(top_builddir)/src/mapi/glapi/libglapi.la
+endif
+
 if NEED_MEGADRIVER
 dri_LTLIBRARIES = mesa_dri_drivers.la
 
-- 
2.1.2



More information about the mesa-dev mailing list