
FreeBSD Is No Longer Building GCC By Default - octo_t
http://www.phoronix.com/scan.php?page=news_item&px=MTQ1ODc
======
leoh
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.

~~~
DannyBee
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.

~~~
jyap
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".

~~~
DannyBee
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.

------
GalacticDomin8r
For a much better source:

[http://lists.freebsd.org/pipermail/freebsd-
current/2013-Sept...](http://lists.freebsd.org/pipermail/freebsd-
current/2013-September/044313.html)

~~~
bdg
Thank you.

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

~~~
keithpeter
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...

~~~
bdg
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.

~~~
klibertp
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.

------
sanxiyn
Re: OpenMP

Intel is working on OpenMP support for LLVM/Clang. Runtime part
[http://www.openmprtl.org/](http://www.openmprtl.org/) is BSD. Compiler part
[http://clang-omp.github.io/](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.

------
ianstallings
Related topic, LLVM vs GCC performance:
[http://www.phoronix.com/scan.php?page=article&item=llvm_clan...](http://www.phoronix.com/scan.php?page=article&item=llvm_clang33_3way&num=1)

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.

~~~
pestaa
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?

~~~
CJefferson
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)

------
rwbt
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.

~~~
4ad
> 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.

~~~
X-Istence
Do note that .cc is also a valid C++ extension.

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

~~~
ajross
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.

~~~
vor_
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.

~~~
awda
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.

~~~
ajross
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!)

~~~
rsynnott
> 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.

~~~
belorn
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.

~~~
rsynnott
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.

------
gdonelli
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.

~~~
octo_t
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.

~~~
oijaf888
More so than android?

~~~
bskap
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.

------
kingmanaz
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.

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

~~~
indeyets
I guess you were thinking about NetBSD ;)

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

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

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

~~~
markjdb
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.

~~~
stekoz
Some Debian developers are also working since 2012 to bring clang as a better
alternative than GCC: [http://clang.debian.net/](http://clang.debian.net/)

~~~
snogglethorpe
"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...

------
oscargrouch
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?

------
moron4hire
This was well known to be coming.

