![]() 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. You can use quite new SDK versions to build against as well, as there is full TAPI support in ld64. Sudo port -v -n upgrade -force -enforce-variants ld64 -ld64_127 -llvm34 +llvm90Īnd your Snow Leopard toolchain is now approximately up to par with Xcode 10.2. Sudo port -v install ld64-latest -llvm34 +llvm90 This is because negative signs (dashes) cannot be used in variant names. Also, please note that the port name is ld64-127 but the variant for ld64 is ld64_127. ld64 is set up a bit differently than most other ports by negating the default +ld64_127 variant, the port installs the latest version of ld64 ( ld64_latest). Rebuild ld64 to use the newer version of both ld64 and llvm (currently llvm-9.0 is latest).Sudo port -v -n upgrade -force -enforce-variants cctools -llvm34 +llvm90 Rebuild cctools to use a newer version of llvm (currently llvm-9.0 is latest):.Sudo port -v -n upgrade -force -enforce-variants libcxx +emulated_tls Once clang-5.0 (or greater) installed, you can rebuild libcxx with the +emulated_tls variant for full functionality:.Snow Leopard can be brought up to a very current toolchain with some further manual updates. All ports will be built from source if this setting has a value other than the default.Īs of version 2.6.0, MacPorts will use libc++ by default when building ports.Īlthough the default toolchain that MacPorts will install is quite capable, some ports may require a newer, more capable toolchain than MacPorts presently can install automatically. If you changed the delete_la_files setting from its default value (as suggested in much older versions of these instructions), you will unfortunately need to uninstall all installed ports before changing it back, as ports built with this setting on are not compatible with those built with it off. The cxx_stdlib setting can safely be removed also, though leaving it set to libc++ will do no harm since that is now the default. Also remove or comment out the buildfromsource setting if you wish to be able to install from prebuilt archives. If you followed the instructions that were here for earlier versions of MacPorts, you should remove or comment out the default_compilers setting in your nf, or the correct compiler may not be chosen. You no longer need to make any changes on these OS versions. ![]() If you use MacPorts C++-using ports as dependencies for C++-using software that you compile outside of MacPorts, you must compile that software using libc++ as well.Īs of version 2.6.0, MacPorts will use libc++ by default when building ports. This must be done for MacPorts as a whole it can't be done for individual ports. ![]() If you do this, you can ignore the rest of this article, and should instead see the migration instructions.Īlternately, you can switch MacPorts on OS X 10.8 or earlier to use libc++ instead of libstdc++. The recommended solution, if your computer supports it, is to upgrade to OS X 10.9 or later. The default C++ runtime on OS X 10.9 and later is libc++ which does support C++11. The default C++ runtime on OS X 10.8 and earlier is a version of libstdc++ based on GCC 4.2.1 which does not support C++11. If you have been referred to this page, you are likely trying to build software that uses C++11 on OS X 10.8 or earlier. If you used it before, below are instructions for reverting back.įor Mac OS X 10.6, MacPorts will install a functional libc++ toolchain by default, but it can be updated with the instructions below. With the release of MacPorts 2.6.0 the setup suggested on this page became obsolete for Mac OS X 10.7 and 10.8. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |