Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
GNU is Not Unix Open Source Unix BSD News

FreeBSD 10 To Use Clang Compiler, Deprecate GCC 711

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)."
This discussion has been archived. No new comments can be posted.

FreeBSD 10 To Use Clang Compiler, Deprecate GCC

Comments Filter:
  • in other words (Score:5, Insightful)

    by phantomfive ( 622387 ) on Sunday May 13, 2012 @01:17PM (#39986875) Journal

    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.

  • GPLv3 (Score:5, Insightful)

    by bonch ( 38532 ) * on Sunday May 13, 2012 @01:20PM (#39986915)

    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.

  • by Lisias ( 447563 ) on Sunday May 13, 2012 @01:36PM (#39987057) Homepage Journal

    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.

  • by bonch ( 38532 ) * on Sunday May 13, 2012 @01:40PM (#39987083)

    One example would be integrating the compiler with its own custom tools. 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.

  • Re:in other words (Score:5, Insightful)

    by cupantae ( 1304123 ) <maroneill&gmail,com> on Sunday May 13, 2012 @01:42PM (#39987103)

    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 [llvm.org] makes for some interesting reading.

  • by Fred Ferrigno ( 122319 ) on Sunday May 13, 2012 @01:42PM (#39987109)

    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.

  • by Pinky's Brain ( 1158667 ) on Sunday May 13, 2012 @01:43PM (#39987117)

    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.

  • Not a bad idea (Score:5, Insightful)

    by gman003 ( 1693318 ) on Sunday May 13, 2012 @01:53PM (#39987207)

    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.

  • Re:GPLv3 (Score:2, Insightful)

    by Anonymous Coward on Sunday May 13, 2012 @01:54PM (#39987221)

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

  • by Anonymous Coward on Sunday May 13, 2012 @02:03PM (#39987311)

    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?

  • by ommerson ( 1485487 ) on Sunday May 13, 2012 @02:08PM (#39987339)

    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?

  • by perpenso ( 1613749 ) on Sunday May 13, 2012 @02:10PM (#39987353)

    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.

  • Re:in other words (Score:2, Insightful)

    by phantomfive ( 622387 ) on Sunday May 13, 2012 @02:11PM (#39987355) Journal
    Talking about 'fundamentalism' and 'how bad the other people are' is childish (yes, I'm calling you childish, Bonch). Which license you prefer is a matter of preference, and it doesn't make you an extremist, dumb, religious, or even impractical. Which license you choose is a matter of preference.

    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.
    2) GPL: if you want to help people out, but don't want a corporation to make millions without giving back. Your code might not get used as much, but you're fine with that.

    Both of these are great licenses from people who are giving their hard work away for free. Insulting either one as 'religious' or 'unethical' is incredibly unseeing and idiotic. The license you choose is a preference, nothing more.
  • by Alex Belits ( 437 ) * on Sunday May 13, 2012 @02:14PM (#39987385) Homepage

    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.

  • by itsdapead ( 734413 ) on Sunday May 13, 2012 @02:24PM (#39987445)

    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.

  • by asdf7890 ( 1518587 ) on Sunday May 13, 2012 @02:43PM (#39987599)

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

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

  • Comment removed (Score:3, Insightful)

    by account_deleted ( 4530225 ) on Sunday May 13, 2012 @03:01PM (#39987753)
    Comment removed based on user account deletion
  • by gnasher719 ( 869701 ) on Sunday May 13, 2012 @03:24PM (#39987917)

    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.

  • by Anonymous Coward on Sunday May 13, 2012 @03:30PM (#39987943)

    Many people wants _real_ freedom for their software so that all, commercial and non-commercial users can expand and use the software in any way they want.

    You mean they want other people to give them their work unconditionally, so they can profit from it and not have to give anything back? That's what I thought you meant.

  • Comment removed (Score:5, Insightful)

    by account_deleted ( 4530225 ) on Sunday May 13, 2012 @03:37PM (#39988003)
    Comment removed based on user account deletion
  • by TheRaven64 ( 641858 ) on Sunday May 13, 2012 @03:42PM (#39988059) Journal

    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.

  • Comment removed (Score:5, Insightful)

    by account_deleted ( 4530225 ) on Sunday May 13, 2012 @04:02PM (#39988263)
    Comment removed based on user account deletion
  • Comment removed (Score:2, Insightful)

    by account_deleted ( 4530225 ) on Sunday May 13, 2012 @04:18PM (#39988455)
    Comment removed based on user account deletion
  • by mark-t ( 151149 ) <markt AT nerdflat DOT com> on Sunday May 13, 2012 @04:21PM (#39988477) Journal

    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.

  • by Anonymous Coward on Sunday May 13, 2012 @04:24PM (#39988499)

    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.

  • by Anonymous Coward on Sunday May 13, 2012 @04:27PM (#39988517)

    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.

  • by asdf7890 ( 1518587 ) on Sunday May 13, 2012 @05:04PM (#39988819)

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

  • by Jeff- ( 95113 ) on Sunday May 13, 2012 @05:33PM (#39989027) Homepage

    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.

  • by dgatwood ( 11270 ) on Sunday May 13, 2012 @07:42PM (#39989939) Homepage Journal

    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.

  • by denmarkw00t ( 892627 ) on Sunday May 13, 2012 @07:43PM (#39989943) Homepage Journal

    :%s/Emacs/Vim/g

    ftfy

  • by dgatwood ( 11270 ) on Sunday May 13, 2012 @08:00PM (#39990051) Homepage Journal

    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.

  • by jo_ham ( 604554 ) <joham999@noSpaM.gmail.com> on Sunday May 13, 2012 @08:54PM (#39990401)

    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.

  • by peppepz ( 1311345 ) on Monday May 14, 2012 @07:54AM (#39993293)

    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.

Old programmers never die, they just hit account block limit.

Working...