Slashdot Mirror


FreeBSD Throws the Clang/LLVM Switch: Future Releases Use LLVM

An anonymous reader writes "Brooks Davis has announced that the FreeBSD Project has now officially switched to Clang/LLVM as C/C++ compiler. This follows several years of preparation, feeding back improvements to the Clang and LLVM source code bases, and nightly builds of FreeBSD using LLVM over two years. Future snapshots and all major FreeBSD releases will ship compiled with LLVM by default!"

68 of 360 comments (clear)

  1. Grin by Whiteox · · Score: 3, Funny

    I'm just so HAPPY!

    --
    Don't be apathetic. Procrastinate!
    1. Re:Grin by Anonymous Coward · · Score: 5, Informative

      This explains it well: http://unix.stackexchange.com/a/49970/7345

    2. Re:Grin by ByOhTek · · Score: 5, Informative

      Generally a lot of BSD users don't like the GPL, and getting rid of a GPLed compiler makes them quite happy.

      Also, although I've heard a lot about the inner workings of GCC being rather intertwined and convoluted, whereas LLVM is simpler to work with and modify (not sure how true this is).

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    3. Re:Grin by Creepy · · Score: 5, Interesting

      It isn't necessarily an issue with the GPL (aside from 3 being invasive, which I personally have an issue with and so do the lawyers I work with) - I have a problem with Stallman's (aka RMS) model, which says charge for hardware and give the software with source away for free.

      I worked for a CAD software company (we were bought by a huge multinational conglomerate, so I technically still work for them, but I moved around and rarely touch CAD these days). In our former incarnation, we sold exactly no hardware and were bundled with exactly zero hardware, but ran on pretty much every platform imaginable (9 at one point, but much fewer now, since our customers are mostly moving to Linux or Windows). Giving away our software (not to mention the source code) would be a really bad business model, but to appease those in RMS's dream world, we'd need to find hardware partners and give it away for free with the hardware and be paid by the hardware vendor - but since we have to give away source, we'd more than likely use an in-house developed proprietary language to make porting as difficult as possible. This, in fact, is a BAD and not very open business model - if we'd been bought by our current owner, we'd almost certainly be proprietary software for their hardware and not run on platforms like Linux or even Windows. This happens in the console world all the time - when Microsoft bought Bungie, they basically shafted what Bungie was known for - mac games (and took a year to release Halo on Windows/Mac to keep it XBox exclusive as long as possible to the ire of Steve Jobs - later releases became XBox exclusive). If you think that is a good thing, great for you - I don't. Incidentally, the part of the company I work for has an open data model as well - that makes it easy for customers to switch, but we are doing our jobs well because few actually do.

      I've been at odds with RMS over this for years...

    4. Re:Grin by Anonymous Coward · · Score: 4, Insightful

      With BSD software, not only are you giving away the source code, but you are giving it away with even fewer restrictions than with GPL.

      What's that you say? You want to take the software that other people have released and use it in your closed source product? Well then of course you like BSD software better. But you can obviously see why many people who write the open software prefer a GPL style.

    5. Re:Grin by DeathFromSomewhere · · Score: 5, Informative

      is there a reason for not making the front ends dynamic libraries which could be linked by any program that wants to parse source code?

      Quoth the Stallman himself:

      One of our main goals for GCC is to prevent any parts of it from being used together with non-free software. Thus, we have deliberately avoided many things that might possibly have the effect of facilitating such usage, even if that consequence wasn't a certainty. We're looking for new methods now to try to prevent this, and the outcome of this search would be very important in our decision of what to do.

      Not only is the poor design true, it was very intentional. This is why we need the LLVM project. KDevelop and such shouldn't have to write their own compiler front ends to get feature parity with Visual Studio; but right now they do.

      --
      -1 overrated isn't the same thing as "I disagree".
    6. Re:Grin by Zenin · · Score: 3, Insightful

      With BSD software, not only are you giving away the source code, but you are giving it away with even fewer restrictions than with GPL.

      But you're not forced to give all of it away, as you effectively are with the GPL.

      If you've created something that you'd like to give back to the community, you can. -And it's very often in your own best interests to do so. If however, you've created something that, at least for now, you'd prefer not to give away, well you're free to do that instead.

      The BSD model has proven that you don't need to twist peoples arms to get them to give back generously to the community. It's proven that people can have the freedom to choose whatever business model they feel is best for them, and the community still benefits greatly. Often more so then a GPL model.

      GPL... Among many freedoms it takes away, it destroys the freedom to select a business model of your choice. And worse, the few business models that the GPL does allow for are intrinsically very, very bad on the whole. You're either forcing odd hardware/software partnerships like the poster above, or you're relying upon creating sloppy software and weak documentation in order to ensure a market for your "support services". The later, IMHO, is a primary cause behind the quality issues that have forever plagued GPL software quality, design, and documentation.

      --
      My /. uid is better then your /. uid
    7. Re:Grin by Sponge+Bath · · Score: 2

      ...prevent any parts of it from being used together with non-free software

      Sounds similar to arguments against a stable driver interface for the Linux kernel.

    8. Re:Grin by the_B0fh · · Score: 2

      I think a lot of people miss the point. The copyright owner chooses the license. If you don't like the license, don't use it (as FreeBSD did).

      Whether you are forced to share or not should be one of thing things the project/company should decide on early. If it's not important, then it doesn't matter. If it *is* important, then select the appropriate license.

      It is not like you can pay Microsoft for a windows license, and then violate their license (remember hacking windows NT workstation to run IIS server?) and think it wouldn't get you into trouble. Same thing here.

      If you don't like the license, don't use it. Write your own. Simple as that.

      Don't understand why people keep making it such a huge issue.

    9. Re:Grin by statusbar · · Score: 3, Informative

      Here are some very interesting, compelling reasons to switch to Clang:

      http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Clang-Defending-C-from-Murphy-s-Million-Monkeys

      --
      ipv6 is my vpn
    10. Re:Grin by Rich0 · · Score: 3, Insightful

      Hu? Let say you release a part of your software under GPL and "draw a line" for the rest, I'm entitled to ask you to release the whole thing under GPL, unless you're able to prove that the part you put on the other side of the line is not a derivative work of GPL'd part.

      Only if you wrote part of it. If I write a program and release half of it under the GPL, the only person who can sue me over it is me.

      The GPL is only an issue if you want to steal other people's code. It doesn't force you to do anything with code you write, unless you mix it with code you didn't write and don't have a license to use (other than the GPL).

    11. Re:Grin by Tough+Love · · Score: 2

      Thanks for sharing that. Perhaps it rankles that RMS has earned himself a place in the history books as a great benefactor of society, while your snarky Slashdot posts have accomplished no such thing?

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    12. Re:Grin by fast+turtle · · Score: 3, Interesting

      unlike GCC, Clang/LLVM was designed to ensure the optimizations are the same each and every build. This means you can compile from source and check the md5 sum of your binary against the master md5 and know if the source has been modified before compilation. Critical for signed binaries.

      Another benefit is the support for older hardware that's been dropped by the GCC team along with ease of debugging. I've had compiler optimizations introduce unexpected bugs/failure mode in the Linux kernel itself that disappeared when the No Optimization flag was set. Simply put, if the kernel isn't stable, I don't give a damn how stable the rest of your system is, it's not stable because you can't trust the kernel and that's why Clang/LLVM is all about.

      --
      Mod me up/Mod me down: I wont frown as I've no crown
    13. Re:Grin by ckaminski · · Score: 3, Insightful

      Everyone seems to forget that the GPL wasn't created for DEVELOPER freedom, but for end-user freedom.

      Dummies. :-P

    14. Re:Grin by unixisc · · Score: 3, Insightful

      But you're not forced to give all of it away, as you effectively are with the GPL.

      Utterly false.

      You can license just part of your own code as GPL and release as much or as little as you want.

      You even still retain complete control of your code that you have previously released as GPL, so you can then take it and change it or use it in your closed software, or license it out for a price to someone, or release it as BSD.

      Yeah, but this right is denied downstream, ironically under the very copyleft clauses that claim to preserve the 'software freedom'.

      The BSD model has proven that you don't need to twist peoples arms

      GPL is not twisting anybody's arm. I challenge you to find a single example of a GPL project which has engaged in predatory patent trolling, deliberate compatibility breakage to harm competition, or format or protocol obfuscation to lock in customers. Things which some closed software companies engage in regularly is completely against the nature of open source development, but also open source makes it pretty hard for any of those techniques to be effective.

      Not saying it would never happen, but there is nothing about the GPL license that twists anybody's arm.

      Oh, you meant "you twisted my arm" as-in, "I want to use your code that you own the rights to, but under the terms I set. Waaahhh.". In that case, fuck you, that's copyright infringement and have fun destroying people's livelihood, hypocrite.

      It's not an issue of mere taking the code and changing the terms - let's say I took something that the GP had written and modified it, and then distribute the modified version, that's where the differences start. With GPL, I'm forced to release the source code of my modifications. With BSD, I don't have to - only the original BSD source code has to be given, but I still have the option of keeping the source code of my modifications to myself, even while distributing.

      GPL... Among many freedoms it takes away

      Stopped reading there. You're either a massive troll or a clueless friggin nincompoop.

      Read the 4 freedoms on the home page of the FSF. GPL violates every one of them.

    15. Re:Grin by unixisc · · Score: 2
      Responding to 2 of the above responses to the parent:

      Hu? Let say you release a part of your software under GPL and "draw a line" for the rest, I'm entitled to ask you to release the whole thing under GPL, unless you're able to prove that the part you put on the other side of the line is not a derivative work of GPL'd part.

      Only if you wrote part of it. If I write a program and release half of it under the GPL, the only person who can sue me over it is me.

      The GPL is only an issue if you want to steal other people's code. It doesn't force you to do anything with code you write, unless you mix it with code you didn't write and don't have a license to use (other than the GPL).

      That's a non-sequitur to what the parent had written. What he is pointing out is that if you had written a GPLed program, and he added his own part but did not want to release the source code to his modifications - under GPL, which the combined license would have to be under, he couldn't. That's not a problem in BSDL - there, since it is not a CopyLeft license, he could take that software, add his modifications and sell only the binaries. Or, if he wished, put it under a new license (so long as he preserved your credits there) that would provide the source code to paying customers, but prevent any downstream redistribution.

      Let say you release a part of your software under GPL and "draw a line" for the rest, I'm entitled to ask you to release the whole thing under GPL, unless you're able to prove that the part you put on the other side of the line is not a derivative work of GPL'd part. In other word, you cannot release half of a software as GPL.

      You can ask me to release the source code. But there is a problem: if everything we are talking about was completely made by me, then I own the rights to it. It doesn't matter whether I create new versions of it and don't publish the source code to them: it is my code. GPL applies to people who don't own the copyright to the work (that is you and everyone else in this case). So you can ask until you are blue in the face and I may ignore you as it suits me. Nothing personal to it, mind you.

      Of course, if I try to close my version of someone else's source code which is licensed under the GPL, then you would be entitled to obtain it from me if you bought a copy of my binaries... and I should comply.

      If you took someone elses GPLed code, added to it some features of your own, then that automatically becomes GPLed if combined w/ that program. That's why people term GPL as viral. So in the above example, let's say you took the GP's code, added your own stuff to it, and then while redistributing it, chose to only redistribute source code to the work from which you started. Guess what - you can't - you'd have to release everything - what he wrote, and what you wrote. That's the thing about CopyLeft.

      With BSD licensed code, or its variants, you are under no such restriction. Only thing you have to do there is preserve credits of the original authors.

    16. Re:Grin by Paul+Jakma · · Score: 2

      Yes, correct, it prevents the distribution of. Private modifications are fine either way.

      --
      I use Friend/Foe + mod-point modifiers as a karma/reputation system.
    17. Re:Grin by smash · · Score: 2

      If I take BSD licensed code and incorporate it into my commercial product, and don't release the source, it is NOT stealing. It is totally within the requirements of the license. The BSD folk want (and this is what the GPL peeps DON'T get) ANY project to have a library of well tested, standards compliant code available for use as the project author sees fit. We DON'T want to force people to reinvent the wheel to circumvent licensing restrictions if they decide they want to build a closed source project (for whatever reason).

      Closed source software will always exist - because there are jobs that need to be done that are not fun, require secrecy or whatever. I/BSD project people would MUCH rather that closed source application developers spend their time writing code that doesn't already exist, rather than spending development time and money to write/debug and maintain new code to solve a problem that has already been solved.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
  2. Not GPL, and suitable for JIT by tepples · · Score: 4, Informative

    For one thing, LLVM isn't copylefted, making it available for use as part of non-free software. (There are some major categories of software that for economic reasons cannot be released as free software; I can explain in more detail if you wish.) For another, it's designed to allow just-in-time compilation of bytecode, such as what might be seen in a Flash, Java, .NET, or JavaScript VM, in addition to standard ahead-of-time compilation of source code into native code.

    1. Re:Not GPL, and suitable for JIT by X0563511 · · Score: 2

      So, written a bit more flexibly, and licensed a bit more flexibly :)

      Nothing wrong with having a "competitor" (it isn't, but anyway you get what I am saying) from either perspective. Gives both a reason to strive to improve.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    2. Re:Not GPL, and suitable for JIT by pmontra · · Score: 3, Insightful

      These are not exactly the terms of GPL and BSD but:

      GPL is for people and companies that think "I wrote this software [together with X, Y and Z] and if somebody else makes it better they must share it with all the world, as I did."

      BSD is for people and companies that think "I wrote this software [together with X, Y and Z] and I accept the loss that somebody else makes it better and keep it for themselves because I want to have the option of getting somebody's else software, make it better and keep it for me without sharing it back."

      I think we can argue forever on the ethic merits of the two approaches (I feel in the GPL camp). Anyway both GPL and BSD make economic sense and we won't be talking about them if they didn't, one or both would be dead long time ago. If a company wants to include some big secret in its code, it must go BSD and occasionally regrets it can't use some GPL code and rant about it. Sometimes the GPL people rant about not being able to include BSD code in their projects.

    3. Re:Not GPL, and suitable for JIT by TheRaven64 · · Score: 4, Informative

      For example, we wouldn't have an Objective C compiler if NeXT hadn't been forced to release it in order to comply with the GPL.

      Speaking as the person who wrote and maintains the GNUstep libobjc and the clang support for it: Bullshit. The GPL forced NeXT to open source half of the implementation (the compiler support, not the runtime), and their implementation was such a pile of crap that it set back GCC's support for a long time. Open source support for Objective-C in clang is so much better than in GCC that it's not even worth comparing the two.

      --
      I am TheRaven on Soylent News
    4. Re:Not GPL, and suitable for JIT by TheMMaster · · Score: 3, Insightful

      Actually it is much simpler than that;

      GPL is designed to protect users' interests
      BSD is designed to protect developers' interests

      --
      Fighting for peace is like fucking for virginity
    5. Re:Not GPL, and suitable for JIT by gomiam · · Score: 2
      There is a simpler explanation: BSD is about freedom of the code, GPL is about freedom of the user.

      Actually I think you can't have both kinds of freedom at the same time: the freedom to do whatever you want with the code (and its license) allows you to limit the freedom of your users to do the same. This can be considered a minor problem (as BSD does) or a major one (as GPL does).

    6. Re:Not GPL, and suitable for JIT by kthreadd · · Score: 2

      GPL -> User has access to source code so (in theory) has less risk of vendor lock-in. BSD -> Developers can create lockin

      Well, it depends. Here on my FreeBSD system I have the source code to the entire operating system under /usr/src, it is included with the installer and can be installed during installation. Companies like Apple can use it to improve their products, and sometimes they contribute back even if all their products aren't open. However that doesn't make /usr/src go away.

    7. Re:Not GPL, and suitable for JIT by aristotle-dude · · Score: 2

      While a developer can be a user, not all users are developers. Availability of the code means squat to someone who does not know how to write code.

      That's ridiculous. If you have the code, you can *hire* someone to fix the thing, ten years after the original supplier went bankrupt or whatever.

      I need the plans for my house, even if I'm not licensed to fix the bathroom -- I need them in case I hire someone to do improvements here.

      Most every place I've been paid to work with software, the ones with budgetary responsibility have *not* been able to code themselves out of a wet paper bag. They've been readily able to get something fixed, if the source is available -- if needed by hiring someone to do it.

      No, what you suggest is ridiculous. If the software is "free" to begin with, why would I want to spend a lot of money to hire something that nobody is going to bother to maintain? That would be throwing good money after bad. You are better off looking for an alternative and choosing a product in the first place that has adequate export facilities for your data should you decide to migrate to another system later.

      You appear to be ignorant of how much software development costs to suggest that someone "hire" a programmer to maintain an abandoned product.

      --
      Jesus was a compassionate social conservative who called individuals to sin no more.
    8. Re:Not GPL, and suitable for JIT by aristotle-dude · · Score: 2

      If not for the developers, what is the point of open source?

      If not for the users, what is the point of software? If you insist on treating users as if they were developers then you will quickly lose them and destroy the relevance of your software. Software without users is nothing.

      --
      Jesus was a compassionate social conservative who called individuals to sin no more.
  3. Re:What's the clear advantage of LLVM? by Poeli · · Score: 5, Informative

    The reason FreeBSD switches to clang/LLVM is the license: BSD instead of GPLv3.

    You should give clang a try. The LLVM has a much cleaner api then gcc and the error message's are also more readeable. In terms of speed, the difference is shrinking with each release.

  4. Re:What's the clear advantage of LLVM? by alexgieg · · Score: 4, Informative

    I know of LLVM, but haven't used it, and it really seems like very few hardcore Linux/OSS devs have a clue about it. Is there really a clear advantage, or is it just an excuse to write a new compiler to solve a problem that doesn't exist?

    The actual reason, from what I remember, is licensing. They want to build a fully BSD-licensed OS from the ground up, with zero dependence on GPL-licensed stuff.

    --
    Conservatism: (n.) love of the existing evils. Liberalism: (n.) desire to substitute new evils for the existing ones.
  5. Re:What's the clear advantage of LLVM? by sribe · · Score: 5, Interesting

    I know of LLVM, but haven't used it, and it really seems like very few hardcore Linux/OSS devs have a clue about it. Is there really a clear advantage, or is it just an excuse to write a new compiler to solve a problem that doesn't exist?

    Much better modularization, so that the tokenizer used by the compiler is easily available to other tools, so that your editor does not have to (try to) re-implement all the intricacies of C++ syntax, so that parse tree & symbolic info is available to your IDE, so that it does not have to try to re-implement parsing of all the intricacies of C++ templates & namespaces in order to give you cross-referencing or even re-factoring functions (not to mention support for a debugger that can actually figure out types in a complex inheritance hierarchy).

  6. Don't knock it until you've tried it by Viol8 · · Score: 3, Interesting

    FreeBSD might not be anywhere near as popular as linux but its a damn good system, and whats more there arn't endless ever-so-slightly incompatable distributions of it. Ok, its never going to threaten Linux but its good to have a proper alternative free Unix system available that is actually interested in its end users and isn't just a pet project of the devs (unlike certain other BSDs I could mention).

  7. Re:What's the clear advantage of LLVM? by Gerald · · Score: 2

    It has a pretty good static analyzer.

  8. Genres of non-free software by tepples · · Score: 2

    Could you elaborate on the "economic reasons" certain categories cannot be released as free software?

    Certainly. I've started on this essay.

  9. Re:Why switch at all? by Cinder6 · · Score: 5, Informative

    Could check this article: http://clang.llvm.org/comparison.html

    Apple made the switch a while back in Xcode. The end result was much better debugging and refactoring capabilities.

    --
    If you can't convince them, convict them.
  10. Having a strong competitor to GCC by stox · · Score: 4, Insightful

    will drive GCC to a far greater degree than without a competitor. This is good for all involved.

    --
    "To those who are overly cautious, everything is impossible. "
    1. Re:Having a strong competitor to GCC by lister+king+of+smeg · · Score: 2

      or GCC will simply grab the better code and GPL it leaving it with another lesser competator

      --
      ---Saying gnome 3 is better than windows 8 not so much a compliment as it is damning with light praise.
    2. Re:Having a strong competitor to GCC by serviscope_minor · · Score: 4, Insightful

      Well, better for some people. I suspect that the first fallout of any industry shift to LLVM will be that the public compiler will be significantly lacking in optimizations while the expensive, proprietary versions will have all the good optimizations.

      Not just that.

      I remember the bad old days where every venduh and his dog had their own "extra proprietary super awseome dongle controlled extra awesome super cool" compiler.

      Vendors of hardware *LOVE* proprietary compilers. And by love, I mean love to break in mysterious and subtle ways.

      Once gcc took off in the embedded world, life got a lot better since many of the cheaper vendors would just use as close to stock gcc as possible (though usually with a little bit of extra internal compiler errors added), rather than some extra super proprietary extra messed up version.

      This isn't a business issue. There is no sane business case for taking a commercial compiler front end and a commercial compiler back end, filling it with extra bugs and shipping it. But hardware vendors love to believe that they have an awesome proprietary advantage in software for some reason. Even though they sell hardware. They don't, of course. I'd just say "whatever" except that turns rapidly into invective if one is forced to use their "tools".

      Once GCC came along, they believed that they no longer had such an advantage (presumably) so they stopped introducing their extra proprietary bugs into compilers, and limited themselves to a few extra miscellaneous bugs. But it was still mostly gcc and still mostly worked.

      If LLVM comes to dominate, the hardware vendors will jump right back on that attitude and make the life of the humble developer hell again.

      This isn't a religious, or philosophical issue. It's a "hardware vendors are mental" issue.

      --
      SJW n. One who posts facts.
    3. Re:Having a strong competitor to GCC by Microlith · · Score: 4, Insightful

      XCode using LLVM+CLang as the default compiler for all projects?

      That's hardly an industry shift and you know it.

      And secondly, what "expensive, proprietary version"? This does not exist - you have invented it, for the purpose of anti-BSD rhetoric.

      So we're going to ignore all of the proprietary, seat-licensed compilers out there?

      This is a paranoid possibility in your Stallman-dizzied head, not an actual fork.

      Quick! Into the name-calling and ad-hominem!

      Apple, for instance, roll all the LLVM+CLang fixes back into mainline.

      Do they? Unless you're on their compiler team you can't possibly know this.

      I believe the phrase "you mad" applies very, very well to your spittle-flecked rant here.

    4. Re:Having a strong competitor to GCC by tyrione · · Score: 2

      Intel, AMD, Nvidia, Cray and more are all moving to LLVM/Clang by default.

    5. Re:Having a strong competitor to GCC by tyrione · · Score: 2
      You're completely wrong with LLVM domination provides a gateway for Vendors to break stuff. The very manifesto of LLVM/Clang is being tested right now with Intel wanting to dump their Cilk Plus Extension into the source and getting major backlash from the core developers who refuse to put it in as it breaks with the intended foundations of LLVM/Clang. These are just a couple of the more kind remarks from Google and Apple where others are more sardonic regards to maintenance and impacting on the modularity and extendability of code maintenance this would impose and like with OpenCL Intel is discovering it has to play according to the rules everyone else in the Open Source Community play in LLVM/Clang or go home:

      Chandler Caruth writes: `` Before we go too far, and certainly before we dive in with patches, there is an important discussion which needs to take place: should Clang grow support for Cilk Plus.

      Clang has strongly resisted the urge to grow support for arbitrary vendor extensions to the C/C++ programming languages for several reasons:

      • - It aims to be a strictly standards enforcing compiler, something complicated by extensions
      • - To minimize maintenance burden, and ensure rapid development of Clang itself
      • - To avoid fragmentation, or supporting competing but different (or even opposed) extensions

      The current guidelines are that it is healthy for Clang to support an extension when there is a paper in front of the C++ committee which proposes making that extension part of standard C++, there is an active committee member backing that proposed extension, and there are indications of consensus on the direction if not the particulars of the extension as it will be standardized. Furthermore, if the extension is still undergoing significant discussion or is not yet reasonably clear that it will be a part of the upcoming standard, we really want an active, trusted member of the Clang community to be backing the implementation so that we have confidence in it getting updated to match the progress of the proposal to the committee.

      The goal here is to balance the desire to foster implementation experience with extensions to the language prior to standardization while minimizing the cost on the project and community and maximizing the quality bar of the primary Clang code base and released binaries[1][2].''

      Douglas Gregor extended the comments: `` This last comment is a stretch to the point of being ridiculous. GNU "extensions" tend to be smallish features that one would encounter when compiling code written with GCC in mind, or with GCC as the primary compiler. Cilk Plus has also been proposed for GCC, but it has not been released as part of GCC, and it's not clear that it will be released as part of GCC. It feels a bit like an arms dealer playing both sides of a conflict ''

    6. Re:Having a strong competitor to GCC by firewrought · · Score: 2

      There is no sane business case for taking a commercial compiler front end and a commercial compiler back end, filling it with extra bugs and shipping it.

      Um, what about JIT'ing OpenGL shaders and writing efficient software fallbacks for them? Or what about IDE's (VisualStudio, Eclipse) where many awesome features rely on the editor having a rich API on top of the compiler? RMS put GCC on the wrong side of the future here... many products can be made better by leveraging a compiler API at runtime.

      --
      -1, Too Many Layers Of Abstraction
    7. Re:Having a strong competitor to GCC by tlhIngan · · Score: 2

      i thought the BSD license was a "do what ever you want with it license". So the intent of the author is as is understand it is for you to do what ever you want with it including make it a different flavor of free.

      True, except the GPL claims to be even "freer" than free by the advocates who love to point how closed-source projects "steal" BSD source. The irony is that the GPL is doing the exact same thing which is legal, except the GPL forces are claiming it's superior and freer.

      So you have one opensource license that basically legally takes code from another opensource license, except the changes can't ever make it back ("tainted"), yet that license is somehow "better" because it can do that.

      Take the code - the authors intend for people to do that by choosing the BSD. Just don't claim to be the "best" free license because you can take and not give back.

  11. LLVM stands for.... by RedHat+Rocky · · Score: 2

    Low Level Virtual Machine. However, has little to do with what it is now: http://en.wikipedia.org/wiki/LLVM

    Rename needed, certainly, it is.

    Carry on.

    --
    Anything is possible given time and money.
  12. "economic reasons" by tlambert · · Score: 4, Interesting

    A lot of graphics software infringes on existing patents, but that isn't a reason you can state without risking treble damages in a lawsuit, so most of the graphics driver writers tend to just look the other way and hum as they dance past that particular graveyard. Practically, it's impossible to write genuinely competitive graphics code without infringing some East Texas idiot's patent.

    There are also cases where code has specific strategic value to a company, and they want to amortize the cost of development over some period of time before they let their competitors use the code. For example, the Soft Updates code that Kirk McKusick, Julian Elisher, and I worked on for FreeBSD was licensed under a free-for-non-commercial-use license for a period of two years before we opened it up for general use. This was to allow us to recoup the investment on developing the code by allowing us to run our hardware without a UPS, while everyone else in the market had to have a UPS to deal with power failure and recovery. If you don't have it, you have to treat a power failure as a kernel panic and do a full fsck in order to return your disk to a known good state, since you can't otherwise guarantee that it wasn't a crash followed by a triple fault, which might have written bad data to some portion of the disk. So all the competing border router/SOHO server devices had to have batteries, which increased their cost relative to our product. It's one of the reasons IBM bought our company.

    Yeah, it'd be great if some idiot were to spend 10 years of their free time neglecting their families so that all this stuff could be free, but no one really wants to be that idiot: people work on free software for love, and they work on the hard problems and productization in exchange for money, since no one is going to do scut work for free unless they're a masochist (if you happen to know one, though, I have a project or two they could tackle if they really wanted to suffer).

  13. Good job, guys! by Brian+Feldman · · Score: 2

    I have been happily using clang++ at work for a while now and am thankful for the efforts in creating a real world-class open-source compiler suite! Glad to see FreeBSD become ever-freer!

    --
    Brian Fundakowski Feldman
  14. Re:WOW by gnasher719 · · Score: 3, Informative

    Most likely the BSD maintainers and developers out there.... bout thats less then 0.00001% of 7+billion people. I'm going to guess anywhere between 1-1000 =)

    Now add in all the Mac and iOS developers and the number increases just slightly. MacOS X 10.8 is completely built using Clang + LLVM. OpenGL uses LLVM. OpenCL uses LLVM.

  15. Free software could leak cleartext or keys by tepples · · Score: 3, Insightful

    You even mention why: what would these software packages be without their WAD files, tax definition files and encryption keys.

    A video game licensed as free software could be modified to leak the decrypted WAD files. Furthermore, console makers forbid use of a copylefted engine. This means a copylefted game can't run on consoles, which means it can't use the large monitor and multiple gamepads that the player already owns for the console but wouldn't consider buying for a PC. (There are some major genres of video games that for economic reasons cannot be released as PC exclusives; I can explain in more detail if you wish.)

    A DRM crippled video player licensed as free software could be modified to leak the decryption keys, something that Disney, Fox, Paramount, Sony, Universal, and Warner Bros. forbid.

    A tax program licensed as free software could be modified to leak the decrypted tax definition files.

    1. Re:Free software could leak cleartext or keys by tepples · · Score: 2

      Think of it another way: If it's feasible to make money on a video game with a free engine and proprietary data, then why aren't there more popular video games built on engines that have been free from day one?

      Not sure what you're asking, the first part of this question is completely disconnected from the second.

      Then let me rephrase the question using grammatical parallelism to reconnect the first part to the second: If it's feasible to derive a source of revenue from releasing a video game with a free engine and proprietary data, then why haven't companies taken advantage of this feasibility and released popular video games with a free engine and proprietary data?

      And they both completely disregard what I've said above.

      Which is why I introduced that question with "Think of it another way". I was trying to establish the criterion of whether or not a particular business model has the potential for profit, as opposed to the criterion of whether or not a particular platform has the potential for perfect secrecy.

      As for Hollywood and game companies, they're not exactly poster children for moving with the times and waking up to the realities of technology.

      For companies that are behind the times, the six companies that make up "Hollywood" exert a disproportionate influence on legislation. My hypothesis is that this is due to campaign contributions, both overt (remember Chris Dodd's complaints after SOPA failed that Congress wasn't bought enough?) and as in-kind donations of airtime from their affiliated TV news outlets.

  16. Re:What's the clear advantage of LLVM? by KiloByte · · Score: 2, Informative

    Clang is in the order of 10 times faster than GCC (compilation speed) and the generated binary is 1% faster than GCC (so essentially the same but saves hours of compile-time per day on 50MB+ C-files).

    Bullshit. It's compilation is at most 1/3 faster, and on most cases I checked, the result executes between 5-25% slower. The former seems to be pretty constant everywhere, the latter strongly depends on the code base in question, with huge outliers both ways.

    --
    The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
  17. Re:What's the clear advantage of LLVM? by fnj · · Score: 5, Informative

    I don't see anybody addressing this question adequately. Here goes for a start.

    1) g++ has simply awful error messages for template code. clang++ has MUCH more helpful error messages. Of not quite so much importance, all clang/clang++ error messages are significantly better than those of gcc/g++. Looks like clang++ has spurred g++ to improve error messages in 4.8 though. They NEEDED to be improved.

    2) clang++ 3.1 has significantly better C++11 support than g++ 4.7:
          Rvalue refs for *this
          Alignment support
          Strong compare-exchange
          Bidirectional fences
          Atomics in signal handlers
          Also borrows from C99 one very significant enhancement: C99 designated initializers

    References:
    clang: Expressive Diagnostics
    C++0x/C++11 Support in GCC
    C++98 and C++11 Support in Clang

  18. Re:What's the clear advantage of LLVM? by evilviper · · Score: 2

    They want to build a fully BSD-licensed OS from the ground up, with zero dependence on GPL-licensed stuff.

    Not really true. Everyone was pretty comfortable living along-side GPLv2-licensed software for many, many years. But NOT the new GPLv3. Organizations all over the place are running away, screaming, from anything using that extra-restrictive and incompatible license. The FSF, developing the GPLv3 license, has done more to promote BSD/MITX licensed software than anyone else could have ever hoped to.

    Some companies just keep their older, GPLv2 licensed software as long as they can, but in compilers in particular, age and lack of development is a liability, so they eventually have to go out and look for more liberally licensed projects that will make a reasonable replacement. Hence LLVM has seen a flood of development effort.

    Secondly, with the change from gcc-2.x to gcc-3.x and now 4.x, compile times have climbed significantly, in favor of optimization. Even if you turn off all the options you can, you're talking about a substantially longer build time. Not an issue for your final compile for public consumption, but during development, where folks want to quickly compile an test, it's a real nuisance, which numerous develops have been complaining about.

    Apple, FreeBSD and many others went for LLVM. OpenBSD went for PCC instead.

    --
    Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  19. KDE by Seeteufel · · Score: 2

    Is it possible to build KDE with LLVM?

    1. Re:KDE by kthreadd · · Score: 2

      And for those projects I guess the FreeBSD ports system will just install gcc, so it will continue to build on FreeBSD. GCC is available in the ports tree, they just don't want to include it in the base system.

  20. Re:What's the clear advantage of LLVM? by Tough+Love · · Score: 2

    The main advantage of LLVM is that it will provide much needed competition for GCC which for the last decade has only had VCC to spur it on. Note that LLVM code can be freely transplanted into GCC while the reverse is not allowed, probably enough in itself to ensure GCC's continued preeminence even with Apple's fat checkbook backing LLVM.

    --
    When all you have is a hammer, every problem starts to look like a thumb.
  21. Your anti-GPL FUD is inaccurate and unconvincing. by Medievalist · · Score: 3, Insightful

    It seems to me that the ability to "lock up" formerly free software has enabled the worst actors in the global market for computer software to accumulate wealth and power which they have then used to distort the market to the detriment of free software authors. The GPL is a response to this perception.

    And frankly, while I support your freedom to release your code under any license you wish (a freedom many BSD people don't seem to like) I find these "GPL tekks away mah freederms" sound bites laughable. You said "it destroys the freedom to select a business model of your choice". What utter tripe.

    The copyright laws that empower the GPL (if you choose to use GPL'ed code, instead of doing your own work with the sweat of your own brow) restrict your choices of business model, just like laws against theft, murder and rape do. Comparing restriction of choices to removal of freedom is disingenuous rhetorical grandstanding; do you protest the Earth's gravity restricting your freedom to fly? Do you protest the sun's light restricting your freedom to walk around naked without getting sunburned? Do you protest society restricting your freedom to practice cannibalism and slavery? Your argument is ridiculous; it sounds like you want to steal my work against my will and profit by it, and you're crying because copyright laws will allow me to prosecute you if you try to cheat me.

    Use whatever license you choose, but stop pretending anyone ever had a "freedom" to use other people's code in ways the authors have specifically forbidden, and that this fake "freedom" has been taken away. Nothing has been lost except the ability to be an ugly, hypocritical parasite on the hard work of other people - people who are more than willing to share their efforts with the world, as long as the terms are share-and-share-alike, as in the GPL and similar licenses.

  22. Can modify GPL'd code, make money and *not* share by perpenso · · Score: 4, Insightful

    GPL is for people and companies that think "I wrote this software [together with X, Y and Z] and if somebody else makes it better they must share it with all the world, as I did."

    That is quite misinformed. Organizations can modify and use GPL'd code internally, make a lot of money off of it, and not share with anyone. I believe Google does so.

    BSD is for people and companies that think "I wrote this software [together with X, Y and Z] and I accept the loss that somebody else makes it better and keep it for themselves because I want to have the option of getting somebody's else software, make it better and keep it for me without sharing it back."

    Beyond misinformed, merely a spouting of FSF spin.

    In truth the BSD folks want the widest possible distribution of their software because they believe that will ultimately provide the computing world the greatest benefit. BSD Unix arguably did provide quite a benefit to both hobbyists and corporations.

    Perhaps more importantly is that BSD Unix was a product of the University of California, a taxpayer funded entity, and they felt that all taxpayers should have equal access to their work. That the politics of picking good users and bad, approved uses of the software and unapproved, etc was wrong.

  23. Re:What's the clear advantage of LLVM? by steveha · · Score: 2

    on most cases I checked, the result [with Clang] executes between 5-25% slower.

    I recompiled a large audio processing code base in Clang and the result was about a 2-3% speedup, with no problems. I immediately switched to using Clang for all release builds. (I still use GCC for debug builds.)

    --
    lf(1): it's like ls(1) but sorts filenames by extension, tersely
  24. Re:What's the clear advantage of LLVM? by Rockoon · · Score: 2

    Another option is to switch from hard drives to SSDs since that handles the bottleneck at its source: time spent seeking to a track.

    This guy clearly has no idea what he is talking about.

    --
    "His name was James Damore."
  25. Re:Types of freedom by kthreadd · · Score: 2

    I think it comes down to what you define as free software. The Stallman approach is of course very popular, but some say that's actually a bit more non-free since it restricts users of the source code and using BSD is in that sense more free. And it works well. Apple for example is using lots of FreeBSD in their operating system, and they contribute back.

  26. Five different virtual machines by tepples · · Score: 2

    Who would put a compiler as part of their software (either FOSS or otherwise)?

    Implementations of the Java virtual machine, the Common Language Runtime (.NET virtual machine), the ActionScript engine in an SWF player, the JavaScript engine in a web browser, or a shader engine in an OpenGL implementation need to compile platform-independent bytecode into platform-specific native code.

  27. Re:Types of freedom by sl3xd · · Score: 2

    Apple for example is using lots of FreeBSD in their operating system, and they contribute back.

    Careful, pointing out that Apple contributes back to FOSS will get you lynched on /.

    Pointing out that Apple releases their OS kernel under an open license, as well as pays to develop CUPS, WebKit, and LLVM/Clang, will result in them pissing on your grave.

    There really are far too many GPL extremists whom condemn any software that doesn't fit into the GPL orthodoxy, even if they use alternate free software licenses. It's almost comical how much it has in common with the Catholic persecution of the heretical Protestants - only this time, it's with a software license of all things.

    The BSD and Apache licenses are good examples of non-copyleft, free licenses, and in all honesty, they don't have to worry about compelling developers to contribute their changes because of simple economics: It's prohibitively expensive to maintain a closed fork, and is almost always much cheaper to just contribute the code upstream voluntarily. It's a different mechanism than the GPL's, but it still works very well.

    --
    -- Sometimes you have to turn the lights off in order to see.
  28. Re:Welcome FreeBSD! from your cousin OS X by sl3xd · · Score: 2

    Yup. In many ways, FreeBSD probably has more desktop users than Linux does; it's just that FreeBSD is renamed "OS X", and has a bunch of additional software dropped in. In many ways, OS X is FreeBSD with a set of additional proprietary userspace interface and API's dropped in.

    And yet, in spite of OS X being a 'closed fork', Apple still voluntarily contributes a substantial amount of code back to FreeBSD. To me, it's proof that the BSD license works well, and that compulsory contribution isn't the only way to get those who improve your code to send the improvements to the community. It's also proof that "closed forks," while technically possible, are practically non-existent: Even Apple can't afford to maintain a closed fork, so they contribute code back upstream.

    Sadly, there are far too many on ./ that let their emotions get in the way of factual reality, and focus on what might happen, instead on what actually does happen. Much like how the MPAA worries about how DeCSS could be used to facilitate piracy, even though in most cases it's just so we can watch our own DVD's.

    --
    -- Sometimes you have to turn the lights off in order to see.
  29. Re:Why switch at all? by beelsebob · · Score: 2

    Sure.

    1) Clang(++) produces better error messages. This is a mere nicity when dealing with C code, but it's an absolute requirement when dealing with template based C++.
    2) Clang has a much more comprehensive set of warnings that get into static analysis of your code than gcc.
    3) Clang is modular, and can be used to develop other tools using the same parser/type checker/...
    3.1) Because of this, it's been used to develop a static analyser that can be seperately invoked (because it runs substantially slower than the compiler alone) which comes up with even more nice warnings.
    3.2) Same again, but for a dynamic analyser which is in development, and does what valgrind does, and more, but without the 20 times slowdown, and with more accuracy.
    4) Clang is not specifically designed with stopping it being useful to other developers in mind (RMS has very explicitly stated that one of the design goals of gcc is to make it hard to take apart and use different bits to do useful things in other tools).
    5) Clang, when invoked with -O0, runs faster than gcc, for C code, 5-10 times the speed, for C++ code 1-2 times, and produces similarly optimal code to gcc -O0.
    6) Clang, when invoked with -O3 or -Os produces faster code than gcc (though not by much).
    7) Clang's license is more friendly than gcc's

    Basically, clang is all round better than gcc.

  30. Re:Your anti-GPL FUD is inaccurate and unconvincin by Bengie · · Score: 4, Insightful

    It seems to me that the ability to "lock up" formerly free software has enabled the worst actors in the global market for computer software to accumulate wealth and power which they have then used to distort the market to the detriment of free software authors. The GPL is a response to this perception.

    The software is always free. What they do is not make their changes free, but the original is still free as ever.

    An idea cannot be "stolen" or "taken away". The original will always remain.

    Personally, I think most people's ability to think breaks down once "infinite" is involved. I have no qualms with GPL, but your argument is full of holes. You are as bad as the RIAA claiming others steal their work and every stolen copy is a lost sale. Please revise your argument, it makes the GPL look like a bunch of zealots use it.

  31. Re:Can modify GPL'd code, make money and *not* sha by perpenso · · Score: 2

    Darwin can be left open because there is so much closed source stuff atop it before one can use darwin to make a competitor to OSX.

    That seems to be a strawman. The stuff on top of Darwin is neither BSD nor GPL, its not relevant. The fact remains that modified BSD code used by Apple is given back. Other corporations do so as well.

    I still think that those selling services based on improved OSS are not following the spirit of the earlier GPL, so again not a good point.

    The spirit of BSD is also to give back and share, and various corporations do follow this spirit without any arm twisting.

  32. Re:What's the clear advantage of LLVM? by shutdown+-p+now · · Score: 2

    Incremental parsing means that you don't re-lex/re-parse the entire text stream from the beginning every time a character or two get inserted because of user typing something. Which means that you have to have a lexerthat's smart enough to correct just the few affected tokens, and then a parser that looks at those changed tokens and updates only the affected part of the AST. Which, generally speaking, is not at all a trivial thing, especially for a language as complicated as C++ (where a single token change on one line can result in a variable declaration becoming an expression on a line in a different file).

  33. Millenium asked for economic reasons; I gave some by tlambert · · Score: 2

    There are also economic reasons that Android replicates a lot of internal Linux APIs in order to get out from under the EXPORT_SYMBOL_GPL() so it can have faster/closed source graphics drivers.

    Look, I most recently worked for Google on the ARM ChromeBook that Samsung recently announced. In the process, I did bring-up on the cellular modem and the camera, fixed the PMIC code, and did other things that ended up in the Linux Samsung 5250 board support, as well as rewrote the i8042 keyboard driver in u-boot in order to let it support ANSI 3.64 escape sequences for keys that couldn't be repreented by a single keycode. I also did work on the embedded controller and touchpad integration in the older original commercial Chromebooks from Acer and Samsung both.

    I also filed for two patents.

    Linux gets a lot of tactical development being released for free, and it gets a lot of strategic development that remains closed source. Just like much of the original Tivo work, and just like the actually high performance 3D nVidia support, all of which are also closed source.

    A company which "gets" open source development "gets" that you give away the tactical stuff so that you offload your maintenance, and you hold the strategic stuff very close to you so that you can continue to afford to pay developers to work on stuff.

    Google is in a fairly unique position in that most of the people playing with open source inside Google aren't supported by amortization of their work product, but instead are supported by advertising revenue. Frankly, most of them are not contributing to Googles bottom line (and I did not kid myself about this; I did some outstanding work, but probably the patents which could be used defensively if applied to phones or tablets was my biggest contribution to the bottom line).

    So yeah, nice work if you can get it, but not something that generally generates revenue, and I know for a fact that there is a lot of code that Google has been struggling to get into Linux for many years (e.g. the virtual TSC resynchronization code for AMD processors, for one).

    And the claim that BSD doesn't get a lot of commercial development is also BS.

    I was on the Core OS kernel team at Apple for 8 years, and was the primary kernel person involved in getting Mac OS X's UNIX certification. Inside Apple, you are not allowed to write papers for external publication, or books, without a VP signature, and you are unlikely to get one, so even if things don't get crowed about, there's a hell of a lot of commercial effort going into BSD there.

    Juniper also does a lot of commercial BSD development, and so do 3 of the top 4 L3/L4 switches and load balancers.

    You just don't see it because people who Mention features or use" of BSD licensed code, at least for the traditional BSD license, have to give credit when they are claiming a specific feature, and so rather than bother, most companies simply don't mention it.

  34. Success of open source depends on... by unixisc · · Score: 2

    The 'lack of interest' argument applies to both BSDL and GPL projects - go the the GNU software page - how many of those projects do you think are very actively pursued? In either case, the authors can die, and the archived copies, despite being 'free', can go offline. The only thing ensuring the success of any open sourced project is a combination of developer interest in developing them, and corporate interest in promoting them.