summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>2019-07-29 19:59:15 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-08 10:26:40 +0100
commit1f64ecf92fa77b682b18efe72fb6b27ff64ee052 (patch)
tree6bfb9f9b03fa5f362cfe3186eea4c7d74961e40d /meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch
parentcdde0265b196def4633ece64d798e576362e7b61 (diff)
downloadopenembedded-core-1f64ecf92fa77b682b18efe72fb6b27ff64ee052.tar.gz
ovmf: Update to version edk2-stable201905
Fixes [YOCTO #13438] Update OVMF to edk2-stable201905. Since the last update, several things have changed. Many of the patches we were carrying have now been taken upstream in EDK2 or become obsolete. See below for details. Also, as of commit 0c1ffb9504c3("CryptoPkg: Adding OpenSSL as one submodule of EDKII repo"), openssl is not embedded into EDK2 using a patching script but a git submodule. Then, use the gitsm bitbabke fetcher and drop the extra SRC_URI from openssl when building with secureboot enabled. Also remove all related variables. OVMF switched to BSD+Patent license as detailed in https://bugzilla.tianocore.org/show_bug.cgi?id=1373. Hence, update LIC_FILES_CHKSUM accordingly to reflect this change. Patches are updated as follows: Drop 0001-ia32-Dont-use-pie.patch as it is implemented in upstream EDK2 in commits are 11d0cd23dd1b ("BaseTools/tools_def IA32: drop -no-pie linker option for GCC49" and c25d3905523a ("BaseTools/tools_def IA32: disable PIE code generation explicitly") for the applicable GCC versions. Rebase 0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch to edk2-stable201905. Drop VfrCompile-increase-path-length-limit.patch as it has been taken upstream in EDK2 in commit ba78032bc8c9f("BaseTools/VfrCompile: Remove the MAX_PATH limitation"). Rebase no-stack-protector-all-archs.patch to keep behavior on not using stack protector on all archs. Drop 0001-BaseTools-header.makefile-add-Wno-stringop-truncatio.patch, 0002-BaseTools-header.makefile-add-Wno-restrict.patch, and 0003-BaseTools-header.makefile-revert-gcc-8-Wno-xxx-optio.patch. These patches have been taken in upstream EDK2 in commits 9222154ae7b3("BaseTools /header.makefile: add "-Wno-restrict"), 1d212a83df0e("BaseTools/ header.makefile: add "-Wno-stringop-truncation"), and 777f4aa083e9 ("BaseTools/header.makefile: revert gcc-8 '-Wno-xxx' options on OSX"), respectively. Also, drop 0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch. GenVtf has been removed from EDK2 in commit 64ab2c82e8f6("BaseTools: Remove GenVtf"). Also, this patch had been taken in EDK2 upstream in commit 9de306701312("BaseTools/GenVtf: silence false 'stringop-overflow' warning with memcpy()"). Drop patch 0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch as it also has been taken by EDK2. Patches 0002-ovmf-update-path-to-native-BaseTools.patch and 0004-ovmf-enable-long-path-file.patch did not need any update. Lastly, add a needed dependency on bc. Cc: Ross Burton <ross.burton@intel.com> Cc: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch')
-rw-r--r--meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch102
1 files changed, 0 insertions, 102 deletions
diff --git a/meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch b/meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch
deleted file mode 100644
index a076665c33..0000000000
--- a/meta/recipes-core/ovmf/ovmf/0002-BaseTools-header.makefile-add-Wno-restrict.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 86dbdac5a25bd23deb4a0e0a97b527407e02184d Mon Sep 17 00:00:00 2001
-From: Laszlo Ersek <lersek@redhat.com>
-Date: Fri, 2 Mar 2018 17:11:52 +0100
-Subject: [PATCH 2/4] BaseTools/header.makefile: add "-Wno-restrict"
-
-gcc-8 (which is part of Fedora 28) enables the new warning
-"-Wrestrict" in "-Wall". This warning is documented in detail
-at <https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html>; the
-introduction says
-
-> Warn when an object referenced by a restrict-qualified parameter (or, in
-> C++, a __restrict-qualified parameter) is aliased by another argument,
-> or when copies between such objects overlap.
-
-It breaks the BaseTools build (in the Brotli compression library) with:
-
-> In function 'ProcessCommandsInternal',
-> inlined from 'ProcessCommands' at dec/decode.c:1828:10:
-> dec/decode.c:1781:9: error: 'memcpy' accessing between 17 and 2147483631
-> bytes at offsets 16 and 16 overlaps between 17 and 2147483631 bytes at
-> offset 16 [-Werror=restrict]
-> memcpy(copy_dst + 16, copy_src + 16, (size_t)(i - 16));
-> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-> In function 'ProcessCommandsInternal',
-> inlined from 'SafeProcessCommands' at dec/decode.c:1833:10:
-> dec/decode.c:1781:9: error: 'memcpy' accessing between 17 and 2147483631
-> bytes at offsets 16 and 16 overlaps between 17 and 2147483631 bytes at
-> offset 16 [-Werror=restrict]
-> memcpy(copy_dst + 16, copy_src + 16, (size_t)(i - 16));
-> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Paolo Bonzini <pbonzini@redhat.com> analyzed the Brotli source in detail,
-and concluded that the warning is a false positive:
-
-> This seems safe to me, because it's preceded by:
->
-> uint8_t* copy_dst = &s->ringbuffer[pos];
-> uint8_t* copy_src = &s->ringbuffer[src_start];
-> int dst_end = pos + i;
-> int src_end = src_start + i;
-> if (src_end > pos && dst_end > src_start) {
-> /* Regions intersect. */
-> goto CommandPostWrapCopy;
-> }
->
-> If [src_start, src_start + i) and [pos, pos + i) don't intersect, then
-> neither do [src_start + 16, src_start + i) and [pos + 16, pos + i).
->
-> The if seems okay:
->
-> (src_start + i > pos && pos + i > src_start)
->
-> which can be rewritten to:
->
-> (pos < src_start + i && src_start < pos + i)
->
-> Then the numbers are in one of these two orders:
->
-> pos <= src_start < pos + i <= src_start + i
-> src_start <= pos < src_start + i <= pos + i
->
-> These two would be allowed by the "if", but they can only happen if pos
-> == src_start so they degenerate to the same two orders above:
->
-> pos <= src_start < src_start + i <= pos + i
-> src_start <= pos < pos + i <= src_start + i
->
-> So it is a false positive in GCC.
-
-Disable the warning for now.
-
-Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-Cc: Cole Robinson <crobinso@redhat.com>
-Cc: Liming Gao <liming.gao@intel.com>
-Cc: Paolo Bonzini <pbonzini@redhat.com>
-Cc: Yonghong Zhu <yonghong.zhu@intel.com>
-Reported-by: Cole Robinson <crobinso@redhat.com>
-Contributed-under: TianoCore Contribution Agreement 1.1
-Signed-off-by: Laszlo Ersek <lersek@redhat.com>
-Reviewed-by: Liming Gao <liming.gao@intel.com>
----
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport
- BaseTools/Source/C/Makefiles/header.makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: git/BaseTools/Source/C/Makefiles/header.makefile
-===================================================================
---- git.orig/BaseTools/Source/C/Makefiles/header.makefile
-+++ git/BaseTools/Source/C/Makefiles/header.makefile
-@@ -47,9 +47,9 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT)
- BUILD_CPPFLAGS += $(INCLUDE) -O2
- ifeq ($(DARWIN),Darwin)
- # assume clang or clang compatible flags on OS X
--BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-self-assign -Wno-unused-result -nostdlib -c -g
-+BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-self-assign -Wno-unused-result -nostdlib -c -g
- else
--BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-unused-result -nostdlib -c -g
-+BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -c -g
- endif
- BUILD_LFLAGS = $(LDFLAGS)
- BUILD_CXXFLAGS += -Wno-unused-result