c++ library usage

Ken Cunningham ken.cunningham.webuse at gmail.com
Wed Jun 21 17:13:44 UTC 2017


>> 
>> - it was slightly easier to switch the system compiler/stdlib (in
>> particur switching to the latest gcc on 10.5 for example)

That particular piece is fairly easy. Just put this in macports.conf:

default_compilers   macports-gcc-6


and you're done. Every port will compile with gcc6, overriding any compiler blacklisting or whitelisting in the portfile (which is often not set right for 10.5PPC) and link against libstdc++ (gcc6 version).



For maximal compatibility, you can build libgcc with default ABI4 compatibility ( a simple configure flag) and then when you run across something that gcc6 won't build, you can fall back to llvm-gcc-4.2 and things will be compatible with each other.

And for newer ObjectiveC that llvm-gcc-4.2 won't build, clang-3.8 now works to a reasonable extent on 10.5PPC as well by the way, and can build lots of stuff, linking it against libc++, the old libstdc++, or  (with the backporting I have done to bring in the ABI compatibility and Marcus' mod for macports-libstdc++) the new libstdc++.

K


More information about the macports-dev mailing list