|« java-package: Replacement of sun-java6||Major changes in the Debian HDF5 packages »|
Rebuild of the Debian archive with clang
Recently, I have been working on a side project for Debian. The goal was to rebuild of the Debian archive (the distribution) with clang, a new C/C++ compiler.
clang is now ready to build software for production (either for C, C++ or Objective-C). This compiler is providing many more warnings and interesting errors than the gcc suite while not carrying the same legacy as gcc.
This rebuild has several goals. The first one is to prove (or not) that clang is a viable alternative. Second, building a software with different compilers improves the overall quality of code by providing different checks and alerts.
The result are detailed and explained here:
When I had the idea to rebuild Debian with a new compiler, I was expecting many issues and bugs caused by clang but I have been surprised to notice that most of the issues are either difference in C standard supported, difference of interpretation or corner cases.
My personal opinion is that clang is now stable and good enough to rebuild most of the packages in the Debian archive, even if many of them will need minor tweaks to compile properly.
In the next few years, coupled with better static analysis tools, clang might replace gcc/g++ as the C/C++ compiler used by default in Linux and BSD distributions.
The clang developers are progressing very fast: 14.5% of the packages were failing with version 2.9 against 8.8% with version 3.0.
Several major steps in the clang adoptions have been made like chromium/chrome being built by default with clang, Xcode providing clang by default, FreeBSD working on the gcc -> clang switch, etc.
However, on the Debian point of view, one of the important step would be to make sure that clang manages all the Debian architecture/kernel (11 official, 6 unofficial)
There are Google, academic, etc contributing on a daily bases...
For example, I didn't have issues to see my patches applied quickly (even the one for HURD).
I hope clang not become a default compiler in linux distros. Do you know why BSD want to propose clang? They are hate GNU GPL license, thats it. There is no other real reason why do they refused to use gcc in their system. They can't understand, that GPL is good for both developers and users, while BSD good only for companies.
I am trying to find (OCaml) packages with error and it will be useful to have all the problematic packages on the same pages, whatever their error is.
with clang 2.9
Also, per-package web pages and (poking Paul Wise to add) links from packages.qa.debian.org summary pages would be awesome.
You get all of this for free.
You get CUPS for free. Nothing is stopping any Distribution of Linux to pair up the quality of CUPS with that of Apple.
Another question: what architecture you was using? amd64? How about i386? It should be equally easy (in terms of access to building virtual machines), and when considering metrics like package (binary) sizes changes beetween clang and gcc, it can give better insight into any changes.