Announcement

Collapse
No announcement yet.

Building Gentoo Linux With LLVM/Clang

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

  • 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
    any advantage?

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

    Comment


    • #3
      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?

      Comment


      • #4
        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.)

        Comment


        • #5
          Third compiler

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

          * Intel C Compiler
          * Open64
          * TCC
          * PCC

          Comment


          • #6
            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.

            Comment


            • #7
              Who is migrating?

              Comment


              • #8
                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

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    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?

                    Comment

                    Working...
                    X