michaelld at macports.org
Wed May 6 11:59:49 PDT 2015
Hmmm ... so, at least for my primary ports (gnuradio, volk, uhd), when
using libstdc++ as the default (which is true for 10.8 and prior), I
find that GCC 4.7 and newer supports -std=c++11 correctly. Not so for
GCC 4.6 and older, nor for any Clang (Apple or MacPorts -- which seem to
use the legacy gcc 4.2 c++ support in this case). When using libc++,
require clang >= 500 and/or MacPorts clang >= 3.3. These conditions are
stated in the cxx11 PortGroup correctly:
# Compilers supporting C++11 are GCC >= 4.6 and clang >= 3.3.
But, I disagree with the comment on the next line:
# As we only support libc++, clang is implicitly required.
Although we do not directly support libstdc++, it does work and is the
default for 10.8 and prior, which MacPorts does still support (IIRC: to
10.6 officially; 10.5 unofficially). So, we should, IMHO, be taking
these users into account when creating ports & PortGroups.
I tried to follow the discussion here on this topic, but clearly I
didn't do it well enough to get my US$0.02 worth in there.
I have customers who want to use GCC and c++11 to build GNU Radio (etc)
on 10.8-, so I need to keep these options in place.
So ... I'll move to using the cxx11 PortGroup only for when using libc++
is already known. In this way I'll get the best of both worlds & avoid
the awkward use of the compiler_blacklist_versions PortGroup just for 1
test. Doing so will also make it easier to move to using just this
PortGroup if/when it includes proper support for libstdc++. - MLD
More information about the macports-dev