FreeBSD Removes GCC From Default Base System 333
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."
Oblig, appropriate XKCD (Score:5, Funny)
"the system compiler will still be clang"
Or the Onionequse version: FreeBSD's move to revolutionary new swording system [subutai.mn] adds a whole new meaning to compiling [xkcd.com]
Re: (Score:2)
It's clearly stating some basic facts:
1) XKCD isn't funny.
2) References to XKCD aren't needed here at /., nor anywhere else.
Someone who doesn't know the difference between a "fact" and a "subjective opinion" has no business bitching about anyone else's English comprehension or probability of a learning disability...
There may be some undiagnosed medical condition preventing you from thinking in a clear, rational manner.
Luckily, in you're case, it was identified years ago. I believe the current nomenclature is "recto-cranial inversion." Please, seek the help you need.
Re: (Score:2, Funny)
And yes, I typoed your/you're. I am now aware of this.
More interesting page for FreeBSD 10... (Score:5, Interesting)
Try this one: https://wiki.freebsd.org/WhatsNew/FreeBSD10 [freebsd.org]
I have to say, this is shaping up to be a very interesting release. Bhyve, in particular, sounds very promising...
Re:More interesting page for FreeBSD 10... (Score:5, Informative)
So, better compression, SSD speed-up and less need to write to changed files, means there will be a huge performance increase.
Re: (Score:3)
Can we take drives out yet? ZFS makes it nice and easy to just add a new drive to a storage pool, but taking one out (ie, freeing up port for a larger drive, or turning your 16x1TB drives into 8x2TB drives to reduce the frequency of failures) is a different matter.
Re: (Score:3)
Essentially, ZFS does not currently allow data to be moved once written. Supports Delete and Insert, but no Update. A big reason for this is if you move the data, you need to update all points that address that data, and to do so in an atomic way that doesn't leave the system in an unstable state.
Re: (Score:3)
ZFS will allow you to migrate up to larger drives, but I believe it has to be the same number of drives and it is still fairly risky (requiring you to degrade the array for a rather lengthy period).
Here's a blog explaining some.
https://www.dan.me.uk/blog/2012/11/14/increase-capacity-of-freebsd-zfs-array-by-replacing-disks/ [dan.me.uk]
I think you can also u
Re: (Score:2)
Re: (Score:2)
Looking at the logo on their home page [bhyve.org], I think it's pronounced "bee hive".
on Single Compilers (Score:3)
I don't think I've seen Ken Thompson's Reflections on Trusting Trust come up more in the past decade than it has in the past week. Right now seems like a particularly inauspicious time to switch to a one-compiler-to-rule-them-all strategy.
I'm particularly interested in trying to build the gcc phase-1 bootstrap compiler with llvm to see how that works out (TODO list...).
Re:on Single Compilers (Score:5, 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.
Re: (Score:2)
If the theoretical exploit isn't at the hardware level, one way to discover a compromised compiler would be to compile the same code with multiple compilers, and then compare their outputs. Having multiple compilers for one platform is a good thing.
Re: (Score:2)
You will have the option of using GCC, its in the packages system and you can easily install it. Clang is now the default, but of course GCC can still be used if you wish.
Re: (Score:2)
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.
Right, FreeBSD 9 was doing it the best way, and now FreeBSD 10 is doing it a worse way.
IOW, you're complaint is baseless and backwards.
If my complaint is "removing additional compilers from the base install will discourage their use", please describe how the complaint is baseless. Do you feel that having multiple compilers per platform is not an advantage for th
This is going to affect the Playstation 4 fork (Score:2)
Is it not?
In the long run this is really going to suck for the Sony engineers, maintaining a fork with a different system compiler.
Re: (Score:2)
FreeBSD 10 has been using Clang as the system compiler for a long time already. This was just the removal of gcc, nothing else.
Re: (Score:2)
Doesn't matter, it'll just be yanked out a few months in anyway. ;)
Does Clang support all of FreeBSD's platforms (Score:2)
FreeBSD/ARM
FreeBSD/i386
FreeBSD/ia64
FreeBSD/MIPS
FreeBSD/pc98
FreeBSD/ppc
FreeBSD/sparc64
FreeBSD/xbox
I guess they dropped 68k...
Entirely BSD toolchain soon (Score:3)
Since the FreeBSD Kernel is BSD licensed, it only makes sense to have the entire base toolchain BSD licensed as well. This is a big step in that direction. There is also a broader project to create BSD licensed versions of all of the core Unix utilities as well. Hopefully we will see this happen soon.
this is really good news (Score:2)
now if we could only move Fotran too.
Re:Just one question (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 [stackexchange.com]
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.
Re: (Score:2)
Especially GPLv3 which they don't want to include in their base OS. Ports are fine thouh since they are not part of the operating system itself. GPLv2 was never a problem.
Re: (Score:2)
GPL2 was also a problem, that was the current license when the various BSD started to explore alternate compilers. The BSD want the license for all wares in the core install to be BSD
Re: (Score:2)
True. I should have written that it wasn't a problem to include it in the distribution, even if it wasn't optimal.
Re: (Score:2)
People are using BSD (and BSD code) in devices and products (consumer products and otherwise) where there is a requirement (might be a requirement specified by some law or regulation, might be a requirement specified by a content provider or other entity, might be a business requirement, might be something else) to ensure the software on the device can't be changed by the end user. And using a gplv3 version of GCC (and libstdc++/libgcc/etc) creates a conflict between the anti-tivoization clauses in gplv3 an
Re: (Score:2)
This would only be an issue if the "consumer device" were shipped with GCC on it. The complied result ("binary") from GCC is not bound by GCC's license -- if that were true, the entire world is violating the GPL.
The simple truth is FreeBSD purists have always had their panties in a wad from anything and everything that wasn't "BSD licensed". The changes in GPLv3 have been enough of bad taste to get the rest of the gang to agree enough is enough.
Re: (Score:3)
This would only be an issue if the "consumer device" were shipped with GCC on it. The complied result ("binary") from GCC is not bound by GCC's license -- if that were true, the entire world is violating the GPL.
So what happens with OpenGL or OpenCL, where code is compiled at runtime? That's the real reason why Apple found gcc 4.3 and later unacceptable, and I have some suspicion that was actually a reason for the license change. There are plenty of other places where compilation happens at runtime, like JavaScript.
Re:Why? (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.
Re:Just one question (Score:4, 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 [phoronix.com]
Re: (Score:3)
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 [phoronix.com]
So what would you prefer? That BSD threw out their entire licensing policy and adopted the GPL3? Or that they stuck with an old version of GCC that was licensed under the just about permissible to them GPL2 but that got no updates.
Maybe they could have forked GCC then tried to maintain a version that was licensed under GPL2 and backported GPL3 GCC fixes into their fork but that strikes me as being a legal nightmare to be honest.
It would have been more useful it phoronix compared LLVM/Clang 3.3 to GCC 4.2.1
Re: (Score:3)
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 [phoronix.com]
So what would you prefer? That BSD threw out their entire licensing policy and adopted the GPL3? Or that they stuck with an old version of GCC that was licensed under the just about permissible to them GPL2 but that got no updates.
Maybe they could have forked GCC then tried to maintain a version that was licensed under GPL2 and backported GPL3 GCC fixes into their fork but that strikes me as being a legal nightmare to be honest.
It would have been more useful it phoronix compared LLVM/Clang 3.3 to GCC 4.2.1 and you posted that as that is the only thing the BSD community could use instead.
This decision was forced by the GCC adopting the GPL3 but was probably always going to happen sooner or later. The BSD community and the FSF have VERY different ideas of what constitutes "free" software with the FSF actually wanting their code to be less free in order to make sure that if you use it you have to let other people see how you use it and keep any derivatives free.
gcc being gpl v3 does not effect the output of the complier only code linked to or borrowed from it
Re:Just one question (Score:4, 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.
Re: (Score:3)
So you think we should scrap GCC all-together as well, and all switch over to Intel's C Compiler (ICC), since it's technically better?
After all, you think philosophy doesn't matter...
And GPLv3 incompatibilities with the project are more than just abstract "philosophical" differences, as it can impact use and distribution of FreeBSD.
Re: (Score:2, Insightful)
Sorry, but it's you that looks like a douche.
Re:Just one question (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.
Re: (Score:3, Funny)
And a more performant one at that.
Re: (Score:2)
Execution speed is not necessarily the only metric used to judge a compiler. As a developer for embedded platforms I mostly look at code size, and you could also judge it on how well it handles various CPU architecture varieties.
Then again, your argument still stands. He could've written "better". ;)
two dictionaries say "no such word" (Score:2, Insightful)
The two dictionaries I checked, including Merriam-Webster, don't list "performant" as a word.
Trying so hard to use "big words" that you resort to using non-words that sound big = douche. Of course "douche" is actually a word.
Re: (Score:2)
it's origin is Microsoft wank speak.
It is a French word, maybe that Microsoft weenie also said things were tres this or that. eurotrash wannabe.
Re: (Score:2)
Microsoft will give you a "single pane of glass" for "future stars" to view all the "innovations" and "mentorship" in a "major paradigm shift" to "foster success"
Re: (Score:2)
The two dictionaries I checked, including Merriam-Webster, don't list "performant" as a word.
What was the other dictionary?
Re: (Score:2, Insightful)
Note to self: Using words that aren't words is an excellent way to troll.
I (unknowingly) used something that isn't actually an english word. You took the time to look it up in two separate dictionaries basically just so you could be pedantic. If you're that kind of person, I'm glad I could waste your time. :)
Re: (Score:2, Interesting)
Did you try a computer jargon dictionary? Formal dictionaries do not add jargon until it is no longer jargon.
'Performant' is not jargon because it is not used to communicate a specific technical meaning within a particular field of knowledge. It is slang: an unrecognised synonym for 'better', used by people who want to make a vaguely positive but non-specific claim. In this case, suggesting that GCC 'produces more performant code' could imply that it produces an output that executes faster, or is smaller, or is a more exact interpretation of the source with respect to the official language standards or a host of o
Re: (Score:2)
Yet another reason not to say 'performant', it's ambiguous.
Re: (Score:3)
It's exactly as vague and ambiguous as 'better', while sounding pseudo technical. Something a PHB would parrot.
Re: (Score:2)
Cheaper is a performance metric with money as the denominator. The others are reaches that would be excluded by context.
Re: (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 rea
Re: (Score:2, Interesting)
Clang is faster
Clang produces faster code
Really?
Clang has better support for C++11 than gcc
They had almost equal support for C++11 when I check earlier this year.
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
I think that depends on the reader.
The real question is actually, why are so many people stubbornly sticking to gcc when clang has surpassed it in pretty much every way.
Because it's a good compiler. Both gcc and clang are good compilers. They didn't stop developing gcc just because clang came around and started to make progress.
Re: (Score:2)
I've not had that experience when reading the gcc source code. Maybe that used to be the case, gcc has been around for some time.
Re: (Score:2)
Clang is Slower (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 [phoronix.com]
Re: (Score:2)
No its slower. Phoronix benchmark GCC vs Clang all the time.
The question is: Do GCC and Clang benchmark Phoronix?
As a long time Clang user, I never heard of Phoronix. Maybe it's different with gcc users. Maybe gcc develops use this Phoronix benchmark to drive their software and optimisation development.
Re: (Score:2)
Re:Clang is Slower (Score:5, Informative)
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.
Re: (Score:2)
Right and it's a moot point if Compiler X is faster than both of them if the license requires that you be riding a unicycle while compiling.
I know a lot of the Linux zealots don't care to acknowledge it, but the reality is that the viral clauses are just a matter of cutting off your own nose to spite your face. There's a real incentive to contributing back patches in that it's expensive to maintain your own fork, just for a few patches.
Re: (Score:2)
It's not just about faster, compilers sometimes have stability and reliability problems when using higher levels of optimization. GCC wasn't able to handle much more than -O2, IIRC, and even at -O2, there were warnings about not bothering to report bugs without first trying it with lower levels of optimization.
If clang is able to handle -O3 in a production environment without the warnings, that's perfectly legitimate to compare with gcc with current default optimizations.
Re: (Score:2)
YOU publish your own reproduce-able (and tweak-able, if you don't like their chosen settings such as -O3) benchmarks, and I'll be happy to look at them instead of Phoronix.
Re: (Score:3)
The real question is actually, why are so many people stubbornly sticking to gcc when clang has surpassed it in pretty much every way.
I'm all for replacing GCC.
Does clang handle all the GCC extensions to C yet? Or is the (better) approach of getting rid of them being taken instead? The last I heard it was still a bit of a mess.
Re: (Score:2)
Because RMS made it!!!
I think it is most likely due to the large set of OpenSource Apps written in GCC and people really don't want to risk trying a different compiler.
Re: (Score:2)
My reason not to use clang: clang produces larger code than gcc. 10-20% larger, in many cases. For some reason gcc developers are much better at size optimization.
Re:Just one question (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.
Re:Just one question (Score:4, 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.
Re: (Score:2)
Maybe in all seriousness the best option for the Free Software Foundation and GNU Project in a few years would just be to make a GPLv3 fork of the most recent LLVM. The Phoronix benchmark put highly optimized GCC code as slightly faster than optimized LLVM code in a few cases, but in return for dramatically slower compile times. You'
Re: (Score:2)
You can't relicense somebody else's code. You can use the code however you like, but you're required to use the code only with the license intact.
It gets a little bit odd when you mix GPL code into the mix. But, the GPL code is usually segregated to keep it from contaminating the rest of the code. So, when you compile it the resultant binaries would be GPL, but only the portion of the source code that was GPL is GPL. Or at least that's how it was under the GPLv2, not sure what GPLv3 really does there.
Using
Re: (Score:2)
Technically not true. There is lots of BSD-originated code in proprietary systems. The Windows version of the command-line FTP client that ships with Windows is a good example.
Re: (Score:2)
What are you blathering on about?
They keep the code separate because it's under a different license and by keeping it separate they aren't forced to change the license on all the rest of the code. If you look in the source tree, it's not just GPL code that's kept separately, there's an entire tree for contrib. The code in that module is still GPL code and the resulting binary is GPL when it's compiled in.
Care to cite a reference for where the BSD license permits people to change the license other than the p
Re: (Score:2)
Good luck with that. If you replace the (GPL'ed) Linux kernel, then it's not Linux anymore.
Re:can it build the linux kernel? (Score:4, Insightful)
The Linux kernel itself is not GNU. Removing all GNU software will not remove the kernel.
Re: (Score:2)
I would love to have a Linux system,(not android), completely free of GNU.
That's a bit like wanting a Windows 8 system completely free of Microsoft licensing ... not going to happen
Re: (Score:2)
Re: (Score:2, Insightful)
You are trying to flee the spirit of the FSF in Linux.
It's much like trying to avoid the lingering legacy of DOS in Windows.
If you are a wannabe software Robber Baron, then Linux just isn't for you. Finally after all this time the anti-GPL crowd have their own compiler and they're using it. No big surprise there.
Re: (Score:2)
There's no spirit of FSF in Linux. Linux has never been associated with FSF in any way. The reason why the FSF is so keen on calling it GNU/Linux is because they failed with their own kernel project.
Re: (Score:2)
You'd want another libc too, like MUSL [musl-libc.org].
Re: (Score:3)
Can LLVM's Clang build the Linux kernel and QT/KDE?
They are getting close to building the Linux kernel according to these slides [linuxfoundation.org]. Qt has been able to use Clang for a long time now, but I don't know about the entire KDE.
Re: (Score:2)
You can't change a source code licence simply by compiling the code it applies to with a different compiler.
This, incidentally, is how we know that the fact that FreeBSD is stuck on gcc 4.2.1 has nothing to do with licensing. They could compile their entire code base with gcc 4.million and not infect it with GPL v3 (if they are using a modern version of glibc, there might be an issue, however). The people at FreeBSD are simply objecting to the anti-Tivoisation clause in GPL v3 as is their right. In fact,
Re: (Score:2)
Not exactly Safari, but pretty much what khtml became. And it's still open source. From Apple.
http://opensource.apple.com/source/WebKit/WebKit-7536.25/ [apple.com]
Re: (Score:2)
So staying open source is being a bully now?
Vastly improving a product is just 'adding ketchup' now?
Moron.
Re: (Score:2)
Re:can it build the linux kernel? (Score:4, Insightful)
Re: (Score:2)
You can get the open source WebKit browser which is what Safari and Chrome (until they forked it recently) was based on. What's the problem?
Re: (Score:2)
And that is one of the worst justifications ever. In fact, it's so bad, it lends credence to the "GPL is viral" belief - because the GPL can take and take and take, and not give back (which one could argue is against the SPIRIT of FOSS - that one shares so everyone benefits). Yes, it's legal, ju
Re: (Score:2)
USER? Karma be damned. (Score:3)
BSD think of the freedom of the distributor, the GPL thinks of the freedom of the user. I see myself as a user, you see yourself as a proprietary distributor.
FFS, I have had it with the "USER" bullshit. Real end users "use" the system and care more about usability than access to the source code. Most of them would not know how to write any code let alone audit it. Stop confusing yourself, an interested third party, with end users. You might also be a user but not all users are interested third parties with coding skills.
The end user's "freedom" is actually limited when nerds argue over licensing terms and are unable to include some software because of it. I am
Re: (Score:3)
Ah, so you get to define who a "Real end user" is I take it?
Which is beside the point, really.
Nonsense. You just don't like that the argument doesn't go 100% your way and others disagree.
Re: (Score:3)
And that is one of the worst justifications ever. In fact, it's so bad, it lends credence to the "GPL is viral" belief - because the GPL can take and take and take, and not give back
it takes what IT IS ALLOWED to take, it gives back everything as long as you redistribute it keeping it free.
There are two civilizations, the Babbling Software Developers (BSD) and the Grooming Prevented by Law (GPL). The first has a law: "do what you want". The other has a law "Do what you want as long as it doesn't prevent others to do the same". Simple, no?
I don't see why a dev that allows everybody, commercial entities wielding software patents included, the freedom to use his code would be bothered by
Re: (Score:2)
By inspecting the source code.
Re: (Score:2)
That is insufficient, as Ken Thompson demonstrated decades ago.
Re: (Score:2)
Not if all you want to do is verifying the source code. If your compiler is compromised then that's your problem.
Re: (Score:2)
However, if you compile the LLVM/Clang in another compiler (say GCC) then you should be good, injecting "compile into" backdoors into all compilers, to target all compilers, would definitely be noticeable.
Re: (Score:2)
Support for the RDRAND random number generator
Now you can go "WHY????"
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
In fact, given all those android installations, those who call GNU/Linux "Linux" are now less correct than those calling it "GNU".
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
OpenBSD leader Theo states that there are 7000 users of GCC.
I'd like to see how de Raadt came up with THAT number. Seems very low to me. Accross the world? Or is that a blanket, unqualified statement? 7K users of GCC? Come on...
Re: (Score:2)
Re: (Score:3)
The freedom to not offer freedom. No one is forced to use your software.
Re: (Score:2)
FreeBSD is a fully open source operating system, with source code everyone can read and freely share. it is a "Free Software" system. If you mean that it doesnt have a license that tells you that you cannot link FreeBSD code to code under other licenses, then yes you are correct about that, and FreeBSD has always been this way, being a BSD licensed OS, which is why many people choose to use it. FreeBSD already has a BSD licensed kernel and always has.