Hacker News new | past | comments | ask | show | jobs | submit login
FreeBSD Is No Longer Building GCC By Default (phoronix.com)
148 points by octo_t on Sept 11, 2013 | hide | past | favorite | 124 comments



I could be wrong, but it really seems to me that this is a very good, but somewhat indirect example of Apple's positive influence in the software world. By relying so heavily on LLVM it seems that they helped push LLVM to more robust maturity. Not something a lot of people talk about when they talk about LLVM ;p.


This is a very interesting perspective on LLVM. I don't believe Apple has the most contributors (IE compared to the community as a whole), and i don't think they ever did.

They also haven't pushed it as much as you'd think. For example, Apple had precisely nothing to do with Linux or FreeBSD support for LLVM.

Now, you could definitely make your statement about clang, but not LLVM itself. Apple deserves a lot of credit for pushing clang forward.

On the LLVM side, however, since about 2 years ago, Google has probably has as much impact on LLVM as Apple, and you hear nothing about this, because they don't hold external developer conferences talking about it.

(You can count the number of Google presos at recent developer meetings if you want a good indication of how involved they are).

Now, of course, in reality, the credit should go to the people doing the work, regardless of where they work, but HN and other places always like to set up these things up as if they are really corporate projects.


Uh, quite false in your statements and assumptions.

Do you know that Chris Lattner has worked for Apple since 2005?

Chris Lattner being the "primary author of the LLVM project".


You are going to have to do better than that.

I've known Chris Lattner a very very long time (since before he worked at Apple), and have counseled the LLVM project on various issues since then. I was also involved in mediating the proposals to merge LLVM and GCC that came up, and I watched Chris sell Apple folks on LLVM and get hired.

Chris is not a primary author any more, he is a director at Apple. Most of LLVM was not written at Apple, it was written at UIUC (LLVM was started in 2000). While large parts have been rewritten since then, it would be absolutely positively incorrect to say it was Apple's project. I don't even think Apple was the first company to hire people to work on it!

Note that Chris doesn't really code much anymore (and hasn't for at least 2 years), given that he has too many people to manage.

So, now, if you'd like to point out what statements you think i made are incorrect and your supporting data, i'd love to hear it.


Not commenting directly on Apple/LLVM, but sometimes all it takes to make a project succeed is a big name to step in and say they support it. Even if Apple doesn't contribute a line of code, "Apple thinks LLVM is the future" brings new people into the project.

(I also think people use LLVM and clang interchangeably, regardless of technical accuracy. Clearly, the evolution of clang played a big part in FreeBSD switching.)


"Even if Apple doesn't contribute a line of code, "Apple thinks LLVM is the future" brings new people into the project"

This is a fair point. However, I actually think GCC's negativity and steadfast refusal to adapt and evolve contributed more to its rise than anything else.

Apple may have brought users. But the contributors are mostly ex-gcc folks, or folks from research communities/other compiler people. They are the people that were/would be working on GCC if LLVM didn't exist.

The reason LLVM got the majority of these contributors is not because Apple made it the default compiler, or even because Apple supported it.

It's because GCC was unwilling to change and adapt in the ways that its contributors (current and future) wanted. For example, becoming a modular, pluggable compiler. RMS resisted plugins for many many years. He resisted writing out the IR. He resisted requiring newer versions of C, or C++, or ... (While GCC is led by a steering committee, RMS can override them, and the recourse is to go to the FSF board or something. I can't remember all the details of the EGCS reunification agreement). The steering committee of GCC, while all wonderful people, over time became less of GCC contributors, but refused to turn over their steering committee roles to any younger and newer contributors. This left GCC with a steering committee that, while well intentioned, and again good people, was not in any way related to the current major contributors. Part of this was just politics. GCC simply had a lot of politics (because of the FSF, because of EGCS, etc) that LLVM did not.

In any case, contributors and researchers left GCC because of this unwillingness to change. This is what caused a community to coalesce around LLVM, not Apple. People in this community advocated to their companies to adopt LLVM, and some were successful. This is why Apple uses it. This is why ARM uses it. It is because the community and it's members were successful in convincing them to do so (certainly, there is more, in that the companies saw long term strategic benefit, etc)


