Changes between Version 1 and Version 2 of LibcxxOnOlderSystems
- Timestamp:
- Jan 12, 2015, 1:53:07 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
LibcxxOnOlderSystems
v1 v2 20 20 Leopard and Snow Leopard do not have libc++ installed by the OS, but MacPorts can build and install system roots that contain these runtimes for your use. After installing these roots (which is done automatically when the libcxxabi and libcxx ports activate), you can choose to continue using libstdc++ as the default C++ runtime in MacPorts or configure MacPorts to use the new libc++ runtime. 21 21 22 === Bootstrapping : Install libc++ and libc++abi ===22 === Bootstrapping 1: Install libc++ and libc++abi === 23 23 24 24 1. Start with a new install of MacPorts or '''uninstall all ports that use C++''' … … 27 27 sudo port -v -s install libcxx 28 28 }}} 29 3. Deactivate all your active ports (or at least the C++ ports) in order to prepare to rebuild them, and just activate the new toolchain: 29 30 === Bootstrapping 2: Build a current version of clang against libc++ === 31 1. Deactivate all your active ports (or at least the C++ ports) in order to prepare to rebuild them, and just activate the new toolchain: 30 32 {{{ 31 33 sudo port -v -f deactivate active 32 34 sudo port -v install clang-3.4 ld64 cctools 33 35 }}} 34 4. Edit /opt/local/etc/macports/macports.conf to contain:36 2. Edit /opt/local/etc/macports/macports.conf to contain: 35 37 {{{ 36 38 cxx_stdlib libc++ … … 39 41 default_compilers macports-clang-3.4 macports-clang-3.3 gcc-4.2 apple-gcc-4.2 gcc-4.0 40 42 }}} 41 5. Uninstall all the remaining inactive ports:43 3. Uninstall all the remaining inactive ports: 42 44 {{{ 43 45 sudo port -v -f uninstall inactive 44 46 }}} 45 6. Build a newer clang compiler using libc++ and uninstall the old one using libstdc++:47 4. Build a newer clang compiler using libc++ and uninstall the old one using libstdc++: 46 48 {{{ 47 49 sudo port -v install clang-3.5 48 50 sudo port -v uninstall llvm-3.4 clang-3.4 49 51 }}} 50 7. Either:52 5. Either: 51 53 1. Edit /opt/local/etc/macports/macports.conf again to add macports-clang-3.5 before macports-clang-3.4. 52 54 2. Rebuild clang-3.4 using clang-3.5: