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)."

113 of 711 comments (clear)

  1. What's wrong with GCC? by jomcty · · Score: 5, Interesting

    What's wrong with GCC?

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

      The GPL.

    2. Re:What's wrong with GCC? by mwissel · · Score: 2

      One thing might be GCC is licensed under the GPL while LLVM/Clang are under a BSD(-like) license.

    3. Re:What's wrong with GCC? by UnknowingFool · · Score: 2

      Other than LLVM and FreeBSD falling under BSD style licenses, you might have had a point.

      --
      Well, there's spam egg sausage and spam, that's not got much spam in it.
    4. Re:What's wrong with GCC? by vlm · · Score: 4, Informative

      Aside from the more or less irrelevant licensing issue, clang is all about the source analysis tools, refactoring, rewriting support. Uses less memory and time. Both caused by lack of optimization.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    5. 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.

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

    7. Re:What's wrong with GCC? by rev0lt · · Score: 2

      No only licensing issues, but also performance. While CLANG may not have all the bells and whistles of GCC, it does a good job compiling C code - and given that the base system is mostly C, even a small improvement in compile time (and memory usage) can make a big difference, specially for those who - like me - prefer to build and upgrade from source.
      Another motive to seek alternatives (but not directly related to FreeBSD) is the lack of support of some architectures. Some "obsolete" architectures were removed post GCC 2.95, but some BSDs still support them today. Having a easy to port, actively developed, BSD licensed compiler is way better than to rely on some archaic GCC version.

    8. Re:What's wrong with GCC? by DarkHelmet433 · · Score: 3, Interesting

      Well.. GPLv3 specifically. FreeBSD is stuck on GCC-4.2, the last GPLv2 gcc compiler. It's getting quite dated now. It's a switch from gcc-4.2.2+ hacks/patches to clang instead of a GPLv3'd gcc-4.6 or later.

      "Stuck"? FreeBSD gets a foot in the door of companies where GPL (and GPLv3 in particular) is something they'd prefer not to deal with. Being able to use a modern GPL-free OS as a foundation of a product is a convenient option to have. And being GPLv3-free can be even more compelling.

    9. Re:What's wrong with GCC? by Lisias · · Score: 2, Insightful

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

      But the contributors do.

      --
      Lisias@Earth.SolarSystem.OrionArm.MilkyWay.Local.Virgo.Universe.org
    10. Re:What's wrong with GCC? by Alex+Belits · · Score: 5, Interesting

      And WHY would a company want to avoid GPL compiler, unless it intends to distribute a sabotaged version of the compiler?

      --
      Contrary to the popular belief, there indeed is no God.
    11. Re:What's wrong with GCC? by iluvcapra · · Score: 2

      But whenever Apple tweaks their Xcode branch of Clang and don't release the tweak the day they push the binary, it kills a Magic Free Software kitten.

      --
      Don't blame me, I voted for Baltar.
    12. Re:What's wrong with GCC? by beelsebob · · Score: 4, 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.

    13. Re:What's wrong with GCC? by Fred+Ferrigno · · Score: 4, Insightful

      The derivative works companies build using BSD-licensed software are effectively proprietary software. And if they control the hardware, they can make sure it only runs binaries signed by them, so you can't even run the original unmodified code.

    14. Re:What's wrong with GCC? by Pinky's+Brain · · Score: 4, Insightful

      The GPL has never really been the issue, LLVM was offered for GPL-Next ... but the GCC maintainers have always insisted upon a monolithic compiler without standardized intermediary representations to prevent other compiler builders just using GCC as a front end and thus refused, but that's on the maintainers and not the GPL.

    15. Re:What's wrong with GCC? by Alex+Belits · · Score: 3, Informative

      One example would be integrating the compiler with its own custom tools.

      The only valid way of integrating compiler with custom tools is calling the compiler from them (everything else is shit design made by shit developers). That was done with gcc for as long as gcc exists.

      --
      Contrary to the popular belief, there indeed is no God.
    16. Re:What's wrong with GCC? by rubycodez · · Score: 2, Interesting

      maybe they want to distribute a USEFUL version of the compiler, for a particular purpose. Stallman et. al has long battled to keep usable API and plugin points to the front end of gcc only, and to prevent such in all parts of the toolchain, even to keeping the documentation for parts obfuscated. screw that, some people want real freedom....

    17. Re:What's wrong with GCC? by bonch · · Score: 4, Interesting

      After all these years of BSD code existing and thriving without issue, it's amazing that people still spread this kind of fearmongering despite the fact that this scenario has never come true.

      The original code and its contributors don't magically disappear the moment a company makes a closed change. And if a company makes contributions it doesn't show anyone, you're free to make your own open contribution that competes with it. In fact, it's in company's best interests to rely on open contributions, because they don't want to waste time and manpower on, say, maintaining a compiler. This has proven to be the case with Clang. There hasn't been some evil proprietary fork that somehow ruined the world--and even if there was, people would just contribute free versions of the fork's features to the main tree. Companies are smart enough to know that this would happen and therefore realize that closed contributions of major features would be wasted effort.

    18. Re:What's wrong with GCC? by Kjella · · Score: 3, Interesting

      "Stuck"? FreeBSD gets a foot in the door of companies where GPL (and GPLv3 in particular) is something they'd prefer not to deal with. Being able to use a modern GPL-free OS as a foundation of a product is a convenient option to have. And being GPLv3-free can be even more compelling.

      Not to troll, but what companies are those? What's the closest thing to Red Hat that's selling FreeBSD support, what volume are we talking about? Or are they all providing their own support? Don't get me wrong, I know particularly a lot of web hosting companies run it - 6/39 of the top providers on Netcraft's list are FreeBSD, but I doubt they have a problem with the GPL. If BSD went away, they'd probably just join all the Linux hosting companies. There's of course Apple and then there's.... who?

      --
      Live today, because you never know what tomorrow brings
    19. Re:What's wrong with GCC? by rubycodez · · Score: 4, Informative

      the topic of this thread is "What's Wrong With GCC?", not "What's Wrong with the GPL"

    20. Re:What's wrong with GCC? by Anonymous Coward · · Score: 3, Insightful

      Winsock isn't based on BSD sockets. And it wouldn't matter if it was. The original BSD source would still be there. Why does every BSD scaremonger act like the original source goes away? How many decades of BSD software has to exist without issue before people stop making this bogus argument?

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

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

      Precisely who do you think has done a lot of the development on Clang/LLVM over the last few years and contributed it to the wider community?

    23. Re:What's wrong with GCC? by Alex+Belits · · Score: 2, Insightful

      You know, it's been my experience that when someone says something along those lines (any other way of doing something is shit, and anyone who does it is shit) that they really don't know what they are talking about, are full of themselves.

      Or, maybe, they have seen it done the shit way before, and want to warn people against doing it again.

      --
      Contrary to the popular belief, there indeed is no God.
    24. Re:What's wrong with GCC? by Anonymous Coward · · Score: 3, Interesting

      Someday, when the whole world of technology is balkanized, where premium code contributions are walled of into proprietary software owned by Apple, Google and Facebook, we will wonder how "open source" became a form of virtual date rape.

      Quite the opposite from what I've seen. iXsystems, Isilon, Netapp, etc., have found it much better to contribute non-special sauce code back to the project than keeping it in house. Any patches that you don't contribute, you have to maintain, and over time will drift from the mainline development of the public code. Unless the patches are very sensitive and core to your product differentiation, it makes no sense to keep them hidden.

      People will contribute back to BSD projects because it is the most practical thing to do.

      I'm sure you can see similar things with Postgres, which is also BSD-licensed.

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

      iXsystems. Juniper Networks. Apple

      I'm willing to bet that all three have some proprietary stuff that they're not feeding back. It doesn't mean that they completely ignore the community. Apple owns CUPS now. iXsystems picked up FreeNAS development.

      GPLv3 wouldn't probably make it anywhere into these companies.

    26. Re:What's wrong with GCC? by UnknowingFool · · Score: 2

      What the hell are you talking about? Apple contributes a great deal to open source including LLVM, Darwin, etc. Apple prefers BSD style licenses over GPL but does both licenses.

      --
      Well, there's spam egg sausage and spam, that's not got much spam in it.
    27. Re:What's wrong with GCC? by gnasher719 · · Score: 3, Insightful

      And WHY would a company want to avoid GPL compiler, unless it intends to distribute a sabotaged version of the compiler?

      Apple had no problem using a GPL v2 licensed compiler. It looks like they have a huge problem using a GPL v3 licensed compiler. I suppose it has something to do with the difference in the licenses.

      Now you might want to consider the effects on a software developer of integrating a compiler into your own product. Which happens for example if you use OpenGL, or OpenCL.

    28. Re:What's wrong with GCC? by gnasher719 · · Score: 2

      GPL'd software is open source, so if you don't think the documentation is sufficient go and read the source and write better documentation for it.

      Here's the thing: If I don't think the documentation is sufficient that's it. I'm not going to waste my time reading the gcc source. It's not that entertaining and I have a lot better things to do with my time. And if the people who wrote the compiler can't be bothered writing documentation, why should I?

    29. 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.
    30. Re:What's wrong with GCC? by Altus · · Score: 3, Interesting

      And yet, as so many people here love to point out when it favors them, you still get to have the pig. Apple has taken nothing, the pig still exists as ever and apple has provided you with a sausage as well.

      Maybe you don't like sausage and thats fine, but don't act like someone took away your (or anyone else's) pig.

      --

      "In America, first you get the sugar, then you get the power, then you get the women..." -H. Simpson

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

      I'm just on my way back from BSDCan and the FreeBSD DevSummit. At the DevSummit, there was a Vendor Summit, for companies that use FreeBSD in their products. Not all were there (Sony, for example, was absent), but companies like Fusion IO, Yahoo, IX Systems, Juniper, Apple, and so on all sent people. There were about 40 companies represented in total, for a developer meeting with about 70 attendees.

      --
      I am TheRaven on Soylent News
    32. Re:What's wrong with GCC? by pankkake · · Score: 2

      > Libertarians hate GNU.

      Libertarian here. Nope.
      Against copyright, patents, etc.

      --
      Kill all hipsters.
    33. Re:What's wrong with GCC? by unixisc · · Score: 2

      Well, if somebody wants the code they write to be used by others and popularized that way, it would make sense to use BSD, or one of the less restrictive licenses. There is a plethora/bonanza (depending on which way one looks @ it) of licenses, which gives every software project plenty to choose from - from downright proprietary to less restrictive ones like BSDL to most restrictive ones like GPLv3. Given how many companies wouldn't touch GPL software, if a project wants its work to be used by such a company, it would make sense for them to use a license that their customer prefers. Sometimes, that may even result in the creators of such software being hired to write enhancements to it that are closed, and then get duly paid for it, thereby earning a living from that software. If however, the liberation of software is most important to them, then they ought to license it under GPLv3.

      Just as there are consequences to all actions, licensing something under the GPLv3 also has its share of consequences. Namely, that work that one does under GPL is likely to be avoided by a lot of potential customers, and also, that making money directly from the software would be quite problematic, w/ a few rare exceptions, such as Red Hat, which figured out early how to go about it.

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

      There are companies shipping FreeBSD-based products using MIPS, ARM, and PowerPC, as well as x86[-64]. ARM support in LLVM is good (ARM and Apple both work on it). MIPS support is mostly there if you use an external assembler, but the integrated assembler is broken - some MIPS people are working on it. PowerPC just has three guys working on it, but everything except some thread-local storage models and position-independet code on 32-bit work. We're probably going to flip the switch for x86[-64] to default to compiling the base system with clang this week (I meant to do it yesterday, but I was only near my computer at the same time as I was near beer, and thought that this was a commit that should be done sober). For other architectures, it may take a little bit longer.

      --
      I am TheRaven on Soylent News
    35. Re:What's wrong with GCC? by TheRaven64 · · Score: 3

      Do they? Because at the BSD DevSummit last week there were a lot of guys who work at big companies, and all of them are contributing code...

      --
      I am TheRaven on Soylent News
    36. Re:What's wrong with GCC? by hairyfeet · · Score: 5, Insightful

      I normally don't respond to ACs but this is one thing I've noticed and found interesting....anybody notice how the Anti-BSD GPLers sound a HELL of a lot like the RIAA? Both act as if copying is stealing, both come up with these giant FUD scenarios of doom which never seem to happen, and both act as if THEIR way is the only 'right" choice and frankly you are an idiot or "one of THEM!" if your views don't stay in lock step with their own.

      I just find it fascinating that those that constantly scream they are for "freedom" sound a hell of a lot like the most restrictive bunch out there.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    37. Re:What's wrong with GCC? by UnknowingFool · · Score: 2

      What? Have you read a quarterly statement by Apple recently? Apple makes more profit than any other phone maker and little of it came from software. Overall Apple made 47% gross margin with the vast majority coming from hardware. Apple prefers BSD because it has fewer restrictions than GPL. It's more practical to them. There isn't anything more nefarious than that reason.

      --
      Well, there's spam egg sausage and spam, that's not got much spam in it.
    38. Re:What's wrong with GCC? by Anne+Thwacks · · Score: 2

      As successes, none of the above can be compared with Netcraft saying you are dying 20 years in a row!

      --
      Sent from my ASR33 using ASCII
    39. Re:What's wrong with GCC? by mark-t · · Score: 3, Insightful

      Whether or not you consider this to be a sabotaged version depends on if you believe BSD-licensed source code suddenly disappears from existence the moment a company uses it for something.

      The funny thing about this is that it is *EXACTLY* what can happen.

      Although unlikely with high profile projects, a situation could easily exist in a smaller scope project where somebody uses an allegedly more liberal open source license than how they might see the GPL, perceiving the latter as perhaps somewhat "viral", and then what happens is some company with a lot more cash than the initial developers comes along, modifies it, and distributes it essentially as their own product. With no obligation to release source code, consumers of the product are left unaware of its origins. With a higher public profile than the original developer, the original developer's credibility is not actually improved by the distribution of his own software under different licensing terms than those he originally used. Although his ability to independently distribute is not impacted, the simple fact that he may not have the distribution capacity of the larger profile company would end up adversely impacting him. Worse, when he does attempt to claim credit for it when dealing with people or companies that he is endeavoring to do business with, they may perceive him as trying to take credit for what they perceived as the larger company's work.

      Finally, of course, if the original author is unable to continue his software before somebody else who values its free distribution manages to take up the gauntlet of sharing it freely with other people, then even though derived works of it may be available under another license, the open source nature of the work will be gone, forever.

    40. Re:What's wrong with GCC? by Anne+Thwacks · · Score: 3
      Some of us (BSD people) are old, wizend and experienced. We have found by experience, often personal, that some companies are not actually run by Gollum, and find that it is beneficial to give back improvements so the public source tree has them, and the public maintains the new, improved, code for free.

      If software is infrastructure, and not part of your product, this is almost certainly the case - you want the software to work well, but you don't want the cost of maintaining it.

      Notwithstanding this, many companies ARE run by Gollum, or arsehats, or corporate lawyers (guaranteed worse than decendents if a illegitimate union of Gollum and arsehats). That is life - suck it up!

      --
      Sent from my ASR33 using ASCII
    41. Re:What's wrong with GCC? by Anonymous Coward · · Score: 2, Insightful

      Apple just wants to clamp down everything to be BSD so they can batter down all hatches eventually for the day when they give nothing back

      Troll much? Apple give A LOT back to BSD, but just excludes a few lines of proprietary code. Apple is highly encouraged to contribute because a large divergence from upstream makes it progressively harder and harder to patch.

      GPL shills spread more FUD about BSD license than MS ever did about Linux. I find it really funny and quite saddening that opensource fights itself.

    42. Re:What's wrong with GCC? by Anonymous Coward · · Score: 2, Insightful

      Me too, but I know what he means. He's clearly talking about what Kevin Carson calls "vulgar libertarians." You know the ones I'm talking about, who think sweatshops are cool, and who have no real principles except "if it smells vaguely of patchouli, it's evil and I'm against it!" You see quite a few on slashdot, sad to say.

    43. Re:What's wrong with GCC? by Lisias · · Score: 2

      I never implied BSD is loosing (or would do) contributors.

      I was replying to the (implicit) statement that contributors worth less than the code.

      Make no mistake here. The more valuable resource any open source project has (BSD including) is not the code.

      --
      Lisias@Earth.SolarSystem.OrionArm.MilkyWay.Local.Virgo.Universe.org
    44. Re:What's wrong with GCC? by catmistake · · Score: 2

      The BSD guys are an interesting crowd. Well they can continue to watch Microsoft and Apple pilfer their software stack usually giving nothing in return while they can use GNOME or KDE or whichever other GPL or LGPLed project exists on their system (takes only a recompile) because otherwise they don't have a useable desktop and are stuck with 1980s user interfaces.

      Pretty sure neither Microsoft nor Apple uses GNOME or KDE, but don't let that interrupt your rant.

      I have used clang and it was neither faster to compile nor produced faster code than GCC. The only noticeable thing is the ANSI colored error messages... blech. I understand it is supposed to be easy to port because of LLVM but the fact is GCC has already been ported basically to every architecture that matters so it probably wasn't that hard to port GCC either.

      I take no issue with this part of your opinion... as it is close to mine.

      Apple just wants to clamp down everything to be BSD so they can batter down all hatches eventually for the day when they give nothing back. All it takes is a change of heart or leadership. I still remember in the early days they only released source code much time after they did the release which is counter to the GPL people had to beg to them to get access to the source code or, heaven forbid, actually participate in development (it seems for Apple all developers outside of Apple are a bunch of idiots who can't code or something).

      Just fyi, Apple is an enourmous contributor to OSS. Here's what they admit to, but even if there wasn't all that, IMHO, WebKit alone would be sufficient to compensate humanity for all the OSS technologies from which they have freely and legally benefitted.

    45. Re:What's wrong with GCC? by jo_ham · · Score: 2, Insightful

      What?

      How are Apple "stepping on your feet" by using BSD code and developing successful products with it? If OS X had flopped would you still be saying that?

      Apple has put a great deal of effort into open source development because they realise that it is mutually beneficial to everyone concerned. Oh, of course their primary goal is their own success and their own bottom line, but they have been able to strike a pretty good balance with open source software and the community at large on their rise into the company they are now.

      Apple are only "stepping on your toes" if you feel jealous of their success or the fact that they aren't legally forced to release the entire source code of OS X because they used a large proportion of BSD code in it. For some reason you think this is Apple being "unfair" or "leeching off the back of the OSS community" to make money. This view is very petulant and childish, and ignores the fundamental truth that *that's how the BSD licence works* and that method of development is *actively encouraged by the licence*. It's precisely why the code was released under that licence.

      It also ignores the *enormous* contributions to Open Source (both 'legally forced' on GPL projects like KHTML/WebKit, and non-forced like Apache and BSD code) from Apple, especially with some of the large projects they have been involved with - LLVM/Clang being a big one.

      The Open Source community benefits from large companies contributing resources to it - just look at what happened with KHTML, for example, and numerous other projects that large companies have put time, money and personnel behind. The benefits are a two way street, but comments like yours about Apple "leeching" from the community are counterproductive and only damage the community's image.

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

      Really? cddl and gpl software have their own directories. You can build totally functional kernels, completely with the tools given to you by the build system, without:

      * any binary blob drivers (and yes, ath(4) doesn't need a binary blob, so you can get wireless support!);
      * any GPL or CDDL code (so no ZFS and no ext2fs, for example.)

      Please re-inform yourself of the reality of FreeBSD's distribution and structure before making such uninformed comments.

      -adrian (@freebsd.org)

    47. Re:What's wrong with GCC? by jo_ham · · Score: 2

      You just don't have a clue, do you?

      Difference between an iPod and iPhone being "one antenna that costs $1-2"? Give me a break, you're not even trying.

      You also seem to be ignorant of what the term "DRM" actually means, just throwing it around like a bogeyman. Apple's lack of exposure of the iPhone/iPod Touch's filesystem as a USB mass storage device is not DRM. It may be a silly restriction (I agree with you), but it's not DRM.

      So, your argument is Apple are shitheads because although do do have OSS specific programmers on staff (oh, and on the "Google developing their own browser" front, which HTML engine did they opt to use, eh? They certainly didn't start from scratch), you instead condemn them for their choice of business model. They do everything they're asked of and more regarding open source licences (ie, contributing back to BSD projects when they are not obligated to) but that's not enough. You seem to have changed your argument now that I called you out over their totally legal, encouraged and designed-from-the-start use of the BSD licence, now you're saying it's not enough that they contribute back to open source because they make hardware that you personally don't like. That makes them "shitheads".

      Mmm. Ok then. Come join us when you've grown up a bit and have more of an argument than "they're shitheads".

      How did they "shaft" everyone they worked with?

      Motorola and IBM - I assume you're talking about the move to Intel chips. Mmm. Really "shafting" of those two companies there, who were at a dead end with their CPU development, leaving Apple struggling for performance while Intel and AMD streaked ahead with x86, giving Apple little choice but to switch hardware architectures.

      Microsoft - a company that originally wrote MS Office for Mac (yes, it was a Mac office suite first) who ripped off the UI for the Mac and later settled the case by agreeing to continue to ship MS Office for Mac and buy $150 million in stock, who continues to this day to run a specialised Mac Business Unit for developing Mac software (that makes them a lot of money), and enjoys the benefits of Apple integrating many MS-controlled features into OS X such as Exchange and Samba. Sounds like shafting to me!

      Adobe - I assume this is about dropping Flash on iOS, given that Adobe themselves had neglected Flash on OS X for years, causing it to be an enormous performance hog and severe second class citizen compared to the Windows version. Adobe then claimed this was all about Apple "not providing" needed access to the internals of OS X to shift the blame, but this was clear nonsense given that other developers were doing *just fine* implementing flash playback on OS X with great performance (for example, the XBMC developers showing up the official Flash player on OS X by being able to play back HD flash streams at less than half the CPU use). Adobe then also claiming it was about lack of hardware decoding on OS X, even though comparisons of software-only rendering on Windows and OS X showed large disparity (not to mention XBMC seemed to do just fine).
      Adobe, of course, dropped support for mobile Flash late on in the game after realising it simply wasn't feasible due to performance reasons on mobile devices.... the exact reason Apple provided at the launch of the iPhone.

      I get that you're an Apple hater who seems to define yourself by the hate of a large corporation, but the way you skip around your arguments to keep coming back to your pre-defined hate of Apple is quite amusing when your previous arguments that justify your hate are addressed logically. I'm not claiming they're saints, or perfect, or without criticism - there is plenty of that to level at them - but blind hate is just as bad as being an "apple fanboi" - it leaves very little room for real discussion.

    48. Re:What's wrong with GCC? by jo_ham · · Score: 2

      "Apple dropped it just to thumb their nose at Adobe"?

      Just listen to yourself.

      The API was old, and deprecated when OS X was literally brand new - when OS X shipped at the start of its life. It was then kept around by Apple for ten years.

      "Notorious for breaking backwards compatibility" - right, like keeping Classic around for years after switching to OS X, then shipping and keeping Rosetta around after *changing CPU architecture* so PPC code could run on x86, and keeping an API that was already old hat by the time OS X launched for 10 years.

      "On MaOn MacOS X you need to release a new binary like every time there is a major OS upgrade." - oh come on, you can troll better than that. You're not even close to accurate.

      Adobe had *plenty of time* (over 10 years) to adapt to a new API since they knew that Carbon would go away eventually (being already officially marked as EoL when OS X shipped). That they chose not to do anything about it for a decade says more about them than it does about Apple. In that same timeframe, Apple switched from PPC to Intel *and Adobe's ancient code still kept working* on the new platform, with Adobe's customers telling them "come on, it's really time to pull your finger out here... remember what happened to Quark during the OS 9 > OS X transition... they dragged their feet on making an OS X version (since Apple kept the Classic environment around for years so they didn;t have to) and Adobe came along and stole all that lovely user share away from Quark Xpress.... They thought they were too big to be ignored and that everyone would put up with it..."

      There are many valid criticisms of Apple and OS X to be made, but "not supporting legacy software" is not one of them by a long shot. I'm amazed they did as well as they managed to with not only a switch to a new core API in OS X, but also a total change of CPU architecture in the middle, with early PPC software still running on OS X right up until the release of Lion.

      Of course, it's not the first time they've swapped CPU architecture... the 68k switch comes to mind (and even then, they kept the emulator around for donkey's years afterwards to support legacy software).

  2. in other words by phantomfive · · Score: 4, Insightful

    and suit well for their BSD needs

    In other words, it has the license they want. GCC was a thorn in the side of the collective BSD conscience, they didn't like it.

    --
    "First they came for the slanderers and i said nothing."
    1. Re:in other words by bonch · · Score: 5, Interesting

      One of the FreeBSD developers gave a talk about this. FreeBSD has commercial users, and the new GCC just wouldn't have been an option for them. The older license-compatible version still in FreeBSD wasn't receiving updates, and it was beginning to affect developers too greatly.

      Whether this compiler switch is a good thing or not depends on how much you hate the idea of commercial vendors using open source. GCC's strictness is admiral from an ideological perspective, but certainly not from a practical one. It should be noted that even Linus Torvalds adheres to a more pragmatic worldview:

      There are "extremists" in the free software world, but that's one major reason why I don't call what I do "free software" any more. I don't want to be associated with the people for whom it's about exclusion and hatred.

      It's pretty damning when Linus himself no longer refers to Linux as free software because he doesn't like the extremism of the free software movement. And why should he? He's an engineer, not a religious fundamentalist.

    2. Re:in other words by cupantae · · Score: 5, Insightful

      It's not quite as simple as that. The development of Clang is being funded by Apple. They need a BSD license so that they have the freedom to make further modifications down the line (without leaving them open). Yes, I'm a GPL advocate. No, I don't agree with Apple's ideology. But it's the case anyway.

      In any case, it doesn't do us any harm to have an underdog in the world of open source C compilers. If you only have one option, then people start treating even the programme's eccentricities as standards. The need for compatibility encourages people to document. Not to mention that the different attitude taken in Clang from the offset means that it may be more suitable for certain applications. This page makes for some interesting reading.

      --
      --
    3. Re:in other words by BradleyUffner · · Score: 2

      1) BSD: if you want your software used by corporations, and you don't care if you get anything back as a result. You are interested in fame.

      Or, you recognize that your software might be useful to others and you want to allow them to use it without placing restrictions on them (yes, requiring them to release the source code is a restriction).

    4. Re:in other words by Carewolf · · Score: 2

      *Cough* bullshit. BULLSHIT!

      Simple proof: GCC has precompiled headers, and is in some ways more modular than Clang, separate precompiler for instance? What clang has is better API for the code analytics where GCC's modular APIs are either too high level (precompiled source), or too low level (intermediate GIMPLE code).

    5. Re:in other words by TheRaven64 · · Score: 2

      I think it is more likely that they are worried about the patent grant implications of GPL 3.

      There are two things in the GPL that make companies nervous. One is the patent grant, the other is the revocation clause. It is possible to discover that the product that you are selling 100,000 instances of a month violates the GPL, and have your license instantly revoked. Getting the license granted again requires explicit interaction with the copyright holder (just getting into compliance does not make the license valid again), so if you can't get hold of every copyright holder then you have to stop distributing your product or face massive liabilities.

      --
      I am TheRaven on Soylent News
  3. GPLv3 by bonch · · Score: 5, Insightful

    Having all this great open source compiler technology competing with each other is great, but one does wonder if the alienation caused by GPLv3 was worth it, as it is the primary reason both Apple and FreeBSD embraced Clang (in fact, Apple started the Clang project). As a result, GCC wasn't updated past GPLv2 on either platform. Apple couldn't integrate GCC with their IDE like they wanted, nor could FreeBSD's commercial clients work with it. Flexibility and pragmatism usually wins out over rigidness and ideology.

    1. Re:GPLv3 by Anonymous Coward · · Score: 2, Insightful

      They can't integrate it because of the GPL not because of any technical reason. Stop being obtuse.

    2. Re:GPLv3 by kthreadd · · Score: 2

      Clang uses LLVM but Clang is not LLVM.

      LLVM came from academia and existed before Apple got interested in it. Clang came much later and was largely "created" by Apple and the incorporated into LLVM in 2.something or so.

  4. Re:Code quality will suffer by bonch · · Score: 4, Interesting

    I've heard positive and negative claims regarding this. Certainly, Apple thinks it's production-ready (I think it was Xcode 4.2 that they stopped shipping GCC). Do you have a link showing that generated code is significantly worse? Which versions were compared?

  5. Linux dev's experimenting with LLVM/Clang too by perpenso · · Score: 4, Informative

    What's wrong with GCC?

    Some people argue that LLVM/Clang offers better code generation, compile time warnings, and code analysis. Some compiler developers think the gcc code has become too bloated and complicated. Even gcc devs have described the gcc code as "cumbersome".

    There are various efforts to get Linux building under LLVM/Clang. Especially for embedded environments.

    1. Re:Linux dev's experimenting with LLVM/Clang too by KiloByte · · Score: 2

      GCC always shows the offending line, clang does not.

      For example, if you have a printf()-like function whose format string has a default value, every use will emit:
      warning: format string is not a string literal (potentially insecure) [-Wformat-security]
      without a mention of the line in question. The default value here is also a literal, making the whole warning bogus in the first place.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
  6. Go to definition of selected symbol by tepples · · Score: 2

    The only valid way of integrating compiler with custom tools is calling the compiler from them

    So what's the valid way of finding what functions exist and what variables belong to what functions? Such functionality is needed for "go to definition of selected symbol" and "search for uses of selected symbol" actions.

    1. Re:Go to definition of selected symbol by dgatwood · · Score: 4, Insightful

      Have you ever actually tried to parse a declaration reliably using regular expressions? I have. They just kept getting more and more horrible the more complex the input became, and at some point, after fixing a bunch of bugs, I concluded that it was an insane way of doing things, threw out all the regular expressions, and started over with a tokenizing parser.

      Trust me when I say that parsing declarations with even Perl-compatible regular expressions, much less BRE or ERE, is not something you want to attempt if you value your sanity in the slightest.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

  7. Re:deliberately obscured internals by Stallman et. by dragisha · · Score: 4, Interesting

    Stallman and others deliberately fought having APIs, proper documentation and to allow plugins for all parts of the GCC toolchain, to keep control of the thing.

    Mostly result of dispute with DEC SRC when GCC and parent FSF failed to enforce GPL on Modula-3. Moving target known as GCC internals has been problem ever since, mostly to "legitimate" GNU compiler developers.

    LLVM, on the other hand, made ingenious move with standard and open IR. Overall modular design is another boon.

    GCC was in blind alleys before. No real reason for them not to survive this one. Another EGC can happen, to pull GCC in future.

    --
    http://opencm3.net, http://www.nongnu.org/gm2/
  8. Not a bad idea by gman003 · · Score: 5, Insightful

    I've found that code that will compile properly under a variety of compilers tends to be of better quality.

    One of my current projects started out on an old 2.x branch of GCC. When I finally got around to updating to a current GCC, I had to fix quite a few bugs before it would actually work - the different compiler was catching problems I hadn't noticed before.

    Same when I tried compiling it under Visual Studio, or Clang - the more compilers I made it work under, the less bugs there were in the code.

    Now, if a given program actually uses some special feature of GCC, that's fine - if only one compiler will do what you need, that's fine. Or if it's too much work to maintain a "port" - I stopped maintaining the VS project files a while ago, since I no longer used it. But if you have a chance to at least test it against a different compiler, go ahead and give it a shot.

    1. Re:Not a bad idea by gman003 · · Score: 2

      How so?

      Seriously, what features? I've never tried to write anything as low-level as a kernel, but I can't think of much compiler-specific stuff besides a bunch of compiler detection to set up properly-sized typedefs. Maybe differences in assembly syntax?

      Also, clang was designed to be a drop-in replacement for gcc in many (not all) ways. Might make it easier for this case.

    2. Re:Not a bad idea by rubycodez · · Score: 4, Informative

      Linux depends on gcc-specific extensions, and not just typedefs but exact layout in memory (which C doesn't specify), in-line assembly syntax http://www.ibm.com/developerworks/linux/library/l-gcc-hacks/

  9. Gotta clang 'em all by tepples · · Score: 4, Funny

    But Clang also has many technical superiorities to GCC too. Wikipedia gives a quick outline of them.
    http://en.wikipedia.org/wiki/Clang

    And at the top right of that page is this picture. Which Pokemon is that?

  10. Gcc falls short on some technical merits by perpenso · · Score: 4, Interesting

    ... Which is hilarious because it is the BSD fundamentalists who are re-implementing huge projects just to avoid a license they don't like for no reason other than political correctness ...

    Untrue. Gcc is handicapped by political decisions in it technical design. It intentionally does not allow "others" to plug into some "internals". "Internals" that would facilitate other tool builders, especially those creating a graphical integrated development environment.

    LLVM/Clang doesn't come with such technical baggage. Its modular rather than monolithic. It is a newer code base that is far easier to work with, even gcc devs moan about the bloat/complexity of their code base. Nearly all long lived project reach a point where it is better to toss the legacy code out and start from scratch, gcc may have very well surpassed that point.

    And on some platforms LLVM/Clang simply generates better code.

    1. Re:Gcc falls short on some technical merits by mysidia · · Score: 2

      Untrue. Gcc is handicapped by political decisions in it technical design. It intentionally does not allow "others" to plug into some "internals". "Internals" that would facilitate other tool builders, especially those creating a graphical integrated development environment.

      Software you can't plug-in to and interoperate with? Isn't that the opposite of free software?

    2. Re:Gcc falls short on some technical merits by Nutria · · Score: 2

      Software you can't plug-in to and interoperate with? Isn't that the opposite of free software?

      No, but it does seem to go against the spirit.

      --
      "I don't know, therefore Aliens" Wafflebox1
    3. Re:Gcc falls short on some technical merits by shutdown+-p+now · · Score: 2

      No, they're doing it to make sure that you can't extend GCC in any way, shape or form without those extensions themselves being under GPL. That's why Stallman always hated the idea of a publicly documented intermediate language - because it would allow third-party authors to write tools to process that IL (e.g. optimizers), which, because they don't link with GCC, wouldn't be 'derived works' in legal sense.

      It's all laid out pretty clearly in their license for the runtime library - have a read.

  11. Code quality may vary with platform by perpenso · · Score: 3, Insightful

    The quality of the generated code, however, is significantly worse, at least at this time.

    That may not be accurate. My understanding is that on some platforms LLVM/Clang has the advantage.

  12. Re:Dropping the GPL ~= worse. by itsdapead · · Score: 4, Insightful

    Complaining about the GPL is like complaining that you can't play dirty pool with code licensing(see Tivoization).

    I haven't heard Apple complaining about the GPL or trying to circumvent it - they're just switching to alternative projects.

    Of course, its a pity, because even if if you Tivoized GPLv2 code you still had to share your source so people could learn from it, or use and modify it on other (or jailbroken) hardware, whereas now people are moving to BSD-style licenses with no such benefits... but if the FSF want to let the perfect be the enemy of the good, declare jihad on Tivoization and have a tilt at the patent windmill, that is their right.

    --
    In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
  13. 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
  14. Re:Code quality will suffer by MtHuurne · · Score: 2

    Both Apple and FreeBSD didn't want to adopt the GPLv3 versions of GCC, so they were stuck at GCC 4.2. Compared to that GCC version, the code generated by LLVM/Clang is not worse, in my experience.

  15. Re:Dropping the GPL ~= worse. by asdf7890 · · Score: 5, Insightful

    Complaining about the GPL

    He wasn't complaining about the GPL, he was stating (correctly) that it is one of the key reasons some groups choose not to use GCC, particularly GPL version 3 (note that FreeBSD has not used and of the recent GCC release specifically for that reason - they were fine using GPLv2).

    It is a case of choosing the right tool for the job. Until recently their choice was to redefine the job (change the parts of their projects and licensing policy that GPLv3 conflicted with), keep the old tool (using older, GPLv2 licensed, releases of GCC only), or use something less stable/proven/compatible. They chose the middle option. Now option three is replaced by "use something else that is now stable/proven/compatible enough to be an alternative" they have taken that choice. Again this isn't complaining about GPLv3, it is simply refusing to use it because it is incompatible with some of their chosen goals.

    I'm told there are technical reasons why Clang and the related tool chain are preferable to GCC in some circumstances too, though I'm out of the loop on that one so I don't know what they are or if they are significant to FreeBSD.

    While his answer was rather terse and it would have helped to be less so (it made him appear to some, to you at least, like an anti-GPL troll), what you appear to have done in your response is set up a strawman to attack. This is the sort of thing that anti-GPL people (both within the open-source arena and external to it) will jump on as "proof" that GPL advocates are rabid loonies, so by defending the GPL in such a manner you may be harming the cause rather then helping it. You might want to be more careful not to come across that way (it may not have been you intention on this occasion, but it does seem that way by my reading).

  16. Re:Dropping the GPL ~= worse. by turgid · · Score: 2, Interesting

    whereas now people are moving to BSD-style licenses with no such benefits.

    This is symptomatic of PHB/MBA thinking: short term gains/benefits that mortgage long term growth.

    In a couple of years time, there will be a proliferation of different, incompatible versions of CLang/LLVM that will be increasingly expensive to maintain. Furthermore, I can foresee vendors making incompatible changes to the code produced by CLang, subtle ABI breakage and the like. The upper levels will suffer too : vendor A's version will not be able to compile source code with vendor B's extensions and vice versa.

    Then in come the patents, and to compile certain code on a certain platform (OS version and hardware) you'll need vendor C's compiler with some new super-duper patented feature that no one else is allowed to implement.

    This sounds like the 1980s/ealy 1990s all over again. Unix wars, balkanisation, and one dominant vedor ... Microsoft, although this time it'll be google.

  17. GCC's move to GPLv3 caused this. by ruinevil · · Score: 2

    I believe it was really the Tivozation rule of GPLv3 that forced FreeBSD to abandon GCC in their base. FreeBSD wanted to ensure that a specific version of GCC would be in their highly integrated base operating system. The FreeBSD base has no real comparable analogue in the Linux world, but its a system that is tested and designed to work together from the pseudocode to the final compiled product. GPLv3, with its Tivozation clause, however, made this tying together essentially illegal.

    Also the BSDs have long since desired to remove GCC from their base system simply because it has a different license than the rest of the base. They attempted using PCC, but the code it produced was not optimized to a level comparable with GCC. clang/LLVM however, is both BSD licensed and produces well optimized code. Its also newer and cleaner code; sometimes rebuilding everything from scratch helps (though usually not).

  18. Re:Dropping the GPL ~= worse. by Stormwatch · · Score: 5, Insightful

    Many people wants _real_ freedom for their software

    No, they don't. If they did, they'd use GNU GPL v3.

    But I think you mean the opposite of what you said: people want to be free to do whatever they want with the software, including taking away the software's freedom.

    That's the thing. Free software is not about your freedom, it's about the software's freedom. It is not for the benefit of anyone in particular, it is for the benefit of the whole humanity. When you think about where rms came from, and when you read his writings, you realize that his ideal is not an indifferent "here's some code, use as you wish". It is an ideologically grounded "here's some code, it's for everyone to use, and if you build upon it, the result is also for everyone to use".

  19. Re:Dropping the GPL ~= worse. by hairyfeet · · Score: 3, Insightful

    I think one of the heads of Red Hat nailed it when he was asked about RMS: "Richard treats his friends as his enemies". Whether the community wants to accept it or not when RMS specifically targeted a single company with GPL V3 he gave a pretty damned good reason for businesses to stay away from the GPL, fear of being the target of GPL V4. BTW I personally bet that if there is a GPL V4 the new buzzword will be "Androidization" since RMS hates Android even though it has put more Linux devices into users hands than anyone else in history.

    What I do find interesting though is how many are having a shitfit when more and more move away from GPLed software when....isn't that the whole damned point of the FOSS model? that one man or one company can't dictate to the masses and the community can route around damage? Well that sure looks like what is going on to me, RMS made GPL V3 too nasty and won't come to the table and work with devs on a compromise so they are routing around the damage by choosing different licenses. Personally I figured the community would be happy as it shows that the FOSS model can't be broken or controlled by any one man and with so many licenses out there...BSD, Apache, MPL, AGPL,etc nobody has to "take it or leave it" like they do with the big two.

    --
    ACs don't waste your time replying, your posts are never seen by me.
  20. Re:Dropping the GPL ~= worse. by arth1 · · Score: 4, Interesting

    In a couple of years time, there will be a proliferation of different, incompatible versions of CLang/LLVM that will be increasingly expensive to maintain. Furthermore, I can foresee vendors making incompatible changes to the code produced by CLang, subtle ABI breakage and the like. The upper levels will suffer too : vendor A's version will not be able to compile source code with vendor B's extensions and vice versa.

    Hindsight is invariably more accurate than foresight. And in this case, hindsight tells us that there are plenty of non-GPL free packages that you use every day that haven't succumbed to either of your fears. In fact you use at least a couple of them when you read this.

    This sounds like the 1980s/ealy 1990s all over again

    That wouldn't be bad. The productivity per user has never been higher, and most of what we use now was invented then. I'd rather see that again that these modern days where ideas are scarce and productivity per user base at an all time low.

  21. Re:Dropping the GPL ~= worse. by arth1 · · Score: 2

    I think one of the heads of Red Hat nailed it when he was asked about RMS: "Richard treats his friends as his enemies". Whether the community wants to accept it or not when RMS specifically targeted a single company with GPL V3 he gave a pretty damned good reason for businesses to stay away from the GPL, fear of being the target of GPL V4.

    That's a lot of meat without bones. Fear of being the target of parasite lawyers who sue over GPL is more of the reality, whether it's GPL2, 3, LGPL or other.

    BTW I personally bet that if there is a GPL V4 the new buzzword will be "Androidization" since RMS hates Android even though it has put more Linux devices into users hands than anyone else in history.

    I'm glad you have insight into Richard's brain and can tell us what he hates.
    As for bringing more devices into the hand of people, that's not the purpose of the open source movement. At best it's a side effect. The purpose is to do what governments and their constitutions fail to do - support progress, by ensuring that new code becomes available to anyone who can improve on or learn from it.
    How many linux devices are in cell phones, TV sets and microwave ovens is irrelevant - that's application and people taking advantage of the sciences, which must not be confused with the sciences themselves.

  22. 'Tivoization' a problem? by unixisc · · Score: 3, Informative

    Of course, its a pity, because even if if you Tivoized GPLv2 code you still had to share your source so people could learn from it, or use and modify it on other (or jailbroken) hardware, whereas now people are moving to BSD-style licenses with no such benefits... but if the FSF want to let the perfect be the enemy of the good, declare jihad on Tivoization and have a tilt at the patent windmill, that is their right.

    This is absolutely the case! When TiVo was complying w/ GPLv2, the FSF suddenly discovered a major objection to their practice - namely, that they were putting the code in read-only devices, and declared a jihad on the company. However, even GPLv3 doesn't explicitly say that GPL software cannot be put on a Read-only memory (which would again violate the GNU's Freedom #3) or copy-protect memory (which could prevent the device that contains the software from getting copied) or anything else about the devices that the software can reside on.

    As you very well put it, it's one more of those cases of the perfect being the enemy of the good, and in the process, the FSF waging a war on its own licensees, namely TiVo. Given that track record, which company in its right mind, even if they endorsed the liberation of software, would want to get into bed w/ the FSF?

  23. Re:Dropping the GPL ~= worse. by hairyfeet · · Score: 4, Insightful

    Here is what I personally don't get, maybe someone can explain it to me, but WTF was it with RMS and the TiVo? It was ONE device that had NO choice but to be made the way it was. It wasn't like TiVo was being run by Cobra Commander here, they knew that if there was a way to get the content off the device (which is EXACTLY what running custom versions would have allowed) it would have been banhammered in the west quicker than you can say "copyright infringement".

    Would he have been more happy if it had used WinCE? Because that is what it feels like to me, that RMS wants ONLY true followers of "the way' to use anything GPL. And since there is multiple other OSes out there including BSD and Windows Embedded it just seems stupid to attack one specific corp and make other businesses afraid of being next on RMS' shit list and all over a device that frankly could have been made no other way without only being sold at China Mart and other "pro piracy" hardware sites.

    --
    ACs don't waste your time replying, your posts are never seen by me.
  24. Re:Please review my source code mods by ZorroXXX · · Score: 3, Informative

    Static for functions or variables with file level linkage makes them "private" to that file. E.g. in this case, several source files can define global variables named world_type without collisions. That is provided all declare them static. One of the files might ommit, but if two or more source files declare non-static global variables named world_type then the linker will (correctly) complain when linking.

    --
    When you are sure of something, you probably are wrong (search for "Unskilled and Unaware of It").
  25. Re:Dropping the GPL ~= worse. by TheRaven64 · · Score: 4, Insightful

    In a couple of years time, there will be a proliferation of different, incompatible versions of CLang/LLVM that will be increasingly expensive to maintain.

    It's already happened. This is why so many companies are now actively involved in the LLVM community: it's cheaper. I'm currently on my way back from BSDCan (where I was talking a bit about the progress in switching to clang) and I was at EuroLLVM a couple of weeks earlier. Both conferences were full of corporate contributors to LLVM and FreeBSD (two projects that I work on). They like the fact that the license means that they don't need to run everything that they possibly want to do past their legal team and, over the past decade, they've all discovered (at different speeds) that it's much cheaper to engage the community and push work upstream than it is to maintain a private fork.

    You get much better support from companies that join your community because they regard it as being good for them than if they dump code on you because they are legally obliged to. We don't want drive-by code dumps, we want long-term commitments to maintenance.

    --
    I am TheRaven on Soylent News
  26. Re:Incremental recompilation by ommerson · · Score: 2

    It's entirely necessary if using the compiler to drive code completion, syntax highlighting and in-edtior display of compiler errors and warnings. All of these are things are highly interactive and users will notice the lag of GCC getting invoked every time they type a character in their editor. GCC's clunky pre-compiled header support really doesn't help matters.

    Of course, as I said earlier, lots of tools have provided this kind of functionality without deep integration of the compiler into the editor, but ultimately to do it properly, you'd still be looking at a great deal of effort to implement the first couple of stages of the compiler pipe-line and get an AST (or equivalent).

  27. Re:Please review my source code mods by colinrichardday · · Score: 3, Informative

    According to Kernighan and Ritchie, the static modifier restricts the scope of externally declared variables to the rest of the source file. AC might not want to accept the GPL and BSD definitions of free/unecumbered to non-software contexts.

  28. Re:Code quality will suffer by TheRaven64 · · Score: 4, Informative
    At -O2 and -O3, clang and gcc are within 10% for the vast majority of code, with no overall winner. There are a few corner cases, however:
    • The autovectorisation support in LLVM is a very elegant design, but is very new code and so still performs worse than GCC in a lot of cases (about 70% of the autovectorisation test suite is faster with GCC).
    • Clang has no in-tree support for OpenMP, so anything using OpenMP (vaguely competently) will be faster with gcc because clang will fall back to the single-threaded version.
    • GCC's Objective-C support is just embarrassing, and (on non-Apple platforms) performance can be an order of magnitude better with clang, with a 20-50% speedup being pretty common.
    --
    I am TheRaven on Soylent News
  29. GCC license by maestroX · · Score: 3, Interesting

    GCC doesn't need GPL, a freeware license would suffice.

    Over the years I've read and analyzed the sources and consistently found the source to be as readable as the binary code, regardless of platform.

    Compiler developer forums seem to confirm my findings with frequent comments and insults on GCC like:

    • "you retard GCC haxxors do macro-ni and spaghetti all day! "
    • "how do I build XXX frontend for GCC?" [first and last post of many aspirant compiler developers]
    • [primordial grunt] "<junk>" [poster last seen on VB forum]

    Nonetheless, I praise the omnipotence of GCC, as long as I'm not the first guy on a new platform.

  30. Re:Dropping the GPL ~= worse. by russotto · · Score: 4, Informative

    Here is what I personally don't get, maybe someone can explain it to me, but WTF was it with RMS and the TiVo?

    Tivo did exactly what RMS started the Free Software Foundation to prevent (The Printer Story). What did you expect would happen?

  31. Re:Dropping the GPL ~= worse. by asdf7890 · · Score: 4, Insightful

    Here is what I personally don't get, maybe someone can explain it to me, but WTF was it with RMS and the TiVo? It was ONE device that had NO choice but to be made the way it was.

    If it had not been TiVo it would have been something else. His problem was the use of GPLed software in that manner. While it wasn't found to break the letter of the license it broke the clearly stated spirit of the license, so that wording was updated in v3 to patch the hole.

    Would he have been more happy if it had used WinCE?

    Yes, basically. Or some form of BSD (the licenses used there would allow this sort of use IIRC). Or anything else not GPL licensed. They had those choices available to them.

    RMS is an absolutist on this and similar matters (some would say extremist, but I feel that label to be rather too strong here): if you want to use Free, keep it Free with your use, otherwise use something else (paying for it if need be).

    it just seems stupid to attack one specific corp

    He wasn't going after one specific corp, just the first one that did it (visibly) first and shoring up the hole before others tried. Remember that TiVo could keep using GPLv2 software as they had already done, they'd just have to start maintaining by other means once later versions switched to GPLv3, so the switch to GPLv3 did not explicitly stop them distributing their product.

    and make other businesses afraid of being next on RMS' shit list and all over a device that frankly could have been made no other way without only being sold at China Mart and other "pro piracy" hardware sites.

    That is where it falls down of course, but so does every other license commercial or otherwise - if you can't enforce the license in a territory people wanting to do something against the (letter of the) licence in that territory are at an advantage to those elsewhere. "Pro piracy" regimes are not a GPL specific problem and not really relevant here - you could just as easily state that VMWare's recent licensing model changes are an attack on compliant companies.

    There are many people who think RMS is wrong on the matter, of course. Linus for instance still explicitly uses GPLv2 as evidenced by it being the license git is released under (the kernel is a different matter: that could not be switched even if he wanted because of how many contributions there have been where rights were not explicitly handed over to the project).

  32. All of this bickering misses the point by Jeff- · · Score: 4, Insightful

    I'm a 10 year+ FreeBSD contributor. You're all missing the point. Linux and BSD target different markets and are optimized in all ways, organization, release process, license, code, to fit these different needs. One isn't better or worse. Obviously Linux is larger in all ways than BSD but larger doesn't mean better or we'd all just be using windows. This isn't a question of llvm being better than gcc, bsd being better than linux, or bsd license being better than gpl. They are just different and do different things. Use what's appropriate for your needs and leave it at that.

    I can say as a long time contributor to opensource software I am disgusted at reading the comments of blowhard 'enthusiasts' who denigrate the hard work and contributions of hundreds of people when they get in these pissing matches. I am friend with Linux kernel contributors and I can guarantee we don't flame each other in this manner.

  33. Re:Dropping the GPL ~= worse. by marcello_dl · · Score: 2

    > The productivity per user has never been higher

    There were no software patents, so the point is very debatable.

    --
    ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
  34. Use of Java/Apache vs C/C++/Gnu by theshowmecanuck · · Score: 2

    I know there are reports that C is even with Java again. But what you say made me wonder about this. Despite what Java advocates say, the idea of the app server and enterprise Java was not new to Java. There were and still are brokers around that do much of what a Java app server does, but using C/C++. Tuxedo is one. The thing I am thinking about however, is that Java started a heyday when groups like Apache came around and there was a huge resource of Java utilities and helpers and libraries that were free, and free of encumbering licenses like the GNU license. And Apache thrives despite not having the clause that says you have to give your code away if you use any part of theirs'.

    I'm theorizing that Java took off because despite being further behind in enterprise architecture than C at the time (remember Tuxedo et al), it had a support community that didn't encumber the companies, so they backed this stream. C which also has a ton of libraries, but was hamstrung by GNU and thus falling behind in business use case libraries (and those being made being GNU laden and repulsive to most businesses). I see this as the reason for Java's rapid rise. I think it has faltered lately with the crap Oracle has and is trying to pull with Java which is although at the opposite end of the spectrum is just as hampering to other businesses as is the GNU license.

    Anyway, maybe with a BSD (and Apache like... although yes, Apache is really BSD-like) licensed compiler, and maybe the founding of an Apache like foundation (how about C is for Comanche?), the C language can take off again.

    P.S. as to your route around the license by using other types: of course you're right. It is like all software. If you bring in something that people are supposed to use at work say, but the software makes it harder to do than by hand, people will start doing things by hand again. Even if it is slightly easier but it makes it frustrating for whatever reason, they will find some other way to do the work. It takes people with real foresight to understand this though.

    --
    -- I ignore anonymous replies to my comments and postings.
  35. History by TopSpin · · Score: 4, Interesting

    At the moment I write this there are 297 comments mostly debating the merits of LLVM/Clang vs. GCC. There is not one mention of EGCS.

    Fifteen years ago GCC was forked. A group of people we're frustrated with GCC and its leadership because they had contributions to make and talent to offer that was not welcome. They called their fork EGCS.

    Why are we doing this? It's become increasingly clear in the course of hacking events that the FSF's needs for gcc2 are at odds with the objectives of many in the community who have done lots of hacking and improvment [sic] over the years.

    The GCC you use today is EGCS. A few years later EGCS was adopted as GCC 2.95 after the merits of EGCS became undeniable.

    Looks like we've come full circle. The cool kids are off in the weeds making cool stuff. Better stuff, and the `Powers That Be' are not interested. The `needs' of the FSF today are no longer in sync with the `needs' of the developers of today.

    The bottom line is that GCC as it is with it's leadership, code base and license agenda doesn't cut it for those who have the talent, motivation and capital to create a tool chain that does cut it. You don't get to impede that, however righteous you think you are.

    Freedom. Deal with it.

    --
    Lurking at the bottom of the gravity well, getting old
  36. Re:Dropping the GPL ~= worse. by SEE · · Score: 2

    I'm glad you have insight into Richard's brain and can tell us what he hates.

    Actually, that's the exact problem, isn't it? Nobody knows what RMS might do next week.

    The purpose is to do what governments and their constitutions fail to do - support progress, by ensuring that new code becomes available to anyone who can improve on or learn from it.

    That's clearly not the goal of the GPL3, because if it were, there would be no need of an anti-TiVoization clause, but the Affero clause would be standard.

  37. Re:Dropping the GPL ~= worse. by shiftless · · Score: 2

    And how does that "take away" anything from anyone? Am I no longer free to alter or use the original work?

  38. Re:Dropping the GPL ~= worse. by dgatwood · · Score: 3, Insightful

    That's the thing. Free software is not about your freedom, it's about the software's freedom. It is not for the benefit of anyone in particular, it is for the benefit of the whole humanity.

    The problem with that argument is that what is best for the software and humanity is not clear cut. Most of the better software out there has significant corporate backing. Far too often, open source software falls into the trap of writing code that "works for me", where "me" is defined as the person who wrote it, yet tends not to "work for me", where "me" is defined as anyone else. Corporate backing tends to fix a lot of that because you have lots of "mes" working on the code, each of whom has a significant interest in making it work correctly and reliably (because they're getting paid to spend their time doing so). Any licensing requirements that are sufficiently onerous to scare away that corporate backing, therefore, tend to result in software of lesser quality.

    IMO, the ideal situation is a BSD or similar license with the code owned by a non-profit organization. In this way, you have a reasonable assurance that the code won't suddenly get closed by its primary maintainer, and other companies are unlikely to want to close the code themselves because of the maintenance headaches of keeping a proprietary branch in sync with something that is regularly getting updated by others. However, companies are willing to work on the software and improve it because they don't have to worry about crossing some fuzzy line and getting sued.

    --

    Check out my sci-fi/humor trilogy at PatriotsBooks.

  39. Re:Dropping the GPL ~= worse. by agrif · · Score: 2

    I always thought about it this way: the GPL is about user freedom, and BSD is about developer freedom. If you're using GPL'd software, you are explicitly given the right to know what it's doing and the right to change it. If you're developing with BSD software, you're given the right to control how it's integrated into your project and how it's distributed. Unfortunately it's impossible to guarantee both rights at the same time; the correct choice for each project depends a lot on how that project is meant to be used.

    I lean towards GPL, because there's nothing more frustrating for me as a programmer than not being able to control or fix something that's running on my computer. So when I write software, I try not to put anybody else in that position. I appreciate the appeal of BSD, though, especially when I'm working on something to sell, or on a restricted platform (like iOS).

  40. Re:Dropping the GPL ~= worse. by Lisias · · Score: 2

    Not necessarily.

    If you have control over the hardware (as Apple does), you can make hardware changes that renders the original code unusable, locking you up in the derivative closed code.

    (I'm not implying that Apple is evil - all companies are: if any of them finds a breach to restrict a freedom in order to maximize a profit, they will do it!)

    --
    Lisias@Earth.SolarSystem.OrionArm.MilkyWay.Local.Virgo.Universe.org
  41. Very close though by SuperKendall · · Score: 2

    C'mon Apple people, please back off the reality distortion. LLVM has a lot of interesting points to recommend it, but one those is very definitely not beating GCC in code optimization.

    Not yet - but it's not far behind. The only tests where it varied much were tests where OpenMP was involved, which Clang does not support yet.

    Also, back in the day when I used GCC I pretty much never turned on full GCC optimizations because I would run into odd issues at times if I tried. Sure in bench marks GCC is ahead, but how much really world code has GCC enabled with full optimization - especially a brand new GCC version like 4.7?

    As you noted LLVM has a lot of other interesting points, and the fact that the optimization is already so close to the existing battle-tested solution is a good reason for more people to migrate to the more flexible architecture of Clang/LLVM ASAP.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Very close though by Tough+Love · · Score: 2

      Random crashes on -O3.

      That is the opposite of specific. Go away troll.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    2. Re:Very close though by Tough+Love · · Score: 2

      how many projects ship with compiler settings that use -O3 by default? The kernel does as it is going for the ultimate in performance

      You are pulling "facts" out of your ass.

      The kernel is built by default with O2, or optionally Os as a configure option.

      You do not have the slightest clue what you are talking about in this, or any other post I have seen from you.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
  42. Re:Dropping the GPL ~= worse. by smash · · Score: 3, Informative

    One reason for that is because the GCC team won't accept Apple's patches for new versions of Objective-C. Apple want to move Objective-C forward, GCC has become a barrier to that, so they support CLANG/LLVM development. The version of GCC included is simply for legacy support and will be removed in due course once CLANG support for C++ is good enough.

    Clang/LLVM also gives you nifty stuff for interfacing with the IDE, far better compilation errors/warnings, faster compile times, etc.

    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
  43. Re:What can be wrong with Clang! by shutdown+-p+now · · Score: 2

    Programs compiled with Clang do not use LLVM at run-time, for optimizations or otherwise.

  44. Re:Dropping the GPL ~= worse. by eugene+ts+wong · · Score: 2

    Nonsense. BSD also gives the user the same freedom. In either case, the user can look at the sources.

    GPL is about giving rights to the giver of the code, and BSD is about giving freedom to the recipients of the code.

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

  46. Re:Code quality will suffer by TheRaven64 · · Score: 2

    If you're interested, take a look at the talk by Hal Finkel at EuroLLVM a couple of weeks ago. I believe there are actually three vectorisers in progress for LLVM, but the one Hal works on is particularly interesting because it approaches the problem with a very general solution, while the GCC version just transforms hard-coded patterns. I'm not sure if this code made it into trunk just before or just after 3.1 was branched, but I believe the plan for 3.2 is to have it along with a pattern-matching approach, which should autovectorise a superset of the cases GCC handled (which isn't really anything to brag about - I can think of four C/C++ compilers off the top of my head that do a better job than GCC at this).

    Oh, the other nice thing about this stuff in LLVM is that it's target-independent. LLVM supports arbitrary-sized vectors in the IR, along with a fairly rich set of operations, and target back ends just map these to real instructions. Once autovectorisation is done once, it can be used with AltiVec, SSE, NEON, and so on with some very minor tweaks (basically just adjusting some heuristics that decide when it's worth bothering with).

    --
    I am TheRaven on Soylent News
  47. Re:Dropping the GPL ~= worse. by peppepz · · Score: 3, Insightful

    Far too often, open source software falls into the trap of writing code that "works for me", where "me" is defined as the person who wrote it, yet tends not to "work for me", where "me" is defined as anyone else. Corporate backing tends to fix a lot of that because you have lots of "mes" working on the code, each of whom has a significant interest in making it work correctly and reliably (because they're getting paid to spend their time doing so).

    I don't see this working in the real world, e.g. with Android. Corporate backing tends to push code of low quality (cf. the plethora of bugs that were fixed when the Android specific code was put in the upstream Linux kernel) because it was written quickly due to the corporation feeling the pressure from its competitors, and because its developers are paid for the time they spend coding; their interest is focused on solving the corporation's own problems (a corporation is a very big and selfish "me") with no regards to the effect that their solution will have on others' problems (cf. what happened with Apple and CUPS). And when a corporation has moved to the next product, they have no interest whatsoever for either the old code itself or its users (cf. what happens every time a new release of Android is revealed and users would like to upgrade, but they can't because of the binary blobs or forked code).

    Any licensing requirements that are sufficiently onerous to scare away that corporate backing, therefore, tend to result in software of lesser quality.

    This is not what I'm seeing with GPL projects such as Linux and the GCC. I think that the code quality of an open source project depends more on the community that it's able to gather than its license. But even if it we assume it's so, then the problem lies with the FUD about the license rather than in the license itself. FUD that I find in your comment, too:

    they don't have to worry about crossing some fuzzy line and getting sued.

    No company has ever been sued because of "crossing some fuzzy line". A couple of companies were sued because they absolutely refused to put a tarball on an FTP site despite the fact that the authors of that code had tried to convince them to do so for years. In comparison, Google is getting sued to hell because of BSD-licensed code. The truth is that no license will make you safe from copyright/patent trolls.

  48. Re:Dropping the GPL ~= worse. by jbolden · · Score: 2

    Back then, we had people inventing things like the web

    Which took decades, GML started around in 1960. ISIL was in the 1980s. That's not a fair comparison you have no idea what technologies being invented today are important for the computing world of 2030. How would you know?

    I can tell you as someone who was around when the web starting being used in the early 1990s I didn't think of it as all that big a deal. I actually thought Gopher with built in indexing was going to be better than the HTML with graphics.

    But how groundbreaking is that diversity?

    Pretty huge. Most compilers even 10 years ago were heavily optimized for one type of code (language) to one type of CPU in one type of configuration. Even slight changes to hardware required massive shifts in the compiler, often essentially a rewrite. Today we have multi-stage compilers doing very complex compiles with a few man years at most going into getting any particular piece of hardware to work.

    In terms of functional compilers, .NET being the best example there was nothing like that a decade ago in mainstream use. In terms of the areas that compilers are moving (again .NET being a leader) with things like Hindley–Milner inference or tail-recursive reduction becoming standard those are huge improvements.

    I could go into details but this was just one example of improvement. Another area is the whole high speed handling of video, which is similar to the work that happened on sound in the 1990s.

  49. Enough holy wars by MacColossus · · Score: 2

    Here is a link to Clang's reason for creation/existence even though GCC exists. It even mentions a few reasons people might prefer to use GCC. http://clang.llvm.org/comparison.html#gcc