diff mbox series

[1/1] dpdk: fix builds for 32-bit ARM machines

Message ID 20260728061706.3250521-2-Swati.ShivajiKoli@windriver.com
State New
Headers show
Series dpdk: fix do_configure failure on 32-bit ARM (qemuarm) targets | expand

Commit Message

Swati Koli July 28, 2026, 6:17 a.m. UTC
The get_cpu_instruction_set() function falls back to 'core2' (an x86
microarchitecture) when -march= is not found in CC. For 32-bit ARM
targets the toolchain uses -mcpu= instead of -march=, so the regex
never matches and the invalid x86 fallback is passed to the ARM
cross-compiler:

  arm-wrs-linux-gnueabi-gcc: error: unrecognized -march target: core2

Fix this by applying the same pattern already used for aarch64:
override EXTRA_OEMESON for the 'arm' tune to use the dpdk.cross file
instead of cpu_instruction_set, and set RTE_PLATFORM to
'generic_aarch32' so meson selects the correct 32-bit ARM platform.

Signed-off-by: Swati Koli <Swati.ShivajiKoli@windriver.com>
---
 recipes-extended/dpdk/dpdk.inc | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc
index 6c76a1d..5141a00 100644
--- a/recipes-extended/dpdk/dpdk.inc
+++ b/recipes-extended/dpdk/dpdk.inc
@@ -19,6 +19,7 @@  def get_cpu_instruction_set(bb, d):
 
 EXTRA_OEMESON = " -Dcpu_instruction_set=${@get_cpu_instruction_set(bb, d)}"
 EXTRA_OEMESON:aarch64 = " --cross-file ${WORKDIR}/dpdk.cross"
+EXTRA_OEMESON:arm = " --cross-file ${WORKDIR}/dpdk.cross"
 
 COMPATIBLE_HOST:libc-musl:class-target = "null"
 COMPATIBLE_HOST:linux-gnux32 = "null"
@@ -38,6 +39,7 @@  inherit meson pkgconfig
 INSTALL_PATH = "${prefix}/share/dpdk"
 
 RTE_PLATFORM ?= "generic"
+RTE_PLATFORM:arm = "generic_aarch32"
 
 do_write_config:append() {
     cat >${WORKDIR}/dpdk.cross <<EOF