Thanks for hinting at the technical reasons for LLVM vs GCC


Same happened with Webkit and CUPS. Of course, Webkit came from KHTML, which is GPL licensed, so it's not like they had a choice if they wanted to use it.


CUPS was already great and widely used in Unices before Apple bought it.


Love - i.e. precursor to affirmative thought - is the maker of everything. It can make Apple the greatest open source contributor, FreeBSD the best Unix and iOS a hero of open source - only because of Webkit-. Just keep loving and imagining, then Android becomes an open source enemy, Gnu and GCC the restrictive alternatives, Firefox a small open source dwarf and FSF the epicenter of the axis of evil.

PS: Read all the threads here, and check a few dozens of similar Phoronix articles for-ad-clicks on the same topic on HN.


KHTML was LGPL like all kdelibs, not GPL.


If it were GPL (without an explicit exception), they wouldn't have been able to embed it in Safari, without distributing Safari under GPL or something compatible with GPL.

KHTML was also pretty sweet already, before WebKit was born, but it lacked the polish ... e.g. web pages weren't rendering properly because KHTML was adhering to standards, whereas Mozilla was adding IExplorer features to make web pages look nice (remember, this was back when "works best in IExplorer" was still the norm). Fortunately for all of us, Mozilla decided against implementing ActiveX (it's a pity that people don't remember these things when speaking of PNaCl or Dart).

Unfortunately, WebKit has become in a lot of ways the new IExplorer on mobiles (at least this time it's driven by standards and it's open-source). I hope Mozilla can bring some balance.


> Unfortunately, WebKit has become in a lot of ways the new IExplorer on mobiles (at least this time it's driven by standards and it's open-source).

Except this is talk about standards and open-source is rubbish, because each mobile device has a different version of Webkit and users only have the version that came with the device.


I don't really think you can say that. It's not because they did something particularly positive, but more because they did something negative that had positive side effects. A positive externality maybe?


What was the negative thing that had LLVM as a side effect?


Banishing GPLv3 from Mac OS.


Apple wants the "freedom" to take free software and use it for their own purposes without having to pass the freedom onto their users. It's unfortunate that people see this "banishing" and think its a good thing when it's really a bad thing.


Liberal licenses like BSD are enormously free for everybody involved. The people putting work into software using the open-source code can contribute if they want, which encourages more businesses (who would otherwise be working with proprietary alternatives) to work with the software in the first place.

The increased amount of participation probably far outweighs whatever benefit is involved from the "freedom" in forcing others to publish their changes, which actually just discourages participation from the industry and only marginally improves the ecosystem in the process.


The FSF freedom is not about giving freedom to developers, BSD-style licenses give more freedom to developers. The FSF wants to give freedom to the users, not the developers, and believes that code which is not open and free is a threat to the personal freedom of the users and has every chance of being malicious.


That doesn't make sense to me. How much freedom does a non-programming user gain by having the source code? Such users can hire others to work with the source code for them.

And interestingly enough, non-programming users have this same freedom whether it's BSD code or GPL code. Even more, these same non-programming users have greater freedom with BSD code, because it's more permissive.

I think what you're arguing, obliquely, is that users benefit because there's more source code around when there's GPL than when there's BSD. This is still the core debate between GPL and BSD; does being permissive and trusting people result in less or more source code?

For me, personally, I always contribute back to BSD projects, and avoid GPL projects where there are alternative. I want the freedom BSD gives me, even if I don't exercise it, and even if I never plan to exercise it. But it's why defining GPL as "free" software comes across as double-speak to me.

I think that many people share my goal of having more source code out there, with the freedom to modify it for one's own purposes, but it's definitely not universally agreed that GPL is the best way to achieve this.


>How much freedom does a non-programming user gain by having the source code?

How much freedom does a non-journalist gain by having freedom of the press? I can understand the value of a free, uncensored press even though I am not a journalist. I think that users can understand the value of software freedom even though they do not write code.

