On Fri, 30 Aug 2024 14:03, Alex Bennée <alex.ben...@linaro.org> wrote:
[.snip.]

It is there:

 /usr/lib/llvm-14/lib/clang/14.0.6/include/stdatomic.h

in the search path:

 clang -E -Wp,-v -
 clang -cc1 version 14.0.6 based upon LLVM 14.0.6 default target 
x86_64-pc-linux-gnu
 ignoring nonexistent directory 
"/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include"
 ignoring nonexistent directory "/include"
 #include "..." search starts here:
 #include <...> search starts here:
  /usr/lib/llvm-14/lib/clang/14.0.6/include
  /usr/local/include
  /usr/include/x86_64-linux-gnu
  /usr/include
 End of search list.

but not in the list above. Have we told clang not to include system
search paths in the bindgen invocation?

stdatomic.h was first included in c11, and compilers already shipped the header on their own (since they use builtin operations). The compiler header paths are considered special system header paths by compilers, and what's happening here is a bug in the manual searching logic in libclang like explained in the other replies. The bindgen invocation looks at system search paths otherwise, or it'd fail to find headers used in QEMU.

Reply via email to