about the libc++ conversion

René J.V. Bertin rjvbertin at gmail.com
Fri Jun 2 11:10:26 UTC 2017


This is mostly out of curiosity and for personal education.

I've been tinkering a bit with the libcxx port, upgrading it to 4.0.0 and getting it to build on Linux to have a reproducable way of installing libc++ there.

I went with the standard build that uses libstdc++ instead of libc++abi but from what I saw it can also be built to use a (static) copy of libsupc++ (the true equivalent of libc++abi from what I understand).

I then built a Qt5 application using clang -stdlib=libc++ knowing that Qt5 and everything else is built with gcc6 and against libstc++, expecting to see exactly what can go wrong when you mix those 2 runtime libraries.

The answer is zip, nada, there's nothing indicating I'm using 2 different C++ runtimes. Maybe the application actually doesn't use libc++ at all, but it does beg the question if this couldn't have been an approach to simplify the libc++ conversion on older OS X versions.

Note that I'm doing something comparable (but even wilder) with my libc++ conversion of GCC; the system libc++ on OS X 10.9 lacks at least 1 delete function, and thus I pull in libsupc++ when linking with my libc++-enabled g++-mp-7 . This has worked fine until now with everything I've thrown at it.


More information about the macports-dev mailing list