Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Unix BSD

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

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

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

Comments Filter:
  • Grin (Score:3, Funny)

    by Whiteox ( 919863 ) on Wednesday November 07, 2012 @10:40AM (#41908065) Journal

    I'm just so HAPPY!

    • by fm6 ( 162816 )

      For us non-BSD muggles, please explain why.

      • Re:Grin (Score:5, Informative)

        by Anonymous Coward on Wednesday November 07, 2012 @11:00AM (#41908335)

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

      • Re:Grin (Score:5, Informative)

        by ByOhTek ( 1181381 ) on Wednesday November 07, 2012 @11:06AM (#41908421) Journal

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

        • Re:Grin (Score:5, Interesting)

          by Creepy ( 93888 ) on Wednesday November 07, 2012 @11:35AM (#41908777) Journal

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

          • Re:Grin (Score:4, Insightful)

            by Anonymous Coward on Wednesday November 07, 2012 @11:50AM (#41908957)

            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.

            • Re: (Score:3, Insightful)

              by Zenin ( 266666 )

              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

              • 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 serve

              • 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

                • by Bengie ( 1121981 ) on Wednesday November 07, 2012 @04:52PM (#41912305)

                  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.

          • The GPL doesn't force you to give the software away. You can sell it. Indeed, RMS himself used to **sell** tapes of GPL software to fund the FSF. RedHat make *billions* on per-seat licensing of GPL software. Nor does GPL software force you, as an author, to GPL all the software. As the author you are completely free to draw the line as you wish between which bits of your software are GPL and which proprietary. You just grant yourself an exception.

            What the GPL *does* do, which a BSD licence does not, is prot

          • I have a problem with Stallman's (aka RMS) model, which says charge for hardware and give the software with source away for free.

            Richard Stallman's model says such thing. It says "if you want to save costs by using this source code then you must make your changes available to whoever uses it."

        • by fnj ( 64210 )

          It has little to do with "liking" or "disliking" the GPL. It has more to do with the GPL being incompatible with BSD's own license (and just about any other license). It's true there is a compile firewall with gcc, but it is still a less than ideal situation. BSD is also going to bring out a GPL-free C++11 stack.

        • Re:Grin (Score:5, Informative)

          by DeathFromSomewhere ( 940915 ) on Wednesday November 07, 2012 @12:08PM (#41909127)

          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.

          • by jandrese ( 485 )
            It's also hell on people who want to make a better debugger than gdb. I have always been frustrated by how terrible gdb is at handling threaded code, and amused that it was endless threading bugs that kept Hurd from ever reaching a usable state.
          • ...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.

      • by Nadir ( 805 )
        Because he's free from Free
      • Re:Grin (Score:4, Interesting)

        by fast turtle ( 1118037 ) on Wednesday November 07, 2012 @02:46PM (#41911001) Journal

        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.

  • by stox ( 131684 ) on Wednesday November 07, 2012 @11:14AM (#41908529) Homepage

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

    • Comment removed based on user account deletion
      • No its just good for your agenda, although the heavy involvement of Apple without the support of a tit-for-tat license is going to major offputting for many developers. The irony of FreeBSD switching to Clang/LLVM is not lost on me. Personally the thought of a two-level development of a browser quite disturbing.

        The reality is GCC still moves forward, and Clang/LLVM has a long way to catch up, perhaps if develops stopped developing Clang/LLVM for that everyone would again getter a btter browser, and everyone would be on an equal playing field. ;)

        but like I say I prefer a world where some do not get a better browser than others :(

      • How are they going to hire extra developers to keep the edge over LLVM?

        How have they gotten this far? It's not like GCC is struggling to keep pace in development.

        Once LLVM takes over the crown I believe it makes more sense for a lot of GCC developers to just continue their work on LLVM instead, and GCC will shrink to irrelevance.

        Why would a GCC developer move to LLVM? Do you believe that all of the developers on the project are so opportunistic that they would simply jump to a different compiler? I suspect

        • by serviscope_minor ( 664417 ) on Wednesday November 07, 2012 @12:02PM (#41909083) Journal

          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.

          • by tyrione ( 134248 )
            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 a
        • Comment removed based on user account deletion
    • or GCC will simply grab the better code and GPL it leaving it with another lesser competator

  • by RedHat Rocky ( 94208 ) on Wednesday November 07, 2012 @11:22AM (#41908623)

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

    Rename needed, certainly, it is.

    Carry on.

  • by Brian Feldman ( 350 ) <green@@@FreeBSD...org> on Wednesday November 07, 2012 @11:35AM (#41908773)

    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!

  • by Seeteufel ( 1736784 ) on Wednesday November 07, 2012 @12:20PM (#41909265) Homepage
    Is it possible to build KDE with LLVM?

Technology is dominated by those who manage what they do not understand.

Working...