- status: open --> closed-accepted
- Group: -->
The attached patch implements a path-prefix-libcxx compiler wrapper for the
c++, g++ and clang++ system compilers on 10.9 and later. As of Xcode 5, the
c++ compilers default to -stdlib=libc++ only if the deployment target is
10.9 or later. If the user envokes the compiler with -mmacosx-version-min=10.8,
the system c++ compilers will silently downgrade the linkage to -stdlib=libstdc++.
The -mmacosx-version-min= option is commonly used to work around incompatible
ABI changes on OS releases so this regression from the libc++ default will be an issue
as can be demonstrated with the attached mmacosx-version-min-test.info file.
Executing 'fink -m -k rebuild mmacosx-version-min-test' on stock Futureproof
shows...
otool -L ./hello
./hello:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 118.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.0.0)
otool -L ./hello_maccosx_version
./hello_maccosx_version:
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.0.0)
whereas with the proposed libcxx_wrappers.diff patch applied the results are...
otool -L ./hello
./hello:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 118.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.0.0)
otool -L ./hello_maccosx_version
./hello_maccosx_version:
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.0.0)
Thanks in advance for considering adding this change to the Futureproof branch
Jack