TuxML / tuxml

The main repository of the TuxML project contains the scripts for building Linux kernel configurations in the large.
Apache License 2.0
4 stars 2 forks source link

clang compiler support for TuxML #36

Open FAMILIAR-project opened 3 years ago

FAMILIAR-project commented 3 years ago

Instead of considering the gcc compiler, we'd like to consider clang. What's missing is a complete support of clang in TuxML. In particular, we would like to compile random configurations with clang (over any kernel version). It's challenging as the maturity of clang for the Linux kernel certainly differs than for gcc. More details about the motivation here: https://www.youtube.com/watch?v=FFjV9f_Ub9o&t=10747s We should experiment and report on our endeavour.

alxvqold commented 3 years ago

I've started to implement Clang support in TuxML, but I won't have the time to continue working on it.

Kernel compilation only works for Clang 9+, i.e. the Clang versions that are available in Debian 11 Bullseye's repositories (packages clang-9 for Clang 9 and clang for Clang 11). That means that the compilations are done in the tuxml-gcc10 Docker image.

For now what I've done:

For now, the only way to use Clang is to call main.py from inside the tuxml-gcc10 Docker image with the --clang_version parameter set to 9 or 11. The compilation's metadata have not been updated, and won't contain the Clang version. Instead the installed GCC version is showed.

These changes are added in the pull request #55.

To sum up, here is what has been done and what are the remaining tasks to have a Clang support in TuxML:

acherm commented 3 years ago

Thanks! Does clang-9 and clang already there in the Docker image tuxml-gcc10? I guess no.

Can you write a small step-by-step tutorial on how to use your clang implementation and build a kernel? It would make it more actionable all explanations above.

alxvqold commented 3 years ago

Packages clang and clang-9 are installed with other dependencies when building the Docker images.

What I have done to use Clang is to: