Comment 72 for bug 1926938

Revision history for this message
DanglingPointer (ferncasado) wrote :

@tlk,- Ignorance doesn't mean knowledge, it is quite the opposite...

DKMS doesn't break because of headers when using clang with lto. The headers are there and complete! Everything complete with well produced binaries from LLVM/Clang.

The problem is because programs (not the headers and not the kernel) dynamically re-compilling off-tree modules, e.g.: the guest additions of Virtualbox; uses GCC with the exact same build configuration as the Kernel. i.e. the LLVM/Clang with LTO build process; thus it uses compile options used with LLVM/CLang e.g. -flto=thin (there are others); that are not compatible with GCC with GCC! Then it fails obviously because GCC has no idea what to do with those options.

The Linux kernel, header, dbg, etc; all of it is perfectly made and approved by the Linux kernel team and forms part of the official kernel build documentation.
see here: https://www.kernel.org/doc/html/latest/kbuild/llvm.html

Not all DKMS enabled programs fail, and there's a way to fix the compile configuration, just that it is a lot of hoops to do and each build or distro environment upgrade could overwrite the config since DKMS is a distro responsibility and not Linus's when approving Linux versions. Distro upgrades don't overwrite the kernel.

As for Clang vs GCC...
https://www.phoronix.com/scan.php?page=article&item=clang12-gcc11-icelake&num=6

Also I have computers, servers, IoT devices all over the place and only 1 of them is zen3; most of them are ivybridge and the oldest is a penryn (core2 duo!)
There is no penryn architecture option in GCC and misses out on SSE4, SSE4.1
This is what GCC offers:
MMX, SSE, SSE2, SSE3 and SSSE3
https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html

Your statement is fake news. show me benchmarks where GCC built programs are faster than CLANG-12 otherwise you are spreading rubbish and telling people to use linux with missing or broken headers. I can only think of one where GCC beat Clang-12 and that's Python 3.9.6.