BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool
Anton Blanchard
anton at samba.org
Sat Jan 21 12:03:39 AEDT 2017
Hi,
We added:
BUILD_BUG_ON(!__builtin_constant_p(feature))
to cpu_has_feature() and mmu_has_feature() in order to catch usage
issues (such as cpu_has_feature(cpu_has_feature(X)). Unfortunately LLVM
isn't smart enough to resolve this, and it errors out.
I work around it in my clang/LLVM builds of the kernel, but I have just
discovered that it causes a lot of issues for the bcc (eBPF) trace tool
(which uses LLVM).
How should we work around this? Wrap the checks in !clang perhaps?
Anton
More information about the Linuxppc-dev
mailing list