IMHO This is a great development, for one important reason.
Portability of the kernel.
GCC is a great compiler, but relying on it excessively is a bad thing for the quality of kernel code, the wider range of compilers used, the more portable and robust the code should become.
I know there will be the usual torrent of its-just-not-open-enough rants, but my reasoning has nothing to do with that, it is simply healthy for the kernel to be compilable across more compilers.
GCC is a great compiler, but relying on it excessively is a bad thing for the quality of kernel code... it is simply healthy for the kernel to be compilable across more compilers.
Prove it.
The opposite (relying on GCC is a good thing for code quality) seems obvious to me. The intersection of GCC and ICC is smaller than GCC, so I would assume that targetting something big would afford greater flexibility in expression. As a result, the code would be cleaner, and easier to read.
Targetting only the intersection of ICC and GCC may result in compromises that confuse or complicate certain algorithms.
Some examples from the linked application include:
removing static from definitions
disabling a lot of branch prediction optimizations
statically linking closed-source code
tainting the kernel making debugging harder
I cannot fathom why anyone would think these things are "good" or "healthy", and hope you can defend this non-obvious and unsubstantiated claim.
(some of us still remember the gcc->pgcc->egcs->gcc debarcle).
When pgcc showed up, it caused lots of stability problems, and there were major distribution releases that made operating a stable Linux system very difficult: 2.96 sucked badly.
The fact that gcc2 still outperforms gcc4 in a wide variety of scenarios is evidence this wasn't good for technical reasons, and llvm may prove RMS's "political" hesitations right after all.
I'm not saying gcc4 isn't better overall, and I'm not saying we're not better for being here. I'm saying it's not as clear as you suggest.
RMS felt that making it easy to produce plugins for GCC would be a very bad idea since closed source could exploit this. We really want GCC improvements to be free software so his hesitation has some merits.
LLVM can (and is) used to subvert the GCC's GPL by making it possible to "compile" C code into closed-source proprietary bytecodes. See "Alchemy" for an example of Adobe being an immoral slimeball.
I'd like to add a slimeball exception to software I've written, preventing Adobe from benefitting, and yet I can't bring myself to be immoral just to combat immorality.
What exactly do you think happens when GCC changes behavior (as it has done in the past, many times) within the C spec?
Perhaps we better freeze on version x.y.z of GCC?
The same would apply to for example assumptions with branch prediction - gcc can and quite probably one day will change behavior - do you really want major features of the kernel to change behavior when this happens? The good effect this will have when addressed properly (and remember w
Oh, wait a second, I see the problem here.
You are a moron.
First up, personal attacks to the parent does not an argument prove, all it does is lessen your credibility.
By supporting a range of compilers we help make the kernel MORE robust to such changes, and these are both highly competent compilers, so the 'intersection' of features is actually most of the C/C++ specs..
Of course the intersection of features are the specs.. because they are the only standardized thing that makes it c, but as has been said, C leaves a LOT to the implementer in order to be flexible, the standard does not specify everything, and operating systems need to run at such a low level that what they deal with is NOT covered in said specs,
Furthermore, as for being 'more robust' to breakage whe
But you are advocating if I am reading you correctly 'to hell with other compilers use gcc4 it is the rocking best one out there'.
Then work on your reading comprehension. I said no such thing.
I said it isn't obvious that supporting other compilers was a good thing, and that it seemed obvious that actively supporting other compilers (i.e. "more work") had some serious costs that were being underepresented.
Re-read my post. Nowhere did I suggest anyone stop doing what they were doing.
Portability.. (Score:5, Insightful)
IMHO This is a great development, for one important reason.
Portability of the kernel.
GCC is a great compiler, but relying on it excessively is a bad thing for the quality of kernel code, the wider range of compilers used, the more portable and robust the code should become.
I know there will be the usual torrent of its-just-not-open-enough rants, but my reasoning has nothing to do with that, it is simply healthy for the kernel to be compilable across more compilers.
It also could have interesting implications
Re:Portability.. (Score:5, Insightful)
Prove it.
The opposite (relying on GCC is a good thing for code quality) seems obvious to me. The intersection of GCC and ICC is smaller than GCC, so I would assume that targetting something big would afford greater flexibility in expression. As a result, the code would be cleaner, and easier to read.
Targetting only the intersection of ICC and GCC may result in compromises that confuse or complicate certain algorithms.
Some examples from the linked application include:
I cannot fathom why anyone would think these things are "good" or "healthy", and hope you can defend this non-obvious and unsubstantiated claim.
When pgcc showed up, it caused lots of stability problems, and there were major distribution releases that made operating a stable Linux system very difficult: 2.96 sucked badly.
The fact that gcc2 still outperforms gcc4 in a wide variety of scenarios is evidence this wasn't good for technical reasons, and llvm may prove RMS's "political" hesitations right after all.
I'm not saying gcc4 isn't better overall, and I'm not saying we're not better for being here. I'm saying it's not as clear as you suggest.
dunno exactly (Score:2)
I might be completely wrong but:
RMS felt that making it easy to produce plugins for GCC would be a very bad idea since closed source could exploit this. We really want GCC improvements to be free software so his hesitation has some merits.
Exactly how this relates to LLVM I dunno..
Re: (Score:2)
LLVM can (and is) used to subvert the GCC's GPL by making it possible to "compile" C code into closed-source proprietary bytecodes. See "Alchemy" for an example of Adobe being an immoral slimeball.
I'd like to add a slimeball exception to software I've written, preventing Adobe from benefitting, and yet I can't bring myself to be immoral just to combat immorality.
Re: (Score:2)
Try compiling your C Real Mode code in GCC and get back to me.
Re: (Score:2)
How is this relevant?
Re: (Score:3, Insightful)
Oh, wait a second, I see the problem here.
You are a moron.
What exactly do you think happens when GCC changes behavior (as it has done in the past, many times) within the C spec?
Perhaps we better freeze on version x.y.z of GCC?
The same would apply to for example assumptions with branch prediction - gcc can and quite probably one day will change behavior - do you really want major features of the kernel to change behavior when this happens?
The good effect this will have when addressed properly (and remember w
Re: (Score:3, Informative)
Oh, wait a second, I see the problem here.
You are a moron.
First up, personal attacks to the parent does not an argument prove, all it does is lessen your credibility.
By supporting a range of compilers we help make the kernel MORE robust to such changes, and these are both highly competent compilers, so the 'intersection' of features is actually most of the C/C++ specs..
Of course the intersection of features are the specs.. because they are the only standardized thing that makes it c, but as has been said, C leaves a LOT to the implementer in order to be flexible, the standard does not specify everything, and operating systems need to run at such a low level that what they deal with is NOT covered in said specs,
Furthermore, as for being 'more robust' to breakage whe
Re: (Score:2)
Then work on your reading comprehension. I said no such thing.
I said it isn't obvious that supporting other compilers was a good thing, and that it seemed obvious that actively supporting other compilers (i.e. "more work") had some serious costs that were being underepresented.
Re-read my post. Nowhere did I suggest anyone stop doing what they were doing.