Re: LLVM 21 compatibility issue with swab.h

From: Thomas Weißschuh

Date: Fri May 29 2026 - 02:08:33 EST


Hi Theron,

On 2026-05-29 00:23:09-0500, Theron York wrote:
> Building Linux kernel 7.0.6 on Gentoo with LLVM  fails:
>   error: unknown type name '__attribute_const__'
>
> Setup:
> - Gentoo Linux
> - LLVM 21 (clang)
> - musl libc
> - x86_64
>
> Workaround:
>   sed -i 's/__attribute_const__/__attribute__((const))/g'
> ./include/uapi/linux/swab.h

can you post all the commands you are executing from a clean source
checkout *and* the full error message?
That will make it much easier to help you.


Thomas