Changes between Version 1 and Version 2 of LibcxxOnOlderSystems


Ignore:
Timestamp:
Jan 12, 2015, 1:53:07 AM (9 years ago)
Author:
jeremyhu (Jeremy Huddleston Sequoia)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LibcxxOnOlderSystems

    v1 v2  
    2020Leopard 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.
    2121
    22 === Bootstrapping: Install libc++ and libc++abi ===
     22=== Bootstrapping 1: Install libc++ and libc++abi ===
    2323
    24241. Start with a new install of MacPorts or '''uninstall all ports that use C++'''
     
    2727sudo port -v -s install libcxx
    2828}}}
    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++ ===
     311. Deactivate all your active ports (or at least the C++ ports) in order to prepare to rebuild them, and just activate the new toolchain:
    3032{{{
    3133        sudo port -v -f deactivate active
    3234        sudo port -v install clang-3.4 ld64 cctools
    3335}}}
    34 4. Edit /opt/local/etc/macports/macports.conf to contain:
     362. Edit /opt/local/etc/macports/macports.conf to contain:
    3537{{{
    3638cxx_stdlib         libc++
     
    3941default_compilers  macports-clang-3.4 macports-clang-3.3 gcc-4.2 apple-gcc-4.2 gcc-4.0
    4042}}}
    41 5. Uninstall all the remaining inactive ports:
     433. Uninstall all the remaining inactive ports:
    4244{{{
    4345sudo port -v -f uninstall inactive
    4446}}}
    45 6. Build a newer clang compiler using libc++ and uninstall the old one using libstdc++:
     474. Build a newer clang compiler using libc++ and uninstall the old one using libstdc++:
    4648{{{
    4749sudo port -v install clang-3.5
    4850sudo port -v uninstall llvm-3.4 clang-3.4
    4951}}}
    50 7. Either:
     525. Either:
    5153    1. Edit /opt/local/etc/macports/macports.conf again to add macports-clang-3.5 before macports-clang-3.4.
    5254    2. Rebuild clang-3.4 using clang-3.5: