Re: Cross compiling Kernel with all options enabled and compiler wrapper
Jörg Sonnenberger <[email protected]> Thu, 10 Jul 2025 11:22:50 +0200
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
On 7/10/25 2:16 AM, Nando Schenk wrote: > For this, I want to compile the NetBSD kernel with all options enabled > so that there is as much as possible to analyze (akin to the > allyesconfig for Linux). I was able to compile the kernel (including > userland) on my Linux machine using build.sh, but I am still not > completely understanding how the build process works. Note that some options may be mutually exclusive and some code paths are alternatives, so a single configuration will not give full coverage even for a specific platform. > Also, I need the compiler to give me an intermediate representation of > the kernel for the tools that I want to test. This can be accomplished > by gllvm, which means the toolchain needs to use a compiler wrapper > instead of the freshly built clang directly. As far as I understand it, > build.sh needs to be modified in order to use a different binary as the > clang compiler. Would the compilation database be good enough? https://www.netbsd.org/~joerg/json.diff is an old patch to automatically create fragments during compilation. A full compilation db file can be obtained from that with minimal post-processing. Joerg