Consequences of using MacPorts GCC as a fallback compiler on PowerPC
Kenneth F. Cunningham
ken.cunningham.webuse at gmail.com
Fri Mar 23 19:42:03 UTC 2018
On 2018-03-23, at 12:02 PM, Mojca Miklavec wrote:
>
> I still like the convention of marking ports as "requires C++11" much
> more than "please blacklist gcc 3.0 and gcc 4.2".
>
It's elegant, but also opens endless issues about C11 or C14 or C17 or c++17 and brings much confusion, IMHO.
On Intel, libc++ and either the system compiler or clang-5.0.
On PPC, libstdc++ ABI 4 mode, and either the system compiler or gcc6.
Very simple. Easy to support. Covers all standards and options. Most can ignore libstdc++ and leave it to those of us who use it to worry about. The special cases (bootstrapping stuff) can be special-cased.
> But you'll nevertheless end up with incompatibility between stdlibs
For sure. We need to either default that ABI=0 flag on all gcc builds with 10.8 or less, or build libgcc to default it (I have a PR ready for the libgcc change).
> would any user benefit from having C++11-enabled stdlibc++ and build *everything* with gcc6
Sadly gcc6 cannot build everything on 10.4 or 10.5 PPC that the system compiler can build. So we still need to stay with ABI4.
On 10.6 to 10.8, things built against libgcc would better be in ABI 4 mode given the defaults of the OS.
> Just curious: what should be the default supported mode for 10.5/i386 then?
>
I think treating 10.5 Intel like 10.5 PPC would be best, but it is certainly capable of being treated like 10.6 / libc++ (with hassles).
> (My next question would be what is the main difference between
> building "everything" against libc++ and building everything against
> "_GLIBCXX_USE_CXX11_ABI=0"-mode libstdc++ on 10.6-10.8 - other than
> more compatible setup across wide spectrum of OSes.
That's it. The more these older systems can be treated like all the other newer systems the better.
There are many hassles building Ports against libgcc on 10.6 to 10.8 that will disappear once we default to libc++.
Ken
More information about the macports-dev
mailing list