Changes between Version 7 and Version 8 of LibcxxOnOlderSystems


Ignore:
Timestamp:
Jan 13, 2015, 6:05:20 PM (9 years ago)
Author:
jeremyhu (Jeremy Huddleston Sequoia)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LibcxxOnOlderSystems

    v7 v8  
    6565== Leopard (ppc) ==
    6666
    67 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:
     67PowerPC 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:
    6868{{{
    6969sudo port -v -s install clang-3.6
     
    7878}}}
    7979
     80The linker crashes when creating a trivial hello world executable.  This is a similar crash when building libmacho:
     81{{{
     82clang++-mp-3.6 -stdlib=libc++ -arch ppc hello_world.cxx
     83
     84Thread 0 Crashed:
     850   libc++abi.dylib                     0x0000000100353f15 getsectiondata + 73 (getsecbyname.c:428)
     861   libc++abi.dylib                     0x00000001003580cf libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Re
     87gisters_x86_64>::setInfoBasedOnIPRegister(bool) + 105
     882   libc++abi.dylib                     0x0000000100354c74 unw_init_local + 96
     893   libc++abi.dylib                     0x00000001003548e7 _Unwind_RaiseException + 72
     904   libc++abi.dylib                     0x00000001003500e8 __cxa_throw + 104
     915   ld                                  0x000000010000ecd6 Options::Options(int, char const**) + 0
     926   ld                                  0x000000010000c28f ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 13
     9395
     947   ld                                  0x000000010000d2ce ld::tool::InputFiles::InputFiles(Options&, char const**) + 372
     958   ld                                  0x000000010000a086 main + 145
     969   ld                                  0x0000000100002774 start + 52
     97}}}
     98
     99I suspect the issue is that getsectiondata is striding by sizeof(struct mach_header_64) but the compiler maybe laid down a struct mach_header.
     100{{{
     101        sgp = (struct segment_command_64 *)
     102              ((char *)mhp + sizeof(struct mach_header_64));
     103        for(i = 0; i < mhp->ncmds; i++){
     104            if(sgp->cmd == LC_SEGMENT_64){
     105}}}
     106
    80107== Tiger ==
    81108