<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 2017-09-04, at 1:43 AM, Ryan Schmidt wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>I have not followed the development of the cxx11 1.1 portgroup so I don't know the benefits and drawbacks of using it compared to using libc++.<br></div></blockquote><div><br></div><div><br></div><div>After digging into this for a year and debugging and fixing a _great many_ ports, here are my thoughts for a starting framework. Marcus and Mojca have been deep in at times as well, of course.</div><div><br></div><div><br></div><div><br></div><div>stay with cxx11 1.1 PortGroup:</div><div><br></div><div>Benefits: </div><div><br></div><div>1. Newly built ports are c++ ABI and c++ stdlib compatible with old ports. No changes needed in MacPorts infrastructure, in anyone's MacPorts setup or in their installed ports. Buildbots are already working away. </div><div>2. works with 10.4 and 10.5 PPC as well in most cases</div><div>3. helps Jeremy and the clang group find any errors in their new libstdc++ compatibility additions.</div><div>4. allows thread-local-storage on 10.4 to 10.8, at least when built with gcc6, maybe when built with clang (not fully tested)</div><div><br></div><div>Drawbacks:</div><div><br></div><div>1. as ports fail, cxx11 1.1 PortGroup needs to be manually added. This comes up frequently, weekly for sure, as software updates come out requiring c11 features. Adding this PortGroup's functions to base in systems 10.4 to 10.8 is tempting, but have to think about bootstrapping, and also that might break some ports on PPC that currently build OK.</div><div><br></div><div>2. We find build errors due to the tighter c++ rules applied by clang-3.9+ vs the older compilers in some ports (you could say we might as well find these anyway as they are coming to everyone soon enough.)</div><div><br></div><div>3. there can be very slight differences in how the gcc libstdc++ headers work compared to the libc++ headers that need to be worked around</div><div> this has happened once so far, but was easy enough to fix <<a href="https://trac.macports.org/ticket/54358#comment:26">https://trac.macports.org/ticket/54358#comment:26</a>></div><div><br></div><div>4. c++ ports are built in a non-standard (but supported) ABI-4 compatible mode, that may or may not turn up some issues someday. So far, none have turned up. This clang modification was developed to allow clang to build Linux software while the Linux distros stick with libstdc++ as their default standard library, so others are testing this too.</div><div><br></div><div><br></div></div><br><div>switch to libc++:</div><div><br></div><div>Benefits:</div><div><br></div><div>1. most builds are identical to 10.9+, most portfiles need no changes.</div><div><br></div><div>Drawbacks:</div><div><br></div><div>1. needs changes in macports infrastructure to support new buildbots and pre-built binaries</div><div>2. poorly-written software or Portfiles do not spec the stdlib on the compile line. Clang adds wrong default stdlib if we want libc++. Need to be manually fixed, usually be adding the -stdlib to the compiler spec. (see botan).</div><div>3. bootstrapping issues - no getting around the LibCxxOnOlderSystems instructions. Might be beyond some users.</div><div><br></div></body></html>