LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   LLVM-Clang 3.2 vs GCC 4.8.0 (http://www.linuxquestions.org/questions/slackware-14/llvm-clang-3-2-vs-gcc-4-8-0-a-4175459343/)

ReaperX7 04-23-2013 04:30 PM

LLVM-Clang 3.2 vs GCC 4.8.0
 
I know this has been asked before regarding if Slackware could or would switch to LLVM-Clang at some point, but my question is a bit less inclined to when to more of this:

From reading up on LLVM-Clang's capabilities in comparison to GCC, would, and is it even possible to build Slackware, or even rebuild Slackware from the ground-up using only LLVM-Clang? And if so, would there be any benefits, with list and examples, but if not, what are the shortfalls and problems of this approach?

Just very very VERY curious.

volkerdi 04-23-2013 04:47 PM

Quote:

Originally Posted by ReaperX7 (Post 4937531)
I know this has been asked before regarding if Slackware could or would switch to LLVM-Clang at some point, but my question is a bit less inclined to when to more of this:

From reading up on LLVM-Clang's capabilities in comparison to GCC, would, and is it even possible to build Slackware, or even rebuild Slackware from the ground-up using only LLVM-Clang? And if so, would there be any benefits, with list and examples, but if not, what are the shortfalls and problems of this approach?

I'll try to summarize: Yes, it would be possible, but not without some patches (and some of those patches would have to be applied to Clang). The patches for this generally don't exist yet -- so figuring them out would be part of the exercise. Until someone does this, it's not possible to say with any certainty whether the resulting binaries would work better, but I'd tend to think that there would not be a huge difference. Since most people are currently compiling with gcc, compiling with Clang is not as well tested, and is likely (at this time) to be less reliable.

One small example -- I got a report than since recompiling LLVM/Clang using Clang, it quit working on a Pentium III machine. So it's possible that Clang is less able to control itself in terms of retaining compatibility on older x86 CPUs.

ReaperX7 04-23-2013 05:35 PM

Thanks for the insight into this Patrick. Much appreciated.

I hadn't heard about that x86 Pentium III issue, but as with anything like that, various factors could have been involved.

It would be interesting to see how it would affect non-legacy builds like x86-64 though as compatibility with Pentium III is less than fickle a worry.

As far as patches go, I know FreeBSD has been keeping a good update on their ports packages recently, perhaps a study of their work can land some insights into a full work-over of LLVM/Clang usage.


All times are GMT -5. The time now is 06:34 AM.