Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Decoupling GCC From Debian By Using LLVM/Clang

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

    Default 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. #2
    Join Date
    Oct 2009
    Posts
    2,086

    Default

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

  3. #3

    Default

    This is exactly what we are doing in Gentoo:

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

    Quote 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 at 02:44 PM.

  4. #4
    Join Date
    Dec 2011
    Posts
    2,029

    Default Linux kernel

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

  5. #5
    Join Date
    Oct 2009
    Posts
    2,086

    Default

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

  6. #6
    Join Date
    Sep 2011
    Posts
    684

    Default

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

  7. #7
    Join Date
    Sep 2007
    Location
    Connecticut,USA
    Posts
    956

    Default

    Quote 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

  8. #8
    Join Date
    Sep 2007
    Location
    Connecticut,USA
    Posts
    956

    Default

    Quote 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

  9. #9

    Default

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

  10. #10

    Default

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

Posting Permissions

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