Created attachment 181298 [details] proposed fix. When using clang compiler to cross compile for arm architecture, it fails to build due to syntax differences in pushsection directive between clang and gcc. Ending in clang complains <inline asm>:1:41: error: expected '%<type>' or "<type>" The simple fix is to use '%' instead of '@' for type specifier. which works on both gcc and clang Attaching a fix
What OS, clang version and CPU is this with?
(In reply to Paul Floyd from comment #1) > What OS, clang version and CPU is this with? This is Yocto, Clang-20 and cross compiling for ARM32 bit Qemu target.
I can reproduce this with Raspberry Pi OS and clang-14 The combination of arm and clang isn't well supported. I also get lots of errors building the regression tests with that combination.
There are still lots of problems (at least with clang-16 and Raspberry Pi OS based on Debian bookworm), especially building testcases. commit 2fa8581c4974db57de80de915d16ce299eb9aa84 (HEAD -> master, origin/master, origin/HEAD) Author: Khem Raj <raj.khem@gmail.com> Date: Wed May 14 09:29:33 2025 -0700 Use portable syntax for pushsection directive in inline assembly '@' does not work with clang inline assembler, but '%' works with both gcc and clang. Therefore use '%' to make it more portable Fixes <inline asm>:1:41: error: expected '%<type>' or "<type>" Signed-off-by: Khem Raj <raj.khem@gmail.com>