>Even more, these same non-programming users have greater freedom with BSD code, because it's more permissive.

Incorrect. You are referring to the "freedom" to restrict another user by distributing nonfree software. The free software community is concerned with positive liberty[1] and freedom for the end-user instead of the copyright holder.

[1] https://en.wikipedia.org/wiki/Positive_liberty


Actually it includes the freedom to make licensing as difficult as possible for those who want to use your code.

The GPL is incompatible with several FOSS licenses including itself (GPLv2 only and GPLv3 being the best example) and such legal issues only serve to drive away potential users of those licenses.

Personally, that's why I find the Mozilla Public License 2.0 to be the only copyleft license I can trust. It's much clearer than the GPL, it doesn't have restrictions on dynamic linking, it is copyleft to itself but it allows code to be shipped under a defined secondary license. By default these are the entire *GPL family from v2, but it can be expanded to include other copyleft licenses such as MPLv1 or the CDDL if the developer so wishes, as long as the parts under the MPLv2 are available separately from the project under that license.

This stops license incompatibilities, something that the FSF needs to work on with their licensing scheme.


Freedom of the press in not a good analogy. Better analogy would be a source of information - such as a research group - that allows you to print their information only if you allow unlimited reprints - i.e. refusing to talk to journalists form Wall Street Journal or New York Times because they have paywalls. While it is a completely legitimate behavior, it's hardly synonymous with the freedom of the press as one usually understand it.


> I want the freedom BSD gives me

But from a user-centric perspective, this is not freedom but power, specifically the power to restrict downstream users' freedom. The GPL does not give you that power, while the BSD license does. That's the main philosophical difference: the GPL says you cannot add new restrictions on distribution, while the BSD says you an add any restrictions you want, as long as you don't remove the copyright notice.


Freedom is nearly always a matter of perspective.

Many folks, especially Americans, feel that the freedom, for example, to kick someone else off their land (or out of their living room) is pretty important, even though from the perspective of the person getting kicked off, this is a restriction of freedom.

The BSD licence is more free from the perspective of the developer, while yes, the gpl is more free from the perspective of the user.

Personally, I think it's good that we have both. "Abortions for some, miniature American flags for others."

The fact of the matter is that under at least US law, it's the programmers choice how to licence their software, and considering that a whole lot of software is not open-source at all, both the bsd licence and the gpl licence are way better for users, I think, than closed-source software.


Except that most developers working on open source are actually getting their bills paid by working on closed-source software.

That speaks it all, I think.


>Except that most developers working on open source are actually getting their bills paid by working on closed-source software.

Do you have references for that statement?

I was under the impression was that most, or at least a very large portion of open-source code was written by people paid by companies to work on that open-source code. Both on the BSD and GPL side of things.


Which companies and in what types of markets?

Facebook, IBM, Google, Intel, Microsoft, Oracle, SAP are only partially open source.

Most of the stuff I see 100% open source, are companies that sell SaaS or PaaS, without giving access to their internal stuff built on top of open source. When they do, it is only a small subset of their tooling/frameworks.


I was taking issue with your statement "most developers working on open source are actually getting their bills paid by working on closed-source software."

That's /completely different/ from who is a 100% open-source company. Hell, you could probably call my company almost 100% open-source, but we haven't contributed a hell of a lot back.

https://www.linux.com/learn/tutorials/560928-counting-contri...

According to that, volunteers (people, as you said, who are probably actually paid to write closed source software, and do this on their own time.[1]) are a significant force, but not the majority. It looks like the majority of contributions come from folks paid to work on open source (and give the changes back) by some company or another. Sometimes those companies are not primarily open-source companies. Some of those companies are not software companies at all. Intel probably has the clearest incentive here; if their hardware works well under linux, well, that is going to tend to increase hardware sales.

Now, of course, the Linux kernel may or may not be representative of other open source projects, but those are the statistics I find.

This also lines up with what I've seen personally; most people I know who contribute significantly do contribute some of their own time, but most of them get paid to do it most of the time.

