Skip to contentSkip to conversation

config/arm: fix 32-bit cross compile with latest GCC

PATCH Applied Bruce Richardson 3 participants 3 messages Jan 14 – Jan 28

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config/arm: fix 32-bit cross compile with latest GCC

When building for 32-bit arm with GCC versions >=11 and using the DPDK-provided cross-file, the initial configuration step fails The error given is:

config/meson.build:189:8: ERROR: Problem encountered: \
Compiler does not support "armv8-a" arch flag.

but the real problem is actually an fpu-related error which is explained in the meson log file:

cc1: error: '-mfloat-abi=hard': selected architecture lacks an FPU

This error can be fixed by specifying an fpu explicitly, and a number of options will work, e.g. -mfpu=neon, -mfpu=fp-armv8. Choosing the latter here to avoid mandating neon by default.

Fixes e754875c296c ("config/arm: add aarch32 cross-compilation")

---
This patch should fix errors seen in the CI when building for 32-bit arm on Ubuntu 24.04 and later. CI systems running older Ubuntu using GCC 9 do not show this error, which is why it hasn't been an issue till recently.

---
 config/arm/arm32_armv8_linux_gcc | 3 +++
 1 file changed, 3 insertions(+)
config/arm/arm32_armv8_linux_gcc +3 -0
index abcb182b16..231c9ac7a7 100644
@@ -13,5 +13,8 @@ cpu_family = 'aarch32'
 cpu = 'armv8-a'
 endian = 'little'
 
+[built-in options]
+c_args = '-mfpu=fp-armv8'
+
 [properties]
 platform = 'generic_aarch32'
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Bruce Richardson

When building for 32-bit arm with GCC versions >=11 and using the DPDK-provided cross-file, the initial configuration step fails The error given is:

config/meson.build:189:8: ERROR: Problem encountered: \
Compiler does not support "armv8-a" arch flag.

but the real problem is actually an fpu-related error which is explained in the meson log file:

cc1: error: '-mfloat-abi=hard': selected architecture lacks an FPU

Quoted 8 lines

This error can be fixed by specifying an fpu explicitly, and a number of options will work, e.g. -mfpu=neon, -mfpu=fp-armv8. Choosing the latter here to avoid mandating neon by default.

Fixes e754875c296c ("config/arm: add aarch32 cross-compilation")
Quoted 23 lines

---
This patch should fix errors seen in the CI when building for 32-bit arm on Ubuntu 24.04 and later. CI systems running older Ubuntu using GCC 9 do not show this error, which is why it hasn't been an issue till recently.

---
  config/arm/arm32_armv8_linux_gcc | 3 +++
  1 file changed, 3 insertions(+)
config/arm/arm32_armv8_linux_gcc +3 -0
index abcb182b16..231c9ac7a7 100644
@@ -13,5 +13,8 @@ cpu_family = 'aarch32'
  cpu = 'armv8-a'
  endian = 'little'
 
+[built-in options]
+c_args = '-mfpu=fp-armv8'
+
  [properties]
  platform = 'generic_aarch32'
#2 lore raw

14/01/2026 18:37, Wathsala Vithanage:

Quoted 18 lines · Bruce Richardson
Quoted 16 lines

When building for 32-bit arm with GCC versions >=11 and using the DPDK-provided cross-file, the initial configuration step fails The error given is:

config/meson.build:189:8: ERROR: Problem encountered: \
Compiler does not support "armv8-a" arch flag.

but the real problem is actually an fpu-related error which is explained in the meson log file:

cc1: error: '-mfloat-abi=hard': selected architecture lacks an FPU

This error can be fixed by specifying an fpu explicitly, and a number of options will work, e.g. -mfpu=neon, -mfpu=fp-armv8. Choosing the latter here to avoid mandating neon by default.

Quoted 6 lines
Quoted 4 lines
Fixes e754875c296c ("config/arm: add aarch32 cross-compilation")

Applied, thanks.