Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a Linux distro compiled with clang/llvm? It looks like as of late 2010 the kernel was working. If not, would it be more likely to be a technical or licensing issue?

share|improve this question

migrated from serverfault.com Aug 3 '11 at 12:55

This question came from our site for professional system and network administrators.

    
I don't know of any that are. I think most Linux distros use GCC, supporting software with common licenses and one built specifically to handle GNU code. Clang is currently being embraced by the BSD community for similar reasons. (The proceeding is a huge simplification of political and technical problems) –  Chris S Aug 3 '11 at 12:53
3  
For further information on this related post: Is it possible to compile a full Linux system with Intel's compiler instead of GCC? –  Caleb Aug 3 '11 at 13:05
2  
@James Please don't edit the answer into the question; you can post an actual answer below and mark it accepted. Also, if you register on SF you should automatically take ownership of the question here –  Michael Mrozek Aug 3 '11 at 16:09

3 Answers 3

As a late response to this question, what @jmtd said is exactly what happens periodically in the Debian archive.

Packages are recompiled with newer toolchains (compilers, linkers, etc.) and, when recompilation fails, bugs against the packages that failed to be compiled are filed with the indication of FTBFS ("failed to build from source").

Such bugs are generally an indication of something bad happening and are usually ranked with high severity and given the status of "release critical" bugs, meaning that a new release can't be done with those bugs unsolved.

In particular, Lucas Nussbaum has been recompiling the whole archive of the Debian Project in a grid as a means of some Quality Assessment.

Recently, though, Sylvestre Ledru and some other Debian Developers have mentored students in Google's Summer of Code of 2012 to allow substitution of both GCC by Clang and libstdc++ (GCC's support library for C++) by libc++ (Clang/LLVM's counterpart).

There is a site where the results of compilation of the whole collection of Debian packages were published and further reports were documented by LWN and the program for decoupling the Debian build process from GCC was successfully concluded.

So we may soon see a flavour of Debian compiled with clang/llvm, depending on how much support these successful results can gain.

share|improve this answer

Whilst the end-user binaries are not built with clang/llvm, most of the Debian archive has been built (and rebuilt) with clang/llvm (and binutils-gold and other bits and pieces) by people who want to expose portability bugs in the software suite (and the compilers themselves).

share|improve this answer
    
Aren't end-user binaries part of the Debian archive? –  Tshepang Aug 12 '11 at 7:15
    
Yes, and those are built with gcc. Separately from the end-user binaries, the source packages are rebuilt as part of multiple continuous-integration processes, some of which use alternative compiler/linker/libc toolchains. –  jmtd Aug 30 '11 at 15:23

Not yet. According to this currently open bug report it seems even the kernel itself fails to compile.

share|improve this answer
    
The bug report contains an entry at the end linking to the LLVM Linux project by Bryce Lelback. Bryce is the same person who started the Oct 2010 discussion thread Clang builds a working Linux Kernel (Boots to RL5 with SMP, networking and X, self hosts) That thread is the source for the "kernel was working" quote in my question. I will keep an eye on the lll-project. –  user9570 Aug 3 '11 at 15:02
    
@James One more reminder since you mentioned accepting: if you register on SF with the same OpenID you used here, you should be able to accept an answer here –  Michael Mrozek Aug 3 '11 at 22:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.