[1]I'm not sure your statement is true even there. Most of the major contributors I know who put in significant personal time do get paid to work on open-source stuff when they get paid. I mean, if you have a deep understanding of a valuable and commonly-used codebase, well, when looking for employment, working on said codebase is very likely the highest value use of your time.


While I agree with your remark [1], it does not pay the bills.

Fact is, most people in HN like open source, but the reality speaks otherwise when you try to make a living out of it.

I have been through it a few times, so I speak from experience.


You did not read my remark [1], apparently.


I did.

You hint to the fact that even if one does not get paid, the knowledge built upon working in open source can be used for building up a curriculum that helps getting a new job.

Which is true. The only problem is what to earn during the learning process, if open source is the only source of income.

Again, I am not against open source, as I actually am an heavy user of it. But based on personal experience there are only a few markets where I see a possibility to earn money from it, at a sustainable level for what is expected in western civilizations.


>Again, I am not against open source, as I actually am an heavy user of it. But based on personal experience there are only a few markets where I see a possibility to earn money from it, at a sustainable level for what is expected in western civilizations.

So, you don't believe me when I say that you can get paid by a major corporation to work on open source software, to make that software do what the corporation wants, and to give [some of] those changes back to the community?

I mean, these are plum jobs. Not something just anyone can get. But, these jobs are also where the majority of open-source software comes from.

edit:

If you are saying that it's difficult to be an "ideologically pure" open-source programmer and make a living from it, we are not in disagreement.

My point is there are a lot of jobs in and around open-source, though; I've gotten paid to work with (and sometimes make small changes to) open-source software for almost half my life now. I in no way qualify for the 'plum' jobs I described where you work full-time writing said software.

But eh, really, the same is true for most systems programming. Most programming work is CRUD apps. Only a few really good people get to work on systems programming, even in the proprietary software world.

The open-source model means that those of us who keep shit running (or those who write CRUD apps) can modify small portions of more complex programs when we find problems that are within our ability to solve.


> If you are saying that it's difficult to be an "ideologically pure" open-source programmer and make a living from it, we are not in disagreement.

Yes, that is my point.


In every study I have seen, your statement is incorrect.

The wast majority of developers work at internal code, code that never will get redistributed outside the company walls.


> The wast majority of developers work at internal code, code that never will get redistributed outside the company walls.

According to my dictionary this means closed source, which only reinforces my statement.


As the developer, I can see the source tree. The company owners can see the source tree. As such, everyone who has access to the program also has access to the source.

GPL allows this, as do every type of open/free software license. Either this mean that your word choice of "closed source" lacks meaning, or we are not talking about the same thing.


If the source is not made available to your customers it is not open source.


Not everyone can cook, but many people might find it informational and/or useful eventually to know how their meal was prepared.

In some restaurants, you can't see how your food is prepared at all, and you judge based on your knowledge and experience of prior meals.

Some restaurants will openly show you the preparation of the food (to display that it's freshly made, reassure that there's no microwaving going on, etc).

And in most cases you can look up recipes online to try your own hand at recreating a similar meal - although often without the same tools, experience, ingredients and precise recipe, it might be tricky.

Ultimately I think it'd be wonderful for all recipes and instructional information to be available for anyone to view and try themselves if they so desired - it'd also help people understand what goes into the food that they eat (and pay for).


However, the downside is that if there's not enough developers to make the software on GPL terms, the users don't have freedom to use the software because there's no software worth using. Of course, it's not true for many GPLed projects, but may be true for some.

As for being malicious, I don't see how GPL adds anything to any other open source license.


That's the party line that the FSF has been spouting for decades now and I don't know why anybody keeps on repeating it. I think the people that give a wink and a nod to that FSF talking points don't even really buy it.

First of all, "users" (as in non-developers) don't care about the code..never have, never will. Secondly, the code never goes away. It's not like someone can physically snatch up some BSD code and lock it away for no one else to use.

