summaryrefslogtreecommitdiff
path: root/pcr/mesa-vanilla/0001-glapi-Link-with-glapi-when-built-shared.patch
blob: 376828e673298b6cd7d555bcb9b74834d540feaa (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
From 16875ea5b9170f2213fd486d763f27a9d6dfc1b5 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Tue, 25 Oct 2016 09:35:13 +0200
Subject: [PATCH 1/3] glapi: Link with glapi when built shared

This patch explicitly links to libglapi when built shared.
This was specially needed to avoid undefined non-weak-symbol as shown
with:

ldd  -r /usr/lib64/dri/i915_dri.so
	linux-vdso.so.1 (0x00007fff821f4000)
	libdrm_intel.so.1 => /lib64/libdrm_intel.so.1 (0x00007f6adf2c7000)
	libdrm_nouveau.so.2 => /lib64/libdrm_nouveau.so.2 (0x00007f6adf0be000)
	libdrm_radeon.so.1 => /lib64/libdrm_radeon.so.1 (0x00007f6adeeb2000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f6adec8b000)
	libdrm.so.2 => /lib64/libdrm.so.2 (0x00007f6adea7c000)
	libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f6ade84f000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6ade633000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f6ade42f000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f6ade125000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6addf0e000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f6addb4c000)
	/lib64/ld-linux-x86-64.so.2 (0x000056274e913000)
	libpciaccess.so.0 => /lib64/libpciaccess.so.0 (0x00007f6add941000)
	libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f6add6ce000)
undefined symbol: _glapi_get_dispatch_table_size	(/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_get_context	(/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_add_dispatch	(/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_check_multithread	(/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_tls_Context	(/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_set_context	(/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_set_dispatch	(/usr/lib64/dri/i915_dri.so)
undefined symbol: _glapi_tls_Dispatch	(/usr/lib64/dri/i915_dri.so)

v3: Add gallium counterpart for radeon cases
Reported-by: Jonathan Dieter <jdieter@lesbg.com>

v2: Add Bugzilla and Signed-off

Fixes: 0cbc90c57c ("mesa: dri: Add shared glapi to LIBADD on Android")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98428
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
 src/gallium/targets/dri/Makefile.am | 2 --
 src/mesa/drivers/dri/Makefile.am    | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index bca747f..05f6c8c 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 \
diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
index 1c6dd08..8e68fc0 100644
--- a/src/mesa/drivers/dri/Makefile.am
+++ b/src/mesa/drivers/dri/Makefile.am
@@ -6,12 +6,9 @@ MEGADRIVERS_DEPS =
 
 SUBDIRS+=common
 
-# On Android, we need to explicitly link to libglapi.so.
-if HAVE_ANDROID
 if HAVE_SHARED_GLAPI
 SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
 endif
-endif
 
 if HAVE_I915_DRI
 SUBDIRS += i915
-- 
2.7.4