[PATCH 1/1] dpdk: fix builds for 32-bit ARM machines
Swati Koli <[email protected]> Tue, 28 Jul 2026 06:17:06 +0000
| Newsgroups | org.yoctoproject.lists.yocto-patches |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- recipes-extended/dpdk/dpdk.inc | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.43.0