summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/ovmf/ovmf
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-03-21 09:56:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-22 11:35:22 +0000
commit11aa39028867d356d37291c2d9ca492f7cdf0795 (patch)
treed2d0feefb1afee80224948d7306ebea9a8f78cb9 /meta/recipes-core/ovmf/ovmf
parent853a1548507dd8bfc3362052cfee8e89e6b51b33 (diff)
downloadpoky-11aa39028867d356d37291c2d9ca492f7cdf0795.tar.gz
ovmf: fix toolchain selection
For the native tools, a static patch inserted gcc/g++/ld/ar while later adding BUILD_LDFLAGS and BUILD_CFLAGS with sed. Now it's all done with sed, which has the advantage that it uses the actual compile variables. However, in practice those are the same. More importantly, picking the build tools for the target was broken. ovmf-native tried to insert TARGET_PREFIX into the tools definition file, but that variable is empty in a native recipe. As a result, "gcc" was used instead of "${HOST_PREFIX}gcc", leading to an undesirable dependency on the host compiler and potentially (probably?!) causing some of the build issues that were seen for ovmf. The new approach is to override the tool selection in ovmf-native so that the HOST_PREFIX env variable is used, which then gets exported during do_compile for the target. While at it, Python code that gets appened to do_patch only to call shell functions gets replaced with the do_patch[postfuncs] mechanism. Incremental builds now always use the tools definition from the current ovmf-native; previously, only the initial build copied the template file. Probably the entire split into ovmf-native and ovmf could be removed. This merely hasn't been attempted yet. (From OE-Core rev: 23a12d87a6e82f80f4ccc1a01c707faa89ff7abd) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/ovmf/ovmf')
-rw-r--r--meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch48
1 files changed, 0 insertions, 48 deletions
diff --git a/meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch b/meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
deleted file mode 100644
index 644b99d8bc..0000000000
--- a/meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 6e24bde1979c2d7149b37d142fb882dfde0e9770 Mon Sep 17 00:00:00 2001
2From: Matt Fleming <matt.fleming@intel.com>
3Date: Fri, 27 Jun 2014 11:12:18 +0100
4Subject: [PATCH] BaseTools: Force tools variables to host toolchain
5
6Signed-off-by: Matt Fleming <matt.fleming@intel.com>
7---
8 BaseTools/Source/C/Makefiles/app.makefile | 7 +++++++
9 BaseTools/Source/C/VfrCompile/GNUmakefile | 5 +++++
10 2 files changed, 12 insertions(+)
11
12diff --git a/BaseTools/Source/C/Makefiles/app.makefile b/BaseTools/Source/C/Makefiles/app.makefile
13index 19269a1..62aad0f 100644
14--- a/BaseTools/Source/C/Makefiles/app.makefile
15+++ b/BaseTools/Source/C/Makefiles/app.makefile
16@@ -16,6 +16,13 @@ include $(MAKEROOT)/Makefiles/header.makefile
17
18 APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
19
20+CC = gcc
21+CXX = g++
22+AS = gcc
23+AR = ar
24+LD = ld
25+LINKER = $(CC)
26+
27 .PHONY:all
28 all: $(MAKEROOT)/bin $(APPLICATION)
29
30diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C/VfrCompile/GNUmakefile
31index 82005e1..5ac5f7e 100644
32--- a/BaseTools/Source/C/VfrCompile/GNUmakefile
33+++ b/BaseTools/Source/C/VfrCompile/GNUmakefile
34@@ -26,6 +26,11 @@ OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyn
35
36 VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)
37
38+CC = gcc
39+CXX = g++
40+AS = gcc
41+AR = ar
42+LD = ld
43 LINKER = $(BUILD_CXX)
44
45 EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h
46--
471.9.0
48