On Sun, Jan 26, 2025 at 10:57 AM Uros Bizjak wrote: > > On Sat, Jan 25, 2025 at 11:09 PM Linus Torvalds > wrote: > > > > On Fri, 24 Jan 2025 at 16:22, Andrew Morton wrote: > > > > > > Linus, please merge the MM updates for the 6.14 development cycle, > > > > This does not build at all for me. > > > > I get > > > > ./arch/x86/include/asm/current.h:49:9: error: call to undeclared > > function '__typeof_unqual__'; ISO C99 and later do not support > > implicit function declarations [-Wimplicit-function-declaration] > > > > when running the Rust 'bindgen', and what seems to be going on is that > > my version of *gcc* does support __typeof_unqual__, so I end up with > > > > CONFIG_CC_HAS_TYPEOF_UNQUAL=y > > > > in my kernel config, but I think that 'bindgen' that generates the > > Rust bindings is based on LLVM, and clearly does not understand > > __typeof_unqual__ is available in Clang 19.1.0 in all C modes as an > extension [1] and as reported in [2], bindgen 0,70.1 seems to parse > __typeof_unqual__ okay. > > [1] https://releases.llvm.org/19.1.0/tools/clang/docs/ReleaseNotes.html > [2] https://lore.kernel.org/lkml/9fa81826-8fa6-47e4-a0a2-4916e5d042a7@stanley.mountain/ > > Maybe configure could detect bindgen version and disable > CC_HAS_TYPEOF_UNQUAL [3] if it is too old? bindgen ChangeLog does not mention __typeof_unqual__, so I assume that the support depends on RUSTC_LLVM_VERSION. Does the attached incremental patch work for you? Uros.