diff options
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch | 42 | ||||
-rw-r--r-- | recipes-bsp/imx-atf/imx-atf_2.4.bb | 2 |
2 files changed, 43 insertions, 1 deletions
diff --git a/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch b/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch new file mode 100644 index 00000000..37b5ce6f --- /dev/null +++ b/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 85f576054a4d5496706bbd37a520942f51cb74b9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
3 | Date: Mon, 16 May 2022 13:45:16 -0500 | ||
4 | Subject: [PATCH] Makefile: Suppress array-bounds error | ||
5 | |||
6 | The array-bounds error is triggered now in cases where it was silent before, | ||
7 | causing errors like: | ||
8 | |||
9 | ``` | ||
10 | plat/imx/imx8m/hab.c: In function 'imx_hab_handler': | ||
11 | plat/imx/imx8m/hab.c:64:57: error: array subscript 0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'} [-Werror=array-bounds] | ||
12 | 64 | #define HAB_RVT_CHECK_TARGET_ARM64 ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x18)) | ||
13 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
14 | ``` | ||
15 | |||
16 | It appears that these new cases will be silenced soon in gcc [1], so for | ||
17 | now just silence the warning locally as a workaround. | ||
18 | |||
19 | [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c39 | ||
20 | |||
21 | Upstream-Status: Inappropriate [other] | ||
22 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
23 | --- | ||
24 | Makefile | 2 +- | ||
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/Makefile b/Makefile | ||
28 | index c87c3ae08..2d6b90f47 100644 | ||
29 | --- a/Makefile | ||
30 | +++ b/Makefile | ||
31 | @@ -346,7 +346,7 @@ WARNINGS += -Wshift-overflow -Wshift-sign-overflow \ | ||
32 | endif | ||
33 | |||
34 | ifneq (${E},0) | ||
35 | -ERRORS := -Werror | ||
36 | +ERRORS := -Werror -Wno-error=array-bounds | ||
37 | endif | ||
38 | |||
39 | CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc \ | ||
40 | -- | ||
41 | 2.17.1 | ||
42 | |||
diff --git a/recipes-bsp/imx-atf/imx-atf_2.4.bb b/recipes-bsp/imx-atf/imx-atf_2.4.bb index dd718289..86dca9dd 100644 --- a/recipes-bsp/imx-atf/imx-atf_2.4.bb +++ b/recipes-bsp/imx-atf/imx-atf_2.4.bb | |||
@@ -9,7 +9,7 @@ PV .= "+git${SRCPV}" | |||
9 | 9 | ||
10 | SRCBRANCH = "lf_v2.4" | 10 | SRCBRANCH = "lf_v2.4" |
11 | SRC_URI = "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \ | 11 | SRC_URI = "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \ |
12 | " | 12 | file://0001-alsa-state-Remove-PCM-devices-mapped-by-5.15-kernel.patch" |
13 | SRCREV = "05f788b9bbb13d002997e35008a4b945f7e2957b" | 13 | SRCREV = "05f788b9bbb13d002997e35008a4b945f7e2957b" |
14 | 14 | ||
15 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |