Announcement

Collapse
No announcement yet.

Decoupling GCC From Debian By Using LLVM/Clang

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

  • Decoupling GCC From Debian By Using LLVM/Clang

    Phoronix: Decoupling GCC From Debian By Using LLVM/Clang

    Back in March it was shared that LLVM's Clang compiler can build much of the Debian archive. This week at DebConf a status update was shared on using LLVM/Clang as an alternative compiler to GCC within Debian...

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

  • #2
    Which 12% won't build? Is it possible to build a system that boots and is functional with just Clang?

    Comment


    • #3
      This is exactly what we are doing in Gentoo:

      https://bugs.gentoo.org/show_bug.cgi?id=408963

      Originally posted by droidhacker View Post
      Which 12% won't build? Is it possible to build a system that boots and is functional with just Clang?
      Is it even possible to build Debian from source code as an end user?

      GRUB makes heavy use of nested functions, which makes it impossible to build with Clang without doing a complete rewrite. Then there are other issues with glibc and a few other core packages. This is from my experience with Gentoo.
      Last edited by ryao; 07-11-2012, 02:44 PM.

      Comment


      • #4
        Linux kernel

        Can Clang/LLVM build an unpatched mainline Linux kernel yet?

        Comment


        • #5
          Originally posted by ryao View Post
          This is exactly what we are doing in Gentoo:

          https://bugs.gentoo.org/show_bug.cgi?id=408963



          Is it even possible to build Debian from source code as an end user?

          GRUB makes heavy use of nested functions, which makes it impossible to build with Clang without doing a complete rewrite. Then there are other issues with glibc and a few other core packages. This is from my experience with Gentoo.
          Of COURSE its possible. If THEY can build it, ANYONE can build it.

          Comment


          • #6
            Originally posted by ryao View Post
            Is it even possible to build Debian from source code as an end user?
            You can use apt-build to do so.

            Comment


            • #7
              Originally posted by ryao View Post
              This is exactly what we are doing in Gentoo:

              https://bugs.gentoo.org/show_bug.cgi?id=408963



              Is it even possible to build Debian from source code as an end user?

              GRUB makes heavy use of nested functions, which makes it impossible to build with Clang without doing a complete rewrite. Then there are other issues with glibc and a few other core packages. This is from my experience with Gentoo.

              If Clang can't handle deeply nested functions that sounds like a bug to me and that the LLVM/Clang developers should address that issue as well as meshing with the existing glibc or providing the necessary patches to glibc that allow LLVM/Clang to build it yet not prevent other compilers from building it

              Comment


              • #8
                Originally posted by uid313 View Post
                Can Clang/LLVM build an unpatched mainline Linux kernel yet?
                AFAICT it can't. If Clang can build a kernel without requiring patches to the kernel sources that's the best thing

                Comment


                • #9
                  Originally posted by DeepDayze View Post
                  If Clang can't handle deeply nested functions that sounds like a bug to me
                  No it's not, nested functions are a gcc extension.

                  Comment


                  • #10
                    Originally posted by DeepDayze View Post
                    If Clang can't handle deeply nested functions that sounds like a bug to me and that the LLVM/Clang developers should address that issue as well as meshing with the existing glibc or providing the necessary patches to glibc that allow LLVM/Clang to build it yet not prevent other compilers from building it
                    The fact that there is nesting is the issue, not the depth of it. The issue is that nested functions are illegal in both C and C++.

                    Comment


                    • #11
                      Originally posted by ryao View Post
                      The fact that there is nesting is the issue, not the depth of it. The issue is that nested functions are illegal in both C and C++.
                      If by illegal you mean not working in standard C as is true for all compiler extensions, even those supported by Clang/LLVM. The reason they are 'extensions' is because they implement functionality outside of the standard specs. Of course lots of functionality that ended up in the official standards started out as extensions.

                      Now, if you use said extensions you need a compiler which supports them, the Linux kernel for instance make lots of use of compiler extensions simply because they want functionality not provided within the C standards. GCC has exensions, Clang/LLVM has extensions, ICC has extensions, Visual Studio has extensions, etc

                      So either Clang/LLVM support these extensions which programmers have chosen to make use of, or the code must be rewritten to work without the unsupported extensions.

                      Comment


                      • #12
                        Do we have a GPL alternative to Clang? Like LibreLLVMcompiler.? Is there any possibility for a portable GCC (GCC5 for example)?

                        Comment


                        • #13
                          Originally posted by artivision View Post
                          Do we have a GPL alternative to Clang? Like LibreLLVMcompiler.? Is there any possibility for a portable GCC (GCC5 for example)?
                          Ehh... what?

                          Comment


                          • #14
                            Originally posted by artivision View Post
                            Do we have a GPL alternative to Clang? Like LibreLLVMcompiler.? Is there any possibility for a portable GCC (GCC5 for example)?
                            What are you talking about?

                            Comment


                            • #15
                              Originally posted by artivision View Post
                              Do we have a GPL alternative to Clang?
                              Yes, it's called GCC.

                              Comment

                              Working...
                              X