summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-03-13 22:05:35 -0700
committerKhem Raj <raj.khem@gmail.com>2023-03-13 22:05:35 -0700
commitfe73377ee96117986404e0920bd4710225baf6db (patch)
tree1fa99b361aefa63dc67129fff919a5265c1ba9b5 /recipes-extended
parent7e36025b115ef3221b2026bd432b572b8a5b76fd (diff)
downloadmeta-freescale-fe73377ee96117986404e0920bd4710225baf6db.tar.gz
dpdk_19.11-20.12.bb: Fix build with gcc-12
Backport relevant fix from upstream dpdk Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/dpdk/dpdk/0001-examples-fix-Arm-build-with-GCC-12.patch49
-rw-r--r--recipes-extended/dpdk/dpdk_19.11-20.12.bb1
2 files changed, 50 insertions, 0 deletions
diff --git a/recipes-extended/dpdk/dpdk/0001-examples-fix-Arm-build-with-GCC-12.patch b/recipes-extended/dpdk/dpdk/0001-examples-fix-Arm-build-with-GCC-12.patch
new file mode 100644
index 00000000..b73b3a96
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk/0001-examples-fix-Arm-build-with-GCC-12.patch
@@ -0,0 +1,49 @@
1From 229fc129be85a4d2d2c4efddae7bb97c3d87d416 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Mar 2023 22:02:01 -0700
4Subject: [PATCH] examples: fix Arm build with GCC 12
5
6GCC-12 warns when a pointer of type union points to an array of same
7defined size, as union internally gets paded with pad bytes.
8
9 ../examples/common/neon/port_group.h:42:21: error: array subscript
10 'union <anonymous>[0]' is partly outside array bounds of
11 'uint16_t[5]' {aka 'short unsigned int[5]'}
12 [-Werror=array-bounds]
13 42 | pnum->u64 = gptbl[v].pnum;
14 | ^~
15 ../examples/common/neon/port_group.h:21:23: note: object 'pn' of
16 size [0, 10]
17 21 | port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1
18 | ~~~~~~~~~^~~~~~~~~~~~~~~
19 ../examples/common/neon/port_group.h:43:21: error: array subscript
20 'union <anonymous>[0]' is partly outside array bounds of
21 'uint16_t[5]' {aka 'short unsigned int[5]'} [-Werror=array-bounds]
22 43 | pnum->u16[FWDSTEP] = 1;
23 | ^~
24
25Fixes: 732115ce38c6 ("examples/l3fwd: move packet group function in common")
26
27Upstream-Status: Backport [https://github.com/DPDK/dpdk/commit/b269bd630e96b276a69d698e13ad9ebfbbb67512]
28Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30---
31 examples/l3fwd/l3fwd_neon.h | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-)
33
34diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
35index 86ac5971d7..dc73e9fef7 100644
36--- a/examples/l3fwd/l3fwd_neon.h
37+++ b/examples/l3fwd/l3fwd_neon.h
38@@ -77,7 +77,7 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1,
39 union {
40 uint16_t u16[FWDSTEP + 1];
41 uint64_t u64;
42- } *pnum = (void *)pn;
43+ } __rte_packed *pnum = (void *)pn;
44
45 int32_t v;
46 uint16x8_t mask = {1, 2, 4, 8, 0, 0, 0, 0};
47--
482.39.2
49
diff --git a/recipes-extended/dpdk/dpdk_19.11-20.12.bb b/recipes-extended/dpdk/dpdk_19.11-20.12.bb
index e974eba0..b14d4fbf 100644
--- a/recipes-extended/dpdk/dpdk_19.11-20.12.bb
+++ b/recipes-extended/dpdk/dpdk_19.11-20.12.bb
@@ -8,6 +8,7 @@ SRC_URI = "git://github.com/nxp-qoriq/dpdk;protocol=https;nobranch=1 \
8 file://0001-add-Wno-cast-function-type.patch \ 8 file://0001-add-Wno-cast-function-type.patch \
9 file://0001-Add-RTE_KERNELDIR_OUT.patch \ 9 file://0001-Add-RTE_KERNELDIR_OUT.patch \
10 file://0005-use-python3-instead-of-python.patch \ 10 file://0005-use-python3-instead-of-python.patch \
11 file://0001-examples-fix-Arm-build-with-GCC-12.patch \
11" 12"
12SRCREV = "7071c27f6f5aefb57de1cffab3484707b1e82e2b" 13SRCREV = "7071c27f6f5aefb57de1cffab3484707b1e82e2b"
13 14