summaryrefslogtreecommitdiff
path: root/patches/mesa-mesa/0002-megadriver-explicitly-link-against-glapi-link-with-n.patch
blob: 8e1c1a1c16e2265c3e302f694e2dab815781b3d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 1b5d43a719726e0f34aeddf87071d91ba1403233 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Mon, 3 Mar 2014 20:05:03 +0000
Subject: [PATCH 2/4] megadriver: explicitly link against glapi, link with
 -no-undefined

On cygwin we need to link against the static or shared glapi provider so it can
be built with no unresolved references.

"Use -no-undefined to assure libtool that the library has no unresolved symbols
at link time, so that libtool will build a shared library on platforms that
require that all symbols are resolved when the library is linked."

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
 src/mesa/drivers/dri/Makefile.am | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
index 08a8e64..fe29e2c 100644
--- a/src/mesa/drivers/dri/Makefile.am
+++ b/src/mesa/drivers/dri/Makefile.am
@@ -52,7 +52,7 @@ driinclude_HEADERS = \
 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 \
+        -module -avoid-version -shared -shrext .so -no-undefined \
         $(BSYMBOLIC) \
         $(GC_SECTIONS) \
         $()
@@ -65,6 +65,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.4.5