But what I find most disturbing about this line of reasoning is that it doesn't take into account the developers decision on how she or he wants to license his or her code. If you want to GPL it, fine, if you want to give it a liberal license fine too.


I think liberal licenses or weak copyleft are appropriate license for certain software, usually libraries. What we see today is that us developers have great freedom in what free libraries we can use to build our applications from. However, that freedom ends with us. It never reaches the users. We use liberally licensed libraries to build proprietary end-user applications. The GPL aims to ensure that freedom reaches the users. People say that the GPL is less free than liberal licenses because it "forces" developers to give source code to users, but the freedom to restrict others is certainly not freedom.


I suppose, but why? Reading the sibling comments, I don't get the GPL vs BSD thing here. I understand the differences between the two (GPL has more requirements on how the source must be treated, etc. See the other comments), but what I don't get is _why does this matter?_ The resulting binaries are still yours, and yours alone (no?) — what material difference does it make that the toolchain is GPL or not?


I consider it a positive effect. (BSD fan here)


Have they replaced bash with a good BSD licensed shell, or are they still rolling with an ancient version of bash? Hard to see that as a "positive" if they are...


My most recent installation of FreeBSD came with tcsh by default.

But since installing whichever shell one prefers is so easy, I don't see any real problems there.


Oh, I know FreeBSD defaults to tcsh. My concern is that OSX has chosen to ship ancient GPLv2 software instead of modern BSD software. I can't consider this a good thing for anyone but ideologs.


They ship a pretty recent zsh though :)


Ah, that's good. I wonder why they don't default to it. zsh is a great shell to default to.


They used to, before 10.3 or 10.4 or so. I suspect that it was offputting to people moving from Linux.


I believe jlgreco was asking about Mac OS, not BSD.


Nope it's still an old Bash, with a really slow grep!


Mac OS is still shipping with Bash 3.


