[PATCH 0/2] Fix AArch32 compilation with Clang

Dmitrii Sharshakov d3dx12.xx at gmail.com
Sat Nov 1 10:39:57 CET 2025


I faced some minor compatibility issues when choosing Clang as the cross-compiler for my target.

Please review these two fixes, aiming at enabling Clang-based builds (still using GNU binutils)
for 32-bit ARM targets.

Tested to fix build with (also run-tested on qemu arm and arm64 with clang):

make ARCH=arm HOSTCC=clang CROSS_COMPILE=arm-none-eabi- CC=clang imx6ulz_smm_m2b_defconfig
make ARCH=arm HOSTCC=clang CROSS_COMPILE=arm-none-eabi- CC=clang -j20

Thank you!

Best regards,
Dmitrii

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx at gmail.com>
---
Dmitrii Sharshakov (2):
      arch: arm: build: only set -mgeneral-regs-only for AArch64
      build: fix building u-boot.lds with Clang as a cross-compiler

 Makefile           | 1 +
 arch/arm/config.mk | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
---
base-commit: 62b45e82bdbf703571450e97f605893fe0d50530
change-id: 20251101-clang-fixes-cc08019c352a

Best regards,
-- 
Dmitrii Sharshakov <d3dx12.xx at gmail.com>



More information about the U-Boot mailing list