News for hackers. Stuff that matters.

wash

Re:Clang (LLVM C compiler) builds a working Linux kernel on Tuesday October 26, 2010 @11:58AM (#1834690)
I have a 4 week break in December; I'll have ample time then to work on this. Please shoot me an email at [email protected], so we can talk this over some more.
Re:Clang (LLVM C compiler) builds a working Linux kernel on Tuesday October 26, 2010 @03:53AM (#1833422)
Oh. Well, I guess they beat me to the punch.
Re:Clang (LLVM C compiler) builds a working Linux kernel on Tuesday October 26, 2010 @03:17AM (#1833375)
Unfortunately, I'm a student with limited resources. I have three boxes, a macbook and two Atom desktops, all x86_64.
Re:Clang (LLVM C compiler) builds a working Linux kernel on Tuesday October 26, 2010 @03:13AM (#1833368)
I'm a hacker. This means I tend to have a lot of strong opinions about a lot of things. There are things I don't like about GNU, there are things I do like about GNU. The same can be said for Linux, Clang, LLVM, Apple, and a long list of other things. I mostly try to ignore my personal opinions, because I'd rather code than argue about epolitics.
Re:Clang (LLVM C compiler) builds a working Linux kernel on Tuesday October 26, 2010 @03:06AM (#1833356)
Gold should work.

ICC has been able to compile Linux for awhile, I think.

Re:Clang (LLVM C compiler) builds a working Linux kernel on Tuesday October 26, 2010 @02:04AM (#1833234)
I do a lot of C++ template metaprogramming, so I end up running into 3-5 Clang internal compiler errors (In my circles, "ICE"s) a week, if not more. With GCC I maybe run into 3-5 a month.

The difference is that I can pinpoint the error. Clang dies gracefully, with a stack trace, source file location, and, for parse errors, the tokens that are currently being parsed. The problem might not always be easy to fix, but I never have to waste time trying to find it.

If you want a more stable Clang, then build one. ;)

Re:Clang (LLVM C compiler) builds a working Linux kernel on Tuesday October 26, 2010 @01:56AM (#1833213)
Clang's diagnostics and static analysis? Take, for example, https://patchwork.kernel.org/patch/36060/, a serious problem in the kernel that was recently discovered. Given the size of Linux, it would be highly inefficient to manually find and fix every instances of this issue.

Currently, Clang doesn't support the work-around option that GCC provides to prevent the aforementioned issue. I could just implement the GNU work-around, but with Clang, it's far easier to write a scanner which will identify every place in the Linux source code where those dangerous semantics appear.

Clang might not be mature enough to compile Linux for distribution. The difference between GCC and Clang is that Clang is not a compiler. Clang is a modular API that provides the tools to build C language front-ends to the LLVM compiler infrastructure. The Clang compiler driver is just one implementation of an application built using the Clang libraries.

Why would one want to do this? Well...

   http://sourceforge.net/mailarchive/message.php?msg_name=2010http://sourceforge.net/mailarchive/message.php?msg_name=20101007001758.6bcd3d3b%40Pegasus1007001758.6bcd3d3b%40Pegasus

   http://clang-analyzer.llvm.org/

   http://clang.llvm.org/docs/libIndex.html

   http://llvm.org/ProjectsWithLLVM/#LENS

   http://llvm.org/ProjectsWithLLVM/#spedi
Think outside of the box :)
Re:Clang (LLVM C compiler) builds a working Linux kernel on Tuesday October 26, 2010 @01:33AM (#1833155)
I'm a 19 year old college student, actually. I have no affiliation with Apple, nor a formal relation with Clang or LLVM.
Re:Clang builds a working Linux Kernel on Monday October 25, 2010 @05:31PM (#1831697)
Right. Except that was last updated 6 years ago.