summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-07-23 11:22:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-10 11:14:11 +0100
commitffc49508d227530b23930f31430faba1c9bd1daa (patch)
tree63f1dd02629f4f9389e2ac46215a92233d5d199f /meta/recipes-core
parent785bdf6555d25c58ca3e0244bd732a7f91d5f2ff (diff)
downloadpoky-ffc49508d227530b23930f31430faba1c9bd1daa.tar.gz
ovmf: Fix VLA warnings with GCC 11
(From OE-Core rev: 5406ce83e07c3f89b9f2bb26f083861467b7bc59) (From OE-Core rev: 5a02a56d3e0c88626418391b8d4253f7cee4c38c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch51
-rw-r--r--meta/recipes-core/ovmf/ovmf_git.bb3
2 files changed, 53 insertions, 1 deletions
diff --git a/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch b/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch
new file mode 100644
index 0000000000..d658123b81
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch
@@ -0,0 +1,51 @@
1From 498627ebda6271b59920f43a0b9b6187edeb7b09 Mon Sep 17 00:00:00 2001
2From: Adrian Herrera <adr.her.arc.95@gmail.com>
3Date: Mon, 22 Mar 2021 21:06:47 +0000
4Subject: [PATCH] Fix VLA parameter warning
5
6Make VLA buffer types consistent in declarations and definitions.
7Resolves build crash when using -Werror due to "vla-parameter" warning.
8
9Upstream-Status: Submitted [https://github.com/google/brotli/pull/893]
10Signed-off-by: Adrian Herrera <adr.her.arc.95@gmail.com>
11---
12 c/dec/decode.c | 6 ++++--
13 c/enc/encode.c | 5 +++--
14 2 files changed, 7 insertions(+), 4 deletions(-)
15
16diff --git a/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c b/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c
17index 114c505..bb6f1ab 100644
18--- a/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c
19+++ b/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c
20@@ -2030,8 +2030,10 @@ static BROTLI_NOINLINE BrotliDecoderErrorCode SafeProcessCommands(
21 }
22
23 BrotliDecoderResult BrotliDecoderDecompress(
24- size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size,
25- uint8_t* decoded_buffer) {
26+ size_t encoded_size,
27+ const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)],
28+ size_t* decoded_size,
29+ uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]) {
30 BrotliDecoderState s;
31 BrotliDecoderResult result;
32 size_t total_out = 0;
33diff --git a/c/enc/encode.c b/c/enc/encode.c
34index 68548ef..ab0a490 100644
35--- a/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c
36+++ c/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c
37@@ -1470,8 +1470,9 @@ static size_t MakeUncompressedStream(
38
39 BROTLI_BOOL BrotliEncoderCompress(
40 int quality, int lgwin, BrotliEncoderMode mode, size_t input_size,
41- const uint8_t* input_buffer, size_t* encoded_size,
42- uint8_t* encoded_buffer) {
43+ const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)],
44+ size_t* encoded_size,
45+ uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]) {
46 BrotliEncoderState* s;
47 size_t out_size = *encoded_size;
48 const uint8_t* input_start = input_buffer;
49--
502.31.1
51
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index 088e348bdc..a73bb916b0 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -17,7 +17,8 @@ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \
17 file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ 17 file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
18 file://0003-ovmf-enable-long-path-file.patch \ 18 file://0003-ovmf-enable-long-path-file.patch \
19 file://0004-ovmf-Update-to-latest.patch \ 19 file://0004-ovmf-Update-to-latest.patch \
20 " 20 file://0001-Fix-VLA-parameter-warning.patch \
21 "
21 22
22PV = "edk2-stable202008" 23PV = "edk2-stable202008"
23SRCREV = "06dc822d045c2bb42e497487935485302486e151" 24SRCREV = "06dc822d045c2bb42e497487935485302486e151"