aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa/0004-glsl-fix-builtin_compiler-cross-compilation.patch
blob: 460a2748bf0a15667cbbd6990fedf95c21c0aaae (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
From ab38c97f057f739533a4e1fc9de51ea5f4e6242d Mon Sep 17 00:00:00 2001
From: Jonathan Liu <net147@gmail.com>
Date: Sat, 29 Jun 2013 11:37:20 +0200
Subject: [PATCH 4/4] glsl: fix builtin_compiler cross-compilation

The target libtool is used when building host binaries, which predictably
doesn't work.

Upstream-Status: Submitted https://bugs.freedesktop.org/show_bug.cgi?id=44618
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 src/glsl/builtin_compiler/Makefile.am | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/glsl/builtin_compiler/Makefile.am b/src/glsl/builtin_compiler/Makefile.am
index e11a17f..8ebe0a2 100644
--- a/src/glsl/builtin_compiler/Makefile.am
+++ b/src/glsl/builtin_compiler/Makefile.am
@@ -64,6 +64,8 @@ AM_CXXFLAGS = $(AM_CFLAGS)
 include ../Makefile.sources
 
 noinst_PROGRAMS = builtin_compiler
+
+if !CROSS_COMPILING
 noinst_LTLIBRARIES = libglslcore.la libglcpp.la
 
 libglcpp_la_SOURCES =					\
@@ -73,6 +75,7 @@ libglcpp_la_SOURCES =					\
 libglslcore_la_SOURCES =				\
 	$(BUILTIN_COMPILER_GENERATED_CXX_FILES)		\
 	$(LIBGLSL_FILES)
+endif
 
 builtin_compiler_SOURCES = \
 	$(top_srcdir)/src/mesa/main/hash_table.c	\
@@ -81,4 +84,14 @@ builtin_compiler_SOURCES = \
 	$(top_srcdir)/src/mesa/program/symbol_table.c	\
 	$(BUILTIN_COMPILER_CXX_FILES)			\
 	$(GLSL_COMPILER_CXX_FILES)
+
+if CROSS_COMPILING
+builtin_compiler_SOURCES += \
+	$(LIBGLCPP_GENERATED_FILES) \
+	$(LIBGLCPP_FILES) \
+	$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
+	$(LIBGLSL_FILES)
+builtin_compiler_CPPFLAGS = $(AM_CPPFLAGS)
+else
 builtin_compiler_LDADD = libglslcore.la libglcpp.la
+endif
-- 
1.8.2.1