diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-05-28 10:12:41 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-06 09:59:15 +0100 |
commit | 29f6c2139a80506b689634ee53f90d363aece38e (patch) | |
tree | 5c40585253e552cb1596771ad59307a43890c6ae /meta/recipes-core | |
parent | 8e7241788566d50e02681225fcc77f495635f8bc (diff) | |
download | poky-29f6c2139a80506b689634ee53f90d363aece38e.tar.gz |
ovmf: Fix VLA warnings with GCC 11
(From OE-Core rev: 811ce3e6fa51ff615b7f81126d0611ba30408c85)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5406ce83e07c3f89b9f2bb26f083861467b7bc59)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.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.patch | 51 | ||||
-rw-r--r-- | meta/recipes-core/ovmf/ovmf_git.bb | 1 |
2 files changed, 52 insertions, 0 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 @@ | |||
1 | From 498627ebda6271b59920f43a0b9b6187edeb7b09 Mon Sep 17 00:00:00 2001 | ||
2 | From: Adrian Herrera <adr.her.arc.95@gmail.com> | ||
3 | Date: Mon, 22 Mar 2021 21:06:47 +0000 | ||
4 | Subject: [PATCH] Fix VLA parameter warning | ||
5 | |||
6 | Make VLA buffer types consistent in declarations and definitions. | ||
7 | Resolves build crash when using -Werror due to "vla-parameter" warning. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/google/brotli/pull/893] | ||
10 | Signed-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 | |||
16 | diff --git a/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c b/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c | ||
17 | index 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; | ||
33 | diff --git a/c/enc/encode.c b/c/enc/encode.c | ||
34 | index 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 | -- | ||
50 | 2.31.1 | ||
51 | |||
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb index 896b3b6320..9a1bfbd69c 100644 --- a/meta/recipes-core/ovmf/ovmf_git.bb +++ b/meta/recipes-core/ovmf/ovmf_git.bb | |||
@@ -17,6 +17,7 @@ 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://0004-ovmf-Update-to-latest.patch \ | 18 | file://0004-ovmf-Update-to-latest.patch \ |
19 | file://zero.patch \ | 19 | file://zero.patch \ |
20 | file://0001-Fix-VLA-parameter-warning.patch \ | ||
20 | " | 21 | " |
21 | 22 | ||
22 | PV = "edk2-stable202102" | 23 | PV = "edk2-stable202102" |