The state of alternative compilers (besides GCC 4.2) for ports

Well, what is it? I've tried gcc46 and clang almost a year ago, there were plenty of errors, but I've recently seen some folks using gcc46 (or even gcc47 now that it's released) as default. Clang still seems to have over 1000 errors (according to the wiki page), but I couldn't find any information about other compilers.
 
Yeah, I've heard about PCC. But AFAIR PCC is more about OpenBSD (they are going to switch to it), and I meant mainly Clang/LLVM and GCC > 4.2. But PCC is also welcome here, as long as you write something about how well it compiles FreeBSD Ports (I remember that it compiles very quickly but the binaries are usually slow). Giving only links to compilers' official sites doesn't answer my question.
 
pkubaj said:
Yeah, I've heard about PCC. But AFAIR PCC is more about OpenBSD (they are going to switch to it), and I meant mainly Clang/LLVM and GCC > 4.2. But PCC is also welcome here, as long as you write something about how well it compiles FreeBSD Ports (I remember that it compiles very quickly but the binaries are usually slow). Giving only links to compilers' official sites doesn't answer my question.

Wow. What did you expect. There really wasn't a question there aside from what options do you have and I quote "but I couldn't find any information about other compilers.". Maybe if you point out the specific issue your having with the system tools or specific port I may be able to answer it. If it's something else please re-articulate your question to be specific to your issue.
 
I thought I had made it clear in topic: "The state of alternative compilers (besides GCC 4.2) for ports". Anyway, I want to compile ports with compiler other than GCC 4.2. Last time I tried it, it was a no go, because of lots of errors (I used Clang, it was about July/August I guess). My question is, what's the situation now, can I use gcc46/clang as default without lots of debugging why X port SEGFAULTs, even though it compiled successfully, and why Y port doesn't compile even though I set it to compile with GCC 4.2. That's what it was like the last time. I want to know if it's still the same.
 
I'd say no. I ran some tests with both clang and gcc46 for ports, but it became too much of a hassle to keep track of what failed to compile, or what segfaulted after a successful compile, to keep on going.
 
Just today I tested clang with one of the ports I maintain. Although it threw a lot of warnings, it compiled fine. Some of the warnings revealed the use of deprecated or otherwise not portable gcc C extensions that need to be fixed upstream. Very promising after all.
 
I just updated my 9-STABLE system to use clang(1) as the default compiler (WITH_CLANG_IS_CC in /etc/src.conf), world and kernel are compiled with clang and I'm currently recompiling ports with clang, no real breakage so far. Very encouraging.
 
darwimy said:
Just today I tested clang with one of the ports I maintain. Although it threw a lot of warnings, it compiled fine. Some of the warnings revealed the use of deprecated or otherwise not portable gcc C extensions that need to be fixed upstream. Very promising after all.

Yeah the warnings are actually usable in clang. It's a nice compiler.
 
It's now possible to get rid of the base system gcc(1) if you have for example lang/gcc46 as back up for ports that break with clang(1). I wouldn't recommend that on a system that has X and a desktop enviroment installed, on a system that has no X and otherwise a minimal set of ports it works quite nicely.
 
Back
Top