gcc49 vs gcc48

Ryan Schmidt ryandesign at macports.org
Tue Nov 18 10:38:55 PST 2014


On Nov 18, 2014, at 12:30 PM, René J.V. Bertin wrote:

> On Tuesday November 18 2014 18:16:53 Chris Jones wrote:
> 
>>> This is on 10.6.8, where the C++ runtime issues are in fact more with clang. Using a recent GCC is the only sort-of-reliable way to build C++11 code.
>> 
>> Not true. In the ROOT6 port we use MacPorts clang (3.4) compiler on 
>> OSX<10.9 in order to support c++11. using clang as opposed to gcc is 
>> better as it avoids the c++ runtime issue better (not entirely but much 
>> better).
> 
> I recall a recent discussion explaining why/how C++11 support in clang 3.4 was less complete than in GCC. In any case I can't get kdevplatform and kdevelop to build with clang 3.4 on OS X 10.6.8 (on 10.9 it works fine), but gcc 4.8 and 4.9 have no issues.

For now, the only way we're supporting building C++11 code in MacPorts is by using clang and libc++ on OS X 10.9 and later.


> Also, I don't think there's a C++ runtime issue on 10.6.8 (or rather, it's the opposite; using libc++ is neigh impossible). 

There is still an issue, because the libstdc++ the gcc ports use is not the same as the libstdc++ the OS uses. On Mavericks and later, the mixture of libc++ and libstdc++ will cause a build failure so you'll immediately know there's a problem. On Mountain Lion and earlier, code mixing the two different libstdc++s will probably compile, but may fail at runtime in interesting ways.




More information about the macports-users mailing list