summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/ovmf/ovmf_git.bb9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index 1fe01146d6..ef5545bf70 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -102,15 +102,22 @@ fix_toolchain_append_class-native() {
102 # to make ovmf-native reusable across distros. 102 # to make ovmf-native reusable across distros.
103 sed -i \ 103 sed -i \
104 -e 's#^\(DEFINE GCC.*DLINK.*FLAGS *=\)#\1 -fuse-ld=bfd#' \ 104 -e 's#^\(DEFINE GCC.*DLINK.*FLAGS *=\)#\1 -fuse-ld=bfd#' \
105 -e 's#-flto#-fno-lto#g' \
106 -e 's#-DUSING_LTO##g' \
105 ${S}/BaseTools/Conf/tools_def.template 107 ${S}/BaseTools/Conf/tools_def.template
106} 108}
107 109
110# We disable lto above since the results are not reproducible and make it hard to compare
111# binary build aretfacts to debug reproducibility problems.
112# Surprisingly, if you disable lto, you see compiler warnings which are fatal. We therefore
113# have to hack warnings overrides into GCC_PREFIX_MAP to allow it to build.
114
108# We want to pass ${DEBUG_PREFIX_MAP} to gcc commands and also pass in 115# We want to pass ${DEBUG_PREFIX_MAP} to gcc commands and also pass in
109# --debug-prefix-map to nasm (we carry a patch to nasm for this). The 116# --debug-prefix-map to nasm (we carry a patch to nasm for this). The
110# tools definitions are built by ovmf-native so we need to pass this in 117# tools definitions are built by ovmf-native so we need to pass this in
111# at target build time when we know the right values. 118# at target build time when we know the right values.
112export NASM_PREFIX_MAP = "--debug-prefix-map=${WORKDIR}=/usr/src/debug/ovmf/${EXTENDPE}${PV}-${PR}" 119export NASM_PREFIX_MAP = "--debug-prefix-map=${WORKDIR}=/usr/src/debug/ovmf/${EXTENDPE}${PV}-${PR}"
113export GCC_PREFIX_MAP = "${DEBUG_PREFIX_MAP}" 120export GCC_PREFIX_MAP = "${DEBUG_PREFIX_MAP} -Wno-stringop-overflow -Wno-maybe-uninitialized"
114 121
115GCC_VER="$(${CC} -v 2>&1 | tail -n1 | awk '{print $3}')" 122GCC_VER="$(${CC} -v 2>&1 | tail -n1 | awk '{print $3}')"
116 123