tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Cross compiling Kernel with all options enabled and compiler wrapper





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


Home | Main Index | Thread Index | Old Index