Slashdot Mirror


FreeBSD 10 To Use Clang Compiler, Deprecate GCC

An anonymous reader writes "Shared in last quarter's FreeBSD status report are developer plans to have LLVM/Clang become the default compiler and to deprecate GCC. Clang can now build most packages and suit well for their BSD needs. They also plan to have a full BSD-licensed C++11 stack in FreeBSD 10." Says the article, too: "Some vendors have also been playing around with the idea of using Clang to build the Linux kernel (it's possible to do with certain kernel configurations, patches, and other headaches)."

7 of 711 comments (clear)

  1. Re:What's wrong with GCC? by jps25 · · Score: 5, Informative

    The GPL.

  2. Re:What's wrong with GCC? by bonch · · Score: 5, Informative

    Clang and FreeBSD aren't proprietary software. They're BSD-licensed open source. That code doesn't magically disappear when a company uses it.

  3. Re:What's wrong with GCC? by BasilBrush · · Score: 5, Informative

    Avoiding te GPL is the main reason. But Clang also has many technical superiorities to GCC too. Wikipedia gives a quick outline of them.
    http://en.wikipedia.org/wiki/Clang

  4. Re:What's wrong with GCC? by ommerson · · Score: 5, Informative

    One of the key design objectives of Clang is that it is highly modular, and implemented in such a way that various compilation stages are self-contained, and have clean APIs and data structures. This allows development tools such as IDEs to link directly against the stages of the compilation pipeline then need to implement syntax highlighting, code completion, refactoring tools and so on.

    Apple's XCode does precisely this, and licensing and lack of modularity in the GCC source tree would have been major factors in their choice to support Clang and LLVM development.

    The traditional way of implementing these functions in IDEs has been to effectively re-implement the front-end of the compiler (often not completely). This is a big deal when developing in C++ against the STL/Boost/TR1 when you find that code completion can't grok template properly. This is something that XCode and Visual Studio (which takes a similar approach) are both capable of doing.

  5. Re:Dropping the GPL ~= worse. by mister_playboy · · Score: 5, Informative

    There's a reason even the shining monument of GPL (Linux) uses GPLv2...

    Even if Linus did want to move the kernel to GPLv3 (he doesn't), he would have to get every kernel contributor to agree to the license change, AFAIK.

    --
    Do what thou wilt shall be the whole of the Law ::: Love is the law, love under will
  6. Re:What's wrong with GCC? by zixxt · · Score: 5, Informative

    1) It compiles slower than clang at -O0
    2) It produces slower code than clang at -O3 and -Os
    3) It's error and warning messages are not as good
    4) It's not as modular as clang, which can be used in parts, to produce useful tools like CSA
    5) The GPL.

    Got facts to back this up? Every benchmark I have seen as showed GCC producing faster code than Clang on 90% of the time, Phoronix benchmarks has in the last week showed this to be true.

    --
    ---- GENERATION 26: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
  7. Re:Dropping the GPL ~= worse. by jbolden · · Score: 5, Informative

    We don't have to guess which model works best, at this point we have historical data. Your model failed with respect to X. MIT created and maintained an X that they released via. the MIT license. All the UNIX vendors then took this MIT code and intermixed it with their custom code creating value add X's that were specific to their platform, and closed source. The effect was that the X that existed in the public domain was worthless for end users, and the X's that were worthwhile were closed. X itself couldn't progress because it fragmented so all the interesting stuff existed in other layers. Years later when there was a desire for a workable open X, the XFree86 project had to start, essentially from scratch and this took years. We still haven't gotten all the features that existed in those proprietary Xs 2 decades ago.

    That is the classic example of why BSD style licensing doesn't work. The primary maintainer is not unchanging.

    Conversely the GPL has a long history of successful multi corporate contributions over time. The historical data simply refutes your theory of what should work.