summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
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-21 22:43:04 +0000
commit23a12d87a6e82f80f4ccc1a01c707faa89ff7abd (patch)
tree508b231a682c36b49ef1d89779bb4c7492e31a98 /meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
parentaa30853693a8b6092e1ea9785d64267858454d17 (diff)
downloadopenembedded-core-contrib-23a12d87a6e82f80f4ccc1a01c707faa89ff7abd.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. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch')
-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 @@
-From 6e24bde1979c2d7149b37d142fb882dfde0e9770 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Fri, 27 Jun 2014 11:12:18 +0100
-Subject: [PATCH] BaseTools: Force tools variables to host toolchain
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
----
- BaseTools/Source/C/Makefiles/app.makefile | 7 +++++++
- BaseTools/Source/C/VfrCompile/GNUmakefile | 5 +++++
- 2 files changed, 12 insertions(+)
-
-diff --git a/BaseTools/Source/C/Makefiles/app.makefile b/BaseTools/Source/C/Makefiles/app.makefile
-index 19269a1..62aad0f 100644
---- a/BaseTools/Source/C/Makefiles/app.makefile
-+++ b/BaseTools/Source/C/Makefiles/app.makefile
-@@ -16,6 +16,13 @@ include $(MAKEROOT)/Makefiles/header.makefile
-
- APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
-
-+CC = gcc
-+CXX = g++
-+AS = gcc
-+AR = ar
-+LD = ld
-+LINKER = $(CC)
-+
- .PHONY:all
- all: $(MAKEROOT)/bin $(APPLICATION)
-
-diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C/VfrCompile/GNUmakefile
-index 82005e1..5ac5f7e 100644
---- a/BaseTools/Source/C/VfrCompile/GNUmakefile
-+++ b/BaseTools/Source/C/VfrCompile/GNUmakefile
-@@ -26,6 +26,11 @@ OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyn
-
- VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)
-
-+CC = gcc
-+CXX = g++
-+AS = gcc
-+AR = ar
-+LD = ld
- LINKER = $(BUILD_CXX)
-
- EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h
---
-1.9.0
-