Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38

Thread: Moving Towards Building The Linux Kernel With Clang

  1. #1
    Join Date
    Jan 2007
    Posts
    15,082

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

    http://www.phoronix.com/vr.php?view=MTIyMTU

  2. #2
    Join Date
    Sep 2011
    Posts
    702

    Default

    Any bench marks for this kernel?

  3. #3
    Join Date
    Sep 2012
    Posts
    358

    Default

    Quote Originally Posted by AJenbo View Post
    Any bench marks for this kernel?
    GCC is faster or much faster in most cases.
    http://www.phoronix.com/scan.php?pag...m32_svn1&num=1

  4. #4
    Join Date
    Sep 2011
    Posts
    702

    Default

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

  5. #5
    Join Date
    Nov 2007
    Posts
    1,024

    Default

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

  6. #6
    Join Date
    Jun 2009
    Posts
    2,932

    Default

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

  7. #7

    Default 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?

  8. #8
    Join Date
    Jun 2009
    Posts
    2,932

    Default

    Quote 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; 11-04-2012 at 04:37 PM.

  9. #9
    Join Date
    Apr 2010
    Posts
    767

    Default

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

  10. #10
    Join Date
    Oct 2008
    Posts
    897

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •