Hi,
do you guys know any benchmarks that allow me to get some reports how gcc vs. clang compiled kernel performs ?
Does this sounds legit ? https://github.com/intel/lkp-tests
I never tried LKP myself, but it looks promising. Seeing a comparison table of GCC+BFD, GCC+LLD, Clang+BFD, Clang+LLD would be really cool.
As for correctness testing, there is a project called LTP. Right now we only check that kernel compiles and boots, but not testing individual syscalls. Would be good to run LTP on all four combinations and compare the results (they should be identical, but I believe that nobody really tested it yet).
There were some benchmarks on Phoronix recently with a 3900x and a 9900K : https://www.phoronix.com/scan.php?page=article&item=clang-linux-53&num=1
Hackbench on the 9900K showed the most some significant differences between a GCC and a Clang compiled kernel.
Linux kernel compile benchmark from Thorsten Leemhuissounds promising.
It supports building with LLVM=1.
Version 0.9.0 to be released next week.
I asked for benchmark numbers with Linux v5.7 (see kcbench issue Benchmark numbers for Linux v5.7)
Sorry, I am busy with some other stuff and my workstation with sandybridge-cpu is not that powerful.
Can someone look into [2] and try kcbench with --add-make-args 'LD=ld.lld'?
You can set the target/host compiler via --cc <compiler>and --hostcc <compiler>.
As an example: Is the combination clang-10 and ld.lld-10 working?
And report back to Thorsten?
Thanks!
Most helpful comment
Linux kernel compile benchmarkfromThorsten Leemhuissounds promising.It supports building with
LLVM=1.Version
0.9.0to be released next week.I asked for benchmark numbers with
Linux v5.7(seekcbenchissue Benchmark numbers for Linux v5.7)