[llvmlinux] Small patch for objtool to compile with clang
Lukas Bulwahn
lukas.bulwahn at gmail.com
Thu Dec 21 19:43:59 UTC 2017
Hi,
I am compiling the linux kernel with clang and building upon all your work
that has already been merged upstream. My ultimate goal is to be able to
run Facebook's static analysis tool Infer (http://fbinfer.com) on the
complete kernel source code and identify potential issues in the kernel
source code. That goal is quite ambitious, so I will see how far I will
get and I will just start addressing the issues that I encounter and
provide the patches upstream (to lkml and the infer development team), so
that the next person trying to do that is in a bit better position to
achieve the goal than I will be.
Starting this activity, I tried to compile the most recent Linux kernel,
i.e., very current tags of linux-next, e.g., next-20171220, in a Docker
container that only contained clang-5.0, but not gcc. During the build,
clang complains once in the the build of the kernel tool objtool; so I
quickly created a patch to repair that issue.
You can find the patch here:
https://patchwork.kernel.org/patch/10103977/
If you could test and confirm that this patch in fact solves an issue with
compiling the kernel with clang, it will certainly help to get this patch
accepted upstream and included in mainline quickly.
Thanks for your work to get clang and the kernel ready for my goal.
Best regards,
Lukas
More information about the LLVMLinux
mailing list