[MacPorts] LibcxxOnOlderSystems modified

MacPorts noreply at macports.org
Tue Jan 13 10:05:22 PST 2015


Page "LibcxxOnOlderSystems" was changed by jeremyhu at macports.org
Diff URL: <https://trac.macports.org/wiki/LibcxxOnOlderSystems?action=diff&version=8>
Revision 8
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: LibcxxOnOlderSystems
=========================================================================
--- LibcxxOnOlderSystems (version: 7)
+++ LibcxxOnOlderSystems (version: 8)
@@ -64,7 +64,7 @@
 
 == Leopard (ppc) ==
 
-PowerPC support is still under heavy development in llvm, so expect things to not be as stable as more established toolchains.  Additionally, it is non-trivial to bootstrap libc++ on Leopard because the libcxx port does not build with versions older than clang-3.6, and clang-3.5 and newer require libc++.  After setting up my Leopard/Intel Mac as described above, I've been able to build libc++ for ppc but have not given it much testing:
+PowerPC support is still under heavy development in llvm, so expect things to not be as stable as more established toolchains.  Additionally, it is non-trivial to bootstrap libc++ on Leopard because the libcxx port does not build with versions older than clang-3.6, and clang-3.5 and newer require libc++.  After setting up my Leopard/Intel Mac as described above, I've been able to *build* libc++ for ppc but it's not quite usable yet:
 {{{
 sudo port -v -s install clang-3.6
 
@@ -77,6 +77,33 @@
 sudo port -v -s install libcxx universal_archs="x86_64 i386 ppc" configure.compiler=macports-clang-3.6
 }}}
 
+The linker crashes when creating a trivial hello world executable.  This is a similar crash when building libmacho:
+{{{
+clang++-mp-3.6 -stdlib=libc++ -arch ppc hello_world.cxx 
+
+Thread 0 Crashed:
+0   libc++abi.dylib                     0x0000000100353f15 getsectiondata + 73 (getsecbyname.c:428)
+1   libc++abi.dylib                     0x00000001003580cf libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Re
+gisters_x86_64>::setInfoBasedOnIPRegister(bool) + 105
+2   libc++abi.dylib                     0x0000000100354c74 unw_init_local + 96
+3   libc++abi.dylib                     0x00000001003548e7 _Unwind_RaiseException + 72
+4   libc++abi.dylib                     0x00000001003500e8 __cxa_throw + 104
+5   ld                                  0x000000010000ecd6 Options::Options(int, char const**) + 0
+6   ld                                  0x000000010000c28f ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 13
+95
+7   ld                                  0x000000010000d2ce ld::tool::InputFiles::InputFiles(Options&, char const**) + 372
+8   ld                                  0x000000010000a086 main + 145
+9   ld                                  0x0000000100002774 start + 52
+}}}
+
+I suspect the issue is that getsectiondata is striding by sizeof(struct mach_header_64) but the compiler maybe laid down a struct mach_header.
+{{{
+        sgp = (struct segment_command_64 *)
+              ((char *)mhp + sizeof(struct mach_header_64));
+        for(i = 0; i < mhp->ncmds; i++){
+            if(sgp->cmd == LC_SEGMENT_64){
+}}}
+
 == Tiger ==
 
 I do not have a Tiger machine or VM, so I am not sure how feasible it is to get things working on Tiger.  If you are adventurous, I suggest you follow the Leopard instructions above and report issues.  Note that it will take a while to build libcxx because we'll need to build apple-gcc42 and use it to build clang-3.4 and use it to build libcxx.
-------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