[MacPorts] LibcxxOnOlderSystems modified

MacPorts noreply at macports.org
Sat Jul 30 20:13:24 PDT 2016


Page "LibcxxOnOlderSystems" was changed by jeremyhu at macports.org
Diff URL: <https://trac.macports.org/wiki/LibcxxOnOlderSystems?action=diff&version=37>
Revision 37
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: LibcxxOnOlderSystems
=========================================================================
--- LibcxxOnOlderSystems (version: 36)
+++ LibcxxOnOlderSystems (version: 37)
@@ -50,6 +50,9 @@
 At this point, you will have libc++ installed and can use clang++-mp-3.4 -stdlib=libc++ for your personal projects, but like Lion and Mountain Lion, MacPorts will continue to use libstdc++ by default unless you continue with the next step.
 
 ==== Bootstrapping 3: Build a current version of clang against libc++ ====
+
+The 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.
+
 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:
 {{{
 sudo port -v -f deactivate active
@@ -70,33 +73,32 @@
 {{{
 sudo port -v install clang-3.8
 }}}
-5. Update cctools and ld64 to use the newer version of llvm:
+5. 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:
 {{{
-sudo port -v -n upgrade --enforce-variants cctools -llvm33 -llvm34 +llvm38 configure.compiler=macports-clang-3.8
-sudo port -v upgrade --enforce-variants ld64 -llvm33 -llvm34 +llvm38 configure.compiler=macports-clang-3.8
++llvm38
 }}}
-6. Uninstall the bootstrap toolchain:
+6. Edit `/opt/local/etc/macports/macports.conf` again to add `macports-clang-3.8` as preferred compiler:
+{{{
+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
+}}}
+7. Uninstall the bootstrap toolchain:
 {{{
 sudo port -v deactivate llvm-3.4 clang-3.4
 sudo port -v uninstall inactive
 }}}
-7. Either:
-    1. Edit `/opt/local/etc/macports/macports.conf` again to add `macports-clang-3.8` as preferred compiler:
+7. Rebuild cctools and ld64 to use the newer version of llvm:
 {{{
-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
+sudo port -v -n upgrade --enforce-variants cctools -llvm34
+sudo port -v upgrade --enforce-variants ld64 -llvm34
 }}}
-    2. Rebuild clang-3.4 using clang-3.8:
+8. Rebuild libcxxabi and libcxx +universal to allow linking universal C++ code with the new toolchain:
 {{{
-sudo port -v install clang-3.4 configure.compiler=macports-clang-3.8
+sudo port -v -s upgrade --enforce-variants libcxx +universal universal_archs="x86_64 i386"
 }}}
-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):
-    1. For clang-3.8:
+    or possibly (not verified) for ppc support as well:
 {{{
-+llvm38
-}}}
-    2. For clang-3.4:
-{{{
-+llvm34
+sudo port -v -s upgrade --enforce-variants ld64 +ld64_127
+sudo port -v -s upgrade --enforce-variants libcxx +universal universal_archs="x86_64 i386 ppc"
 }}}
 
 == Leopard (ppc) ==
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/LibcxxOnOlderSystems>
MacPorts <https://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'LibcxxOnOlderSystems' page.
If it was not you, please report to .


More information about the macports-changes mailing list