Banishing? GPLv3 was never in MacOS (and Apple's first use of LLVM, though not their creation of Clang, predates the first draft of the GPLv3 by a year or so).


As a user of OS X, I'm highly in favour of this move. I profer the greater openness that BSD licenced alternatives give, and as a BSD fan the benefits to the BSD community have been fantastic. Please don't state opinion as fact.


I agree that Apple has helped to promote LLVM/CLANG, but I'd rather give the credit to the Unix community as a whole.


"helped promote LLVM/Clang", what, you mean by creating and doing the majority of the work on Clang? That's promotion? And I suppose Microsoft only promote Windows?


clang was develop at University of Illinois. Apple did not create it.


Actually I think this point is repeated every time.


This so many times



Thank you.

The mouse-over popup spam was too much to fight with.


Phoronix is terrible and is _always_ the site that provokes me to install AdBlock.


May I respectfully mention Firefox and the noscript plugin at this point.

Back on topic: I really want to try out a non-linux kernel OS at some point, but I have nvida hardware...


The FreeBSD kernel is cool, but what really sells me on it is the concept of a 'core system' as a design feature, and the nifty things like ZFS that you get.

There's a new things that aren't quite like Linux, for instance, the 'watch' command does something entirely different.


sysutils/gnu-watch and sysutils/coreutils and other ports may be used to give you a more linux like environment. I have most of them installed, but I use them only when the native, BSD implementation lacks a certain option I need - and it's really rare.

And I support your opinion on a "core system" being a feature - it makes things consistent, which is a good thing. For example, I tried to setup a wifi network on Arch and I needed at least three different commands for this, each with it's own options syntax. In FreeBSD there is 'ifconfig' command which does everything related to networking and that's all.


FreeBSD has NVidia drivers in the ports tree, I haven't had a problem with them.


The proprietary nvidia driver works great on FreeBSD.


I'll try an install on my 'play PC' (ancient HP xw6200 with a newer GT520 cheapy card) over the weekend.


Re: OpenMP

Intel is working on OpenMP support for LLVM/Clang. Runtime part http://www.openmprtl.org/ is BSD. Compiler part http://clang-omp.github.io/ is the same license as LLVM/Clang.

OpenMP is a large feature, so it will take quite some time to be integrated.


Related topic, LLVM vs GCC performance: http://www.phoronix.com/scan.php?page=article&item=llvm_clan...

I guess if it's a big deal you can always compile gcc. Honestly I'd rather have it compiled for me but that's probably no surprise.


Right, but there are license concerns (gpl3) impacting inclusion of gcc > 4.2 for many of the BSDs. FreeBSD is still using gcc-4.2 I believe.


Seemes kind of odd to fixate on a self-contained copyright license (The license of GCC doesn't impact the code compiled with it) while at the same time the LLVM/Clang contributors are not required to release their patents for use, and some (many?) of them are filing patents on techniques they use in LLVM.

To me it seems that they are ignoring an important practical concern (usage of LLVM/Clang may be unlawful in the US and Europe without going out and obtaining patent licenses) in order to address a purely philosophical issue with no practical impact.

It's sort of amusing how the tables have turned over the last twenty years. Twenty years ago it was the FSF/GNU crowd who was making impractical decisions for philosophical/political reasons. ... and as time has gone on the practical importance of strongly free software has become greater and greater.


I always had the notion that LLVM is faster than GCC. I don't feel qualified to interpret this benchmark comparison, but they appear to have roughly the same performance?


LLVM compiles faster than GCC (although the gap has narrowed in the last couple of years). GCC produces faster code than LLVM (although that gap has also narrowed)


This recent presentation from the 2013 European LLVM Conference outlines the optimization issues LLVM still suffers from, making the produced binaries up to ~10% slower than with GCC for some use cases:

http://llvm.org/devmtg/2013-04/#talk3


LLVM compiles faster as it optimises less (oversimplified of course).


I wonder how they're getting around the issue of LLVM's lack of OpenMP support. I'm sure there are atleast a few modules in FreeBSD that utilize OpenMP. I too want to switch from GCC to LLVM/Clang but can't right now since LLVM doesn't support OpenMP yet.


> I'm sure there are atleast a few modules in FreeBSD that utilize OpenMP.

Nothing in the base system uses OpenMP. I find your assumption extremely bizarre (and scary). The kernel and the base system is the kind of software OpenMP would not be of any use. In fact, the base system is not even written in C++, but C; the only C++ components are groff and llvm (go figure).

  $ lsr /usr/src/ | egrep '\.(c|cpp|h|hpp)$' | xargs egrep '^[[:space:]]*#[[:space:]]*pragma[[:space:]]+omp' | grep -v gcc | wc -l
         0
Non-base software from the ports systems uses its own compiler. The system compiler is used for compiling FreeBSD.


Do note that .cc is also a valid C++ extension.


You forgot devd, which is also written in C++: http://svnweb.freebsd.org/base/head/sbin/devd/

By default, ports use the system compiler unless it is specifically overridden in the port's Makefile (e.g. USE_GCC=any).


You won't have to wait for long! Initial patches have already been accepted as of August 27th.

http://permalink.gmane.org/gmane.comp.compilers.clang.devel/...

http://clang-omp.github.io/


Your link does not show any evidence of this being "accepted".


Can't those modules simply depend on GCC? FreeBSD is no longer building GCC by default. You can still build GCC as an option.


GCC is still available in the ports tree, and specific ports that depend on being built by GCC (for whatever reason) specify that requirement. This change affects only the GCC that shipped in the FreeBSD base system.


LLVM's license (http://llvm.org/docs/DeveloperPolicy.html#copyright-license-...) is much more like BSD than the GNU one ever was.


Indeed. Though who cares? A GPLv2 toolchain worked to build FreeBSD for well over a decade and no one died of viral copyleft pollution. And the similar platform that was far more polluted with this stuff ended up being the one that "won" in the market anyway.

Of all the good reasons behind switching to Clang (or behind having a two-compiler ecosystem in general), "license purity" is IMHO the dumbest.


> A GPLv2 toolchain worked to build FreeBSD for well over a decade and no one died of viral copyleft pollution.

GCC is no longer a GPLv2 toolchain.


My understanding is that FreeBSD never used GCC post-GPLv3. I was being specific, not making a point about GPLv3 (arguments against which I also view as dumb, FWIW).


> My understanding is that FreeBSD never used GCC post-GPLv3.

Right, which has been a sign that with GPLv3, GCC was on the way out for sure: if its not being kept current, it's got a limited lifespan.

> I was being specific, not making a point about GPLv3 (arguments against which I also view as dumb, FWIW).

The GPLv3 itself was shaped very much by the FSFs analysis of what it thought business users would require (filtered through the FSF's ideology -- see the limits on the applicability of the antitivoization for a key example.)

That FreeBSD would be shaped by its view of what business users want, without constraint by the FSF's ideology, should not be surprising, nor should it be surprising that that conflicts in irreconcilable ways from the FSF's view made concrete in the GPLv3.

Open-source, unix-like OS's for users whose visions align more with the FSF's views are readily available. (And nothing stops a sufficiently-motivated party from making a GPLv3, FreeBSD-derived, GCC-using OS if they really want it.)


> not making a point about GPLv3 (arguments against which I also view as dumb, FWIW).

Well, that's a viewpoint that welcomes open and reasonable discussion.


And there is no maintained GPL2 gcc, so they need an alternative. Also, the goal of the project is to provide a free operating system, and GPL software does not meet that goal, in either version. So naturally it is desirable to replace it when possible.


I watched a presentation from a FreeBSD developer discussing the switch, and one of the reasons cited was that corporate users would be limited by the GPLv3.


This. As a corporate user of FreeBSD (with conservative lawyers), we're stuck with the last GPLv2 GCC release -- 4.2.2, which is now over 5 years old.

Believe me, recent GCC (4.7, 4.8) is worlds better than 4.2. We pine for something better.


Considering that every unit sold of the most popular consumer smartphone/tablet OS is built with a GPLv3 toolchain, I think you need to talk to your lawyers.

Like I said, this argument is dumb. The fact that Very Important People With Decision Power are making dumb decisions doesn't make it less dumb. FreeBSD isn't really doing this to support their business customers (again, things like Android are existence proofs to the contrary), they're doing it to stick it to the FSF (c.f. some of the comments in this very thread. That's dumb.

(Which is not to argue that clang is a bad choice -- it isn't!)


> FreeBSD isn't really doing this to support their business customers

This is precisly why FreeBSD chose this route. It was a deliberate communicated decision years ago from the FreeBSD Foundation. I wonder if you have ever heard this quote:

> I believe it is an established maxim in morals that he who makes an assertion without knowing whether it is true or false, is guilty of falsehood; and the accidental truth of the assertion, does not justify or excuse him.

--Abraham Lincoln


> Considering that every unit sold of the most popular consumer smartphone/tablet OS is built with a GPLv3 toolchain, I think you need to talk to your lawyers.

However, note that it doesn't _bundle_ it. And Google has gone to some lengths to produce their own non-[L]GPL libc (Bionic). As far as I know, the Android userland is pretty much a no-GPL zone these days.


Can we assume that this is because smartphone manufacturers do not want to allow customers to install modified version of the compiler on devices that the customers has bought?

We can discuss if one should be allowed to modify ones own property, but lets at least be clear if that is the discussion we have.


Er, no, it's just because there's no reason to ship a compiler. However, if they were shipping a compiler, I suspect it would not be a GPLv3 GCC; Google have pretty systematically purged GPL from the Android userspace, and I don't think it has any GPLv3.


FreeBSD isn't doing this to stick it to the FSF.

Finally a compiler comes along that shares the same license philosophy and can be imported wholesale WITHOUT having to worry about licensing issues due to changes that may need o be made.

If clang/llvm hadn't come along FreeBSD would have upgraded to a later version of GCC.


Holy maloly - your legal department is advising against upgrading the server compiler?! Where do you work :-)


The limitations for distributing GCC compared to Clang:

Patents. A company need to know if they have patents, or patent agreement covering the GCC compiler.

Binary only modifications to GCC need to have corresponding source code.

If you include a GCC compiler in a router/hardware device, users need to be able to run their own modified compiler.

Thats about it. Cant really figure out any more use cases where GCC and Clang would differ.


I, too, would be interested in watching this presentation. Would you happen to have a link to it?


If that were true, the linux kernel would be GPLv3. Licensing exists for a reason. Ignoring it IMHO is the dumbest.


Getting away from the FSF is the best reason.


Honor to Apple for pushing this clang forward, together with WebKit clang is probably one of the most significant contribution to the open source community to date.


I'd disagree and say in terms of significant contributions, Firefox has made the biggest impact, not just on the computing world but in general social terms.


"probably one of the most significant" is what the parent said - how do you disagree with that?


More so than android?


Android has gotten more people running open source software, but it hasn't done much to improve the ecosystem. There's not much coming back upstream other than some kernel updates.


Sure. Android is basically Linux with a proprietary GUI and a riped-off of Java runtime.

Plus, it's mostly used for proprietary mobile device offerings by big corporations.

Not many open source projects benefit by Android's existance.


Depends how you mean it, really. Android has had an impact, and happens to be open-source (albeit not operated like a normal open-source project; it's closer to a code-dump, as with Apple WebKit in the early days). However, if Android was not open-source, but had source shared with OEMs, would its impact really have been substantially different? I suspect not.

However, if Mozilla, clang or WebKit had not been open-source, their impact would have been very different (and much less).


I'd say so.


I was excited about PCC when the project was revived a couple years ago, hoping it would become the default compiler for the C++ and GPL phobic OpenBSD. The compiler does not appear to have made much progress in the last couple years, unfortunately.

Perhaps clang will carry over to OpenBSD so the project can ditch their custom version of GCC. PCC, with its few moving parts, does seem to embody the OpenBSD philosophy more than LLVM, though.


Just as soon as someone adds vax, sh4, m88k and hppa backends...


I guess you were thinking about NetBSD ;)


I'm pretty sure OpenBSD runs on all of those architectures.


>The compiler does not appear to have made much progress in the last couple years, unfortunately.

It was recently removed in fact. There's been talk about adopting LLVM, but it doesn't support a bunch of architectures openbsd does support.


Great news! Always good to have some compiler diversity amongst products.

I wonder what this will do to the ports tree though!


Clang has been the default compiler for a while now, and many ports either work just fine or have been patched to work properly with clang. Ports that really need to use gcc (those depending on OpenMP perhaps) can still depend one of the gcc ports.


Some Debian developers are also working since 2012 to bring clang as a better alternative than GCC: http://clang.debian.net/


"Better" in what respect though? Debian obviously doesn't have the licensing issues FreeBSD, Apple, etc., have (whether or not actually justified) with gcc, and technically, clang/llvm is at best a mixed bag, better in some ways, but worse in others.

In general, clang compiles somewhat faster than gcc (though the gap has been narrowing) and gcc produces better code than clang (though the gap has been narrowing). Gcc in general supports more architectures. Clang supports some specialized uses (e.g. embedding in an IDE) that gcc (being more of a traditional compiler) doesn't do well. The oft-repeated "error message" argument is fairly specious. Both are changing very quickly, but the trend seems more towards convergence (in capability) rather than divergence.

Clang's more modern source-base is arguably an advantage to those wishing to extend it, but that represents a vanishingly small fraction of users—and is not always the advantage that's typically suggested: I've hacked on both, and while gcc's internals can be "elderly", clang's "modern" structure is often far from simple to understand.

So, good? Absolutely. "Better"? Er, well. It's a great thing to have two excellent compilers available...


since it looks that linux won now, with big players maintaining it and a great ecosystem, i think the hackers love should all go towards FreeBSD now..

its a great OS, with a great background that should advance forward as another good open source option to linux and also against the closed source OS´s all around..

after all the heroic efforts from the FreeBSD community, to make the project going on even without the same support and attention that linux got, i wander if its not the time right now that this wonderfull OS start to get more traction and love from the hacker community?


This was well known to be coming.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: