summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-03-29 14:52:06 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-31 10:10:29 +0100
commit8e7f76bd8ab5d7303e2f384ad35b87736cfdd935 (patch)
treefbb956615d52d3888794ad3ccf8af043bd8f9fd0
parentb152870bf4d32055c67b8ba5597026170fccf168 (diff)
downloadpoky-8e7f76bd8ab5d7303e2f384ad35b87736cfdd935.tar.gz
ovmf: avoid linking with gold
Linking with gold fails due to an internal error in gold. The ovmf linker is gcc, which has a -fuse-ld=bfd option to choose the linker which (for ovmf) is known to work. Like the choice of the compilers, this is done in ovmf-native. To keep that recipe independent of DISTRO_FEATURES, choosing bfd is done unconditionally. (From OE-Core rev: 7ee548b9f6f2893caf6b5ade8c892f2968d4ec47) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/ovmf/ovmf_git.bb8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index 898c5b76af..73fdfc6239 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -98,6 +98,14 @@ fix_toolchain_append_class-native() {
98 -e '/^LINKER/a LFLAGS += ${BUILD_LDFLAGS}\nCFLAGS += ${BUILD_CFLAGS}' \ 98 -e '/^LINKER/a LFLAGS += ${BUILD_LDFLAGS}\nCFLAGS += ${BUILD_CFLAGS}' \
99 ${S}/BaseTools/Source/C/Makefiles/app.makefile \ 99 ${S}/BaseTools/Source/C/Makefiles/app.makefile \
100 ${S}/BaseTools/Source/C/VfrCompile/GNUmakefile 100 ${S}/BaseTools/Source/C/VfrCompile/GNUmakefile
101 # Linking with gold fails:
102 # internal error in do_layout, at ../../gold/object.cc:1821
103 # make: *** [.../OUTPUT/Facs.acpi] Error 1
104 # We intentionally hard-code the use of ld.bfd regardless of DISTRO_FEATURES
105 # to make ovmf-native reusable across distros.
106 sed -i \
107 -e 's#^\(DEFINE GCC.*DLINK.*FLAGS *=\)#\1 -fuse-ld=bfd#' \
108 ${S}/BaseTools/Conf/tools_def.template
101} 109}
102 110
103GCC_VER="$(${CC} -v 2>&1 | tail -n1 | awk '{print $3}')" 111GCC_VER="$(${CC} -v 2>&1 | tail -n1 | awk '{print $3}')"