Slashdot Mirror


FreeBSD Removes GCC From Default Base System

An anonymous reader writes "With the LLVM/Clang migration, FreeBSD developers have now disabled building GCC and the GNU C++ standard library (libstdc++) as part of the FreeBSD base system. GCC and libstdc++ have been superseded by LLVM's Clang and libc++, respectively, on primary architectures for FreeBSD 10.0." You can still flip a few switches to get GCC, but the system compiler will still be clang. Update: 09/11 14:50 GMT by U L : Reader Noryungi noted that the What's Cooking for FreeBSD 10 page is also worth a look, adding "I have to say, this is shaping up to be a very interesting release. Bhyve [the BSD hypervisor], in particular, sounds very promising."

17 of 333 comments (clear)

  1. Oblig, appropriate XKCD by PSVMOrnot · · Score: 5, Funny

    "the system compiler will still be clang"

    Or the Onionequse version: FreeBSD's move to revolutionary new swording system adds a whole new meaning to compiling

  2. More interesting page for FreeBSD 10... by Noryungi · · Score: 5, Interesting

    Try this one: https://wiki.freebsd.org/WhatsNew/FreeBSD10

    I have to say, this is shaping up to be a very interesting release. Bhyve, in particular, sounds very promising...

    --
    The right to offend is far more important than the right not to be offended. (Rowan Atkinson)
    1. Re:More interesting page for FreeBSD 10... by MatthiasF · · Score: 5, Informative

      I think the updates to ZFS are more impressive. The addition of LZ4 compression (50-80% faster), SSD TRIM support and the new NOP-write that reduces the need to write to compressed disks will all mean commodity hardware SANs running FreeBSD will be able to give the big boys a run for their money.

      So, better compression, SSD speed-up and less need to write to changed files, means there will be a huge performance increase.

  3. Re:Just one question by Lendrick · · Score: 5, Informative

    See this link for an explanation:

    http://unix.stackexchange.com/questions/49906/why-is-freebsd-deprecating-gcc-in-favor-of-clang-llvm/49970#49970

    In short, mostly it's due to FreeBSD's issues with the GPL, not all of which are purely philosophical (it affects their funding, for one thing). On the other hand, if you don't have a beef with the GPL, it's probably best to stick with GCC, which produces more performant code.

  4. Re:can it build the linux kernel? by kthreadd · · Score: 3, Insightful

    The Linux kernel itself is not GNU. Removing all GNU software will not remove the kernel.

  5. Re:Just one question by Anonymous Coward · · Score: 3, Informative

    For many reasons.

    Clang is faster
    Clang produces faster code
    Clang's license is BSD (and hence more in line with FreeBSD's philosophy)
    Clang has built in static analysis tools
    Clang's error messages are easier to understand than gcc's
    Clang has better support for C++11 than gcc
    Clang's code base is much less convoluted than gcc's, and easier to work on
    Clang's code base is more modular, which allows you to easily use separate stages of the compiler in other tools
    Probably a bunch of reasons I've forgotten too

    The real question is actually, why are so many people stubbornly sticking to gcc when clang has surpassed it in pretty much every way.

  6. Re:Just one question by lactose99 · · Score: 5, Informative

    Licensing.

    GCC in the FreeBSD base is stuck at v4.2.1 as that was the last version licensed under the GPLv2. As this is about 7 years old by GCC standards a newer compiler is a welcomed change and since CLANG is BSD-licensed it is more in line with the project's goals anyway.

    --
    Fully licensed blockchain psychiatrist
  7. Clang is Slower by tuppe666 · · Score: 4, Informative

    For many reasons.

    Clang is faster...

    No its slower. Phoronix benchmark GCC vs Clang all the time. http://www.phoronix.com/scan.php?page=article&item=llvm_clang33_3way&num=1

    1. Re:Clang is Slower by tlhIngan · · Score: 5, Informative

      No its slower. Phoronix benchmark GCC vs Clang all the time. http://www.phoronix.com/scan.php?page=article&item=llvm_clang33_3way&num=1

      Except FreeBSD is not using GCC 4.8. They're using GCC 4.2.1, the last version that was GPLv2.

      While the current version of GCC may be faster than Clang/LLVM, that doesn't mean Clang/LLVM isn't faster than what is in use now, so the switch may even boost performance compared to the ancient version of GCC in use.

  8. Re:Just one question by Anonymous Coward · · Score: 5, Funny

    I'd have to agree with the "anti-performant" sentiment. It isn't cromulent to say "performant" if don't want to sound like a douche. It makes it seem like you're trying to embiggen yourself.

  9. Re:Just one question by 1s44c · · Score: 3, Insightful

    Because GCC is a total mess internally and Clang/LLVM is neat, clean, maintainable, adjustable.

    GCC is a dead end. LLVM is the future.

  10. Re: Just one question by Anonymous Coward · · Score: 3, Funny

    And a more performant one at that.

  11. Re:on Single Compilers by phoenix_rizzen · · Score: 4, Informative

    FreeBSD (and Linux) were already in a "one compiler to rule them all" situation, aka GCC. At least with FreeBSD 9 there were two compilers in the base install (GCC, LLVM), and you have the option of keeping GCC in 10 if you really want.

    IOW, you're complaint is baseless and backwards.

  12. Re:can it build the linux kernel? by santax · · Score: 3, Insightful

    Which I and probably about every other BSD-style coder respects. However, this debate is really old. I think there is something to be said for both license-models and it is good they both exist. I however do feel that true free code, is well... really free. Also to be used without giving the source. It's a choice I made and I can perfectly understand why people don't want to have Big Ol' Apple stealing their stuff and making heaps of money from it. But, I can also understand why people want to really give the code away. It's all about perspective and there is no right or wrong here. It all depends on the personal views of the coder/owner of the code and what that person/org wants to let others do with their code. BSD has the advantage that it can become closed source. That makes it easier to generate profit, but also (especially in the commercial world) there are other good reasons why people want to protect their product. GPL has the advantage that every time someone uses your code, that code will become available also. Just don't ever think that because your code is GPL'd, no one will dare to use it in close source. As much as I would love such a world, that would be very naive.

  13. Re:Just one question by slacka · · Score: 3, Interesting

    I'm deeply disappointed that this issue was decided over philosophical instead of technical merits. If Clang was superior to GCC in the majority of benchmarks, then I would support this decision. But that’s not the case, GCC is still leading in most benchmarks and can be an order of magnitude faster when the popular OpenMP library is used.[1] Sadly, BSD users are the losers here.

    [1] http://www.phoronix.com/scan.php?page=article&item=llvm_33svn_competes&num=5

  14. Re:Just one question by lgw · · Score: 3, Insightful

    OK, really: do you seriously expect BSD not to stick with BSD Licensed code? It's pretty much the point of the exercise. YouBetterSayGNULinux is there if you want it - you can have all the GNUs you want. BSD is not and should not be a Linux distro - it's its own thing, older and with a different mindset.

    --
    Socialism: a lie told by totalitarians and believed by fools.
  15. Re:Why? by David+Gerard · · Score: 5, Interesting

    tl;dr Apple is allergic to the GPL v2, and really allergic to the GPL v3. They were never happy about gcc being their base compiler, so they've been funding the hell out of LLVM/Clang so they can use that as their base compiler instead. Apple is also the main backer of FreeBSD.

    --
    http://rocknerd.co.uk