Announcement

Collapse
No announcement yet.

Moving Towards Building The Linux Kernel With Clang

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Moving Towards Building The Linux Kernel With Clang

    Phoronix: Moving Towards Building The Linux Kernel With Clang

    While it hasn't been a news item for a couple months, a group of developers are still hard at work to advance the LLVM/Clang compiler and the Linux kernel to a point where this alternative compiler to GCC can be used for building the Linux kernel...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Any bench marks for this kernel?

    Comment


    • #3
      Originally posted by AJenbo View Post
      Any bench marks for this kernel?
      GCC is faster or much faster in most cases.
      Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

      Comment


      • #4
        Originally posted by JS987 View Post
        GCC is faster or much faster in most cases.
        http://www.phoronix.com/scan.php?pag...m32_svn1&num=1
        Yeah, but it would still be interesting to see how it affects things in general to have the kernel compiled this way (so i would sugest having the actual test be compiled with the same compiler for both test runs).

        Comment


        • #5
          Originally posted by JS987 View Post
          GCC is faster or much faster in most cases.
          http://www.phoronix.com/scan.php?pag...m32_svn1&num=1
          None of the "much faster" cases will affect the kernel in any way (they're all parts of highly specialized benchmarks that opt in to non-standard C/C++ extensions, e.g. OpenMP, rather than coding those features natively; Clang is gaining OpenMP), and many of the rest will also have small to little impact on the kernel (SIMD/auto-vectorization support, etc.).

          Benchmarks of user-space programs that are themselves highly specialized really can't do more than vaguely hint at what the kernel compiled performance will be.

          Comment


          • #6
            Originally posted by elanthis View Post
            Clang is gaining OpenMP
            Good for them, OpenMP is brilliant and far superior to having to do your own thread management every time you have a "for" loop.

            OpenMP is a wonderful and necessary technology in the age where 8-core processors are increasingly common, and even mobile phones are becoming multi-core.

            Comment


            • #7
              What's wrong with GCC?

              Can someone point out once again, what exactly is wrong with GCC?

              I'm not one to say that side projects are useless as I think that 95% of side projects have some merit, but this?

              What's the upside?

              Comment


              • #8
                Originally posted by halfmanhalfamazing View Post
                Can someone point out once again, what exactly is wrong with GCC?
                Its license changed from GPL v2 to GPL v3.

                Apple refuses to use GPL v3 software, probably because of the patent provisions that would interfere with Apple's ability to sue every living organism in the universe.

                After the license changed, Apple poured huge amounts of money into Clang. The rise of Clang is essentially Apple showing the FSF the middle finger. They built their entire product line on GCC, but didn't like the license change and now they are replacing it with their own compiler. The bonus is that they can close it whenever they want.

                It's good to have more options, as long as they're standards-compliant. Clang will take over some of GCC's share on closed, proprietary systems (like MacOSX) and BSDs (because they prefer BSD-licensed software), but it will probably never endanger GCC on Linux.
                Last edited by pingufunkybeat; 04 November 2012, 05:37 PM.

                Comment


                • #9
                  Originally posted by pingufunkybeat View Post
                  Its license changed from GPL v2 to GPL v3.
                  The license thing is why Apple is pushing LLVM, certainly. But politics aside, LLVM has the benefit of being a younger project with a much cleaner architecture - the result being that it's much easier to extend, and to embed into other systems. In contrast, GCC is big and monolithic - it's almost impossible to re-use any piece of it. The GCC devs are trying to change that, but they've got decades worth of accumulated code that makes the job harder.

                  The effect of this is that LLVM-based tools are a lot more attractive to other projects. If you write an IDE, the only way to hook into GCC is to fork out and run the compiler binary, and parse the console output to read the error messages. Whereas Clang/LLVM can be used as a library - run it in-process, and deal with input and output through a decent API.

                  Comment


                  • #10
                    Originally posted by halfmanhalfamazing View Post
                    Can someone point out once again, what exactly is wrong with GCC?
                    It embodies everything that is wrong with "free" software. From the idiotic bureaucracy of the steering committee to the horrible code documentation to the inability to address bugs in a timely manner to the rejection of bugfixes because of who wrote them.

                    It's a bloated steaming pile of stuff even without the idiocy of gpl zealots that left people with a choice, fork gcc (again) or start a new compiler from scratch.

                    Comment

                    Working...
                    X