(In reply to Aaron Puchert from comment #10) > Headers are to my understanding only used for data layout, because > functions could contain inline assembly, which doesn't work in BPF. Though > it's an interesting question: what if a header file uses inline assembly in > inline functions? BPF doesn't have (?) inline assembly, or at least > different constraints than the bare metal target. Since invalid constraints > are being diagnosed in the frontend, it would complain about them even if > the function isn't being used and thus emitted. Hmm, it could also be that kernel headers are being parsed under the native target, since the data layout depends on that to some extent. Then maybe this concern is void and we're only running into this because Clang/LLVM doesn't support this particular constraint on ppc64le. (In reply to Michal Suchanek from comment #6) > Instead of checking CC_IS_CLANG which is kernel-specific and not defined > when the header is used by userspace it should check some define that is > provided by clang compiler itself. It could use __clang__. Or bcc could (as a dirty hack) define CC_IS_CLANG.