Changes between Version 36 and Version 37 of LibcxxOnOlderSystems


Ignore:
Timestamp:
Jul 31, 2016, 3:13:22 AM (8 years ago)
Author:
jeremyhu (Jeremy Huddleston Sequoia)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LibcxxOnOlderSystems

    v36 v37  
    5151
    5252==== Bootstrapping 3: Build a current version of clang against libc++ ====
     53
     54The instructions below are for the latest stable build of llvm at the time of this writing (3.8).  You should be able to easily replace 3.8 with 3.6, 3.7, 3.9, or later versions, but 3.4 is needed to bootstrap the process.
     55
    53561. Deactivate all your active ports (or at least the C++ ports) in order to prepare to rebuild them, and just activate the new toolchain:
    5457{{{
     
    7174sudo port -v install clang-3.8
    7275}}}
    73 5. Update cctools and ld64 to use the newer version of llvm:
     765. Add the variant corresponding to the new version of llvm to `/opt/local/etc/macports/variants.conf`.  This ensures that cctools and ld64 will be reinstalled using the appropriate version of llvm:
    7477{{{
    75 sudo port -v -n upgrade --enforce-variants cctools -llvm33 -llvm34 +llvm38 configure.compiler=macports-clang-3.8
    76 sudo port -v upgrade --enforce-variants ld64 -llvm33 -llvm34 +llvm38 configure.compiler=macports-clang-3.8
     78+llvm38
    7779}}}
    78 6. Uninstall the bootstrap toolchain:
     806. Edit `/opt/local/etc/macports/macports.conf` again to add `macports-clang-3.8` as preferred compiler:
     81{{{
     82default_compilers  macports-clang-3.8 macports-clang-3.7 macports-clang-3.4 macports-clang-3.3 gcc-4.2 apple-gcc-4.2 gcc-4.0
     83}}}
     847. Uninstall the bootstrap toolchain:
    7985{{{
    8086sudo port -v deactivate llvm-3.4 clang-3.4
    8187sudo port -v uninstall inactive
    8288}}}
    83 7. Either:
    84     1. Edit `/opt/local/etc/macports/macports.conf` again to add `macports-clang-3.8` as preferred compiler:
     897. Rebuild cctools and ld64 to use the newer version of llvm:
    8590{{{
    86 default_compilers  macports-clang-3.8 macports-clang-3.7 macports-clang-3.4 macports-clang-3.3 gcc-4.2 apple-gcc-4.2 gcc-4.0
     91sudo port -v -n upgrade --enforce-variants cctools -llvm34
     92sudo port -v upgrade --enforce-variants ld64 -llvm34
    8793}}}
    88     2. Rebuild clang-3.4 using clang-3.8:
     948. Rebuild libcxxabi and libcxx +universal to allow linking universal C++ code with the new toolchain:
    8995{{{
    90 sudo port -v install clang-3.4 configure.compiler=macports-clang-3.8
     96sudo port -v -s upgrade --enforce-variants libcxx +universal universal_archs="x86_64 i386"
    9197}}}
    92 8. Add the variant corresponding to your default compiler to your `/opt/local/etc/macports/variants.conf`. This ensures that deactivating all ports leaves your MacPorts installation in a usable state (which may be important, if you are setting up a buildbot, for example):
    93     1. For clang-3.8:
     98    or possibly (not verified) for ppc support as well:
    9499{{{
    95 +llvm38
    96 }}}
    97     2. For clang-3.4:
    98 {{{
    99 +llvm34
     100sudo port -v -s upgrade --enforce-variants ld64 +ld64_127
     101sudo port -v -s upgrade --enforce-variants libcxx +universal universal_archs="x86_64 i386 ppc"
    100102}}}
    101103