Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: Building Gentoo Linux With LLVM/Clang

  1. #1
    Join Date
    Jan 2007
    Posts
    14,306

    Default Building Gentoo Linux With LLVM/Clang

    Phoronix: Building Gentoo Linux With LLVM/Clang

    Following this weekend's news about Link-Time Optimization support for the Linux kernel, in the discussion that spawned, building the Linux kernel with the LLVM/Clang compiler was once again brought up...

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

  2. #2
    Join Date
    Dec 2009
    Posts
    268

    Default any advantage?

    Gerntoo user here. Does it provide any advantage to use LLVM/Clang yet?
    Anybody?

  3. #3
    Join Date
    Dec 2011
    Posts
    2,001

    Default Benchmarks

    Cool!
    Linux on x86-64 now apparently compiles with LLVM according to that website.

    I look forward to seeing benchmarks of the Linux kernel compiled with GCC and LLVM.
    Even if I am convinced that GCC will perform much faster.

    It is still nice, because it allegedly improves code quality.

    Are much patches needed to compile the Linux kernel under LLVM/Clang?

  4. #4
    Join Date
    Oct 2010
    Posts
    85

    Default

    Quote Originally Posted by dimko View Post
    Gerntoo user here. Does it provide any advantage to use LLVM/Clang yet?
    Anybody?
    Yes and no. The resulting binaries are comparably fast; sometimes faster and sometimes slower than gcc. As an end user you're unlikely to notice the difference except in some rare edge cases.

    What is different is that clang compiles faster than gcc - if you build from source with portage it should save you a fair bit of time. It also produces much better error messages and warnings, which is rather nice if you're a developer. Finally, it's always smart to make sure you've got alternatives - if any political/personal/legal/technical issues show up for either compiler, there's a fallback (and the work done to make the code compile on both is probably beneficial if a third compiler shows up.)

  5. #5
    Join Date
    Dec 2011
    Posts
    2,001

    Default Third compiler

    I hope a third (and forth) compiler shows up.

    * Intel C Compiler
    * Open64
    * TCC
    * PCC

  6. #6
    Join Date
    Mar 2008
    Posts
    571

    Default

    With all the problems Linux has both on desktop and server side, someone should now please explain to me why is migrating to clang such an important and high priority task.

    This is all a political bullshit story, someone doesn't like the GNU GPL license anymore.

  7. #7
    Join Date
    Mar 2010
    Location
    Slovenia
    Posts
    389

    Default

    Who is migrating?

  8. #8
    Join Date
    Jan 2009
    Posts
    462

    Default

    Quote Originally Posted by bulletxt View Post
    With all the problems Linux has both on desktop and server side, someone should now please explain to me why is migrating to clang such an important and high priority task.

    This is all a political bullshit story, someone doesn't like the GNU GPL license anymore.
    It goes something like this:

    1: Compile Linux with LLVM/CLANG/ICC/etc.
    2: Look for things that are faster than what GCC produces.
    3: Figure out 'why' they are faster.
    4: Implement what you have discovered (in step 3) in GCC.

    The end result is a faster linux binary produced by GCC.

    F

  9. #9
    Join Date
    Apr 2011
    Posts
    302

    Default

    Quote Originally Posted by bulletxt View Post
    With all the problems Linux has both on desktop and server side, someone should now please explain to me why is migrating to clang such an important and high priority task.

    This is all a political bullshit story, someone doesn't like the GNU GPL license anymore.
    If in the future, will be able to compile to VM like LLVM does, we will not need to target only one processor with one binary. For example Android must use LLVM for Java and C++ and stop be a Java toy under patent attack. Another example is that if closed source programs and games, are compiled with LLVM, then will be compatible with all processors. Some one has to develop the way.

  10. #10

    Default

    Quote Originally Posted by dnebdal View Post
    Yes and no. The resulting binaries are comparably fast; sometimes faster and sometimes slower than gcc. As an end user you're unlikely to notice the difference except in some rare edge cases.
    Binaries are usually much slower with llvm. As an end user why would anyone bother to use llvm and make his life harder?

Posting Permissions

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