summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch')
-rw-r--r--recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch47
1 files changed, 0 insertions, 47 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
deleted file mode 100644
index c7ace225..00000000
--- a/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 85f576054a4d5496706bbd37a520942f51cb74b9 Mon Sep 17 00:00:00 2001
2From: Tom Hochstein <tom.hochstein@nxp.com>
3Date: Mon, 16 May 2022 13:45:16 -0500
4Subject: [PATCH] Makefile: Suppress array-bounds error
5
6The array-bounds error is triggered now in cases where it was silent
7before, causing errors like:
8
9```
10plat/imx/imx8m/hab.c: In function 'imx_hab_handler':
11plat/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
16The error is a false-positive and is entered as a bug [1]. The problem
17is fixed partially in GCC 12 and fully in GCC 13 [2].
18
19The partial fix does not work here because the constant addresses used
20are less than the 4kB boundary chosen for the partial fix, so suppress
21the error until GCC is upgraded to 13.
22
23[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
24[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c39
25
26Upstream-Status: Inappropriate [other]
27Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
28---
29 Makefile | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32diff --git a/Makefile b/Makefile
33index c87c3ae08..2d6b90f47 100644
34--- a/Makefile
35+++ b/Makefile
36@@ -346,7 +346,7 @@ WARNINGS += -Wshift-overflow -Wshift-sign-overflow \
37 endif
38
39 ifneq (${E},0)
40-ERRORS := -Werror
41+ERRORS := -Werror -Wno-error=array-bounds
42 endif
43
44 CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc \
45--
462.17.1
47