Results 1 to 10 of 10

Thread: There's Interest In Building The Linux Kernel With Clang

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

    Default There's Interest In Building The Linux Kernel With Clang

    Phoronix: There's Interest In Building The Linux Kernel With Clang

    There's growing interest in being able to build the mainline Linux kernel with the LLVM/Clang compiler as an alternative to the kernel's long-standing love-affair with GCC.

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

  2. #2
    Join Date
    Dec 2009
    Posts
    275

    Default Will it become better?

    i understand, kernel will become safer and better, but will it become quicker?
    I dont care about compilation time. difference between 5 and 10 minutes plays no role here. Will kernel be quicker?

  3. #3
    Join Date
    Oct 2010
    Posts
    438

    Default

    That depends on how many of the bugs that are found negatively affect performance. Some fixed bugs may slow the kernel down, others may speed it up, and still others will have no decernable affect on performance at all.

  4. #4

    Default

    Quote Originally Posted by dimko View Post
    Will kernel be quicker?
    Have you ever noticed the (lack of) speed of your kernel itself?

  5. #5
    Join Date
    Dec 2009
    Posts
    275

    Default There is no

    Quote Originally Posted by AnonymousCoward View Post
    Have you ever noticed the (lack of) speed of your kernel itself?
    limit to the perfection.

    I did not notice stability issues with kernel too. So from that point of view - this work is useless.

  6. #6
    Join Date
    May 2010
    Posts
    11

    Default It's only because it's not GPL

    Lets face it, the only reason qualcomm and other hardware manufactures are so interested in it (incl apple), is that it isn't a GPL project.

    They're so allergic to the GPL they'd rather spend years trying to get another compiler into shape for their own proprietary use rather than contribute to an existing project from which everybody, including their competitors, benefits.

    Good for 'em I guess, but there's no reason anyone in the public let alone the 'linux community' should be terribly excited about their efforts.

  7. #7
    Join Date
    Oct 2010
    Posts
    438

    Default

    I have two reasons:

    If their compiler eventually* becomes as good as or better than gcc, then we have two good compilers that are open source. Others being able to make that compiler closed-source does not stop us from benefiting from what is open source now, and what will remain open source in the future. While those who would not distribute certain parts of their source are selfish, if it is code that they wrote, then they should have that right (IMHO), especially since the rest is still available. Profiting from that choice may be unethical, but I honestly don't believe Apple will make much profit from clang or llvm, as long as gcc is still under active development--what profit they do make, the will likely have earned.

    As it approaches usable and useful in more and more projects, gcc's developers (and developers who prefer gcc because of it's license) will have more reason to improve gcc. Additionally, there will be more inspiration on both sides as they try out different methods of reaching the same end. They may not all explicitly have to do with the compiler, but that doesn't make them any less helpful or inspiring. This kind of competition and shared inspiration (even without shared code) is healthy and good, IMO.

    *be it months, years, or decades later, though by that time anything, including us using a completely different architecture, could happen.

  8. #8
    Join Date
    Apr 2012
    Posts
    11

    Default

    Quote Originally Posted by notzed View Post
    Lets face it, the only reason qualcomm and other hardware manufactures are so interested in it (incl apple), is that it isn't a GPL project.

    They're so allergic to the GPL they'd rather spend years trying to get another compiler into shape for their own proprietary use rather than contribute to an existing project from which everybody, including their competitors, benefits.

    Good for 'em I guess, but there's no reason anyone in the public let alone the 'linux community' should be terribly excited about their efforts.
    I hope no devs are lured by their unction. these greedy companies will kind of close-source the project once it gets mature and lucrative. Look at Apple.
    IMO, BSD is the most free license, including the freedom for companies to "hire" free labor. Dammit, I still prefer GPL, a license that promotes symbiosis of companies and individual developers.

  9. #9
    Join Date
    Jan 2010
    Location
    Ghent
    Posts
    208

    Default

    The new homepage http://llvm.linuxfoundation.org/index.php/Main_Page seems more official than the old LLL project github page

    anyway... I am trying to package this for x86_64 on AUR:

    patched llvm/clang tool chain: https://aur.archlinux.org/packages.php?ID=60611
    patched linux kernel: https://aur.archlinux.org/packages.php?ID=60600

    according to the homepage x86_64 is a work-in-progress, but used to work on the LLL project sources so I guess it will be resolved soon...

  10. #10
    Join Date
    Aug 2012
    Posts
    14

    Default

    Quote Originally Posted by notzed View Post
    Lets face it, the only reason qualcomm and other hardware manufactures are so interested in it (incl apple), is that it isn't a GPL project.

    They're so allergic to the GPL they'd rather spend years trying to get another compiler into shape for their own proprietary use rather than contribute to an existing project from which everybody, including their competitors, benefits.

    Good for 'em I guess, but there's no reason anyone in the public let alone the 'linux community' should be terribly excited about their efforts.
    I was thinking the along the same lines. Why would these companies put all this time, money & effort into making another compiler for Linux?

    The project answers the question:

    "GCC is licensed under the GPL license. clang uses a BSD license, which allows it to be embedded in software that is not GPL-licensed."
    [Source - http://clang.llvm.org/comparison.html]

    "Code in the LLVM project is licensed under the "UIUC" BSD-Style license."
    [Source - http://llvm.org/]

    and...

    "We intend to keep LLVM perpetually open source and to use a liberal open source license. As a contributor to the project, you agree that any contributions be licensed under the terms of the corresponding subproject. All of the code in LLVM is available under the University of Illinois/NCSA Open Source License, which boils down to this:

    You can freely distribute LLVM.
    You must retain the copyright notice if you redistribute LLVM.
    Binaries derived from LLVM must reproduce the copyright notice (e.g. in an included readme file).
    You can’t use our names to promote your LLVM derived products.
    There’s no warranty on LLVM at all.
    We believe this fosters the widest adoption of LLVM because it allows commercial products to be derived from LLVM with few restrictions and without a requirement for making any derived works also open source (i.e. LLVM’s license is not a “copyleft” license like the GPL). We suggest that you read the License if further clarification is needed."
    [Source - http://llvm.org/docs/DeveloperPolicy.html#license]

    They do however cite many technical reasons also which seem compelling:

    "Clang is an "LLVM native" C/C++/Objective-C compiler, which aims to deliver amazingly fast compiles (e.g. about 3x faster than GCC when compiling Objective-C code in a debug configuration), extremely useful error and warning messages and to provide a platform for building great source level tools. The Clang Static Analyzer is a tool that automatically finds bugs in your code, and is a great example of the sort of tool that can be built using the Clang frontend as a library to parse C/C++ code."
    [Source - http://llvm.org/]

    Pretty clear really.. they want to make a better compiler and they don't want it to be GPL

    Chris

Posting Permissions

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