Changes between Initial Version and Version 1 of Ticket #54242, comment 5


Ignore:
Timestamp:
Aug 21, 2017, 4:37:09 AM (7 years ago)
Author:
kencu (Ken)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54242, comment 5

    initial v1  
    1 I've been working further on this as time allows. The cmake script that manages the building of libclang_rt.10.4.a looks at the supported arches to test
     1The cmake script that manages the building of libclang_rt.10.4.a looks at the supported arches to test
    22{{{
    33-- OSX 10.4 supported arches: i386;x86_64;ppc;ppc64
    44}}}
    5 and then tries to run a test-compile with each using the build system. This build of clang-3.8 on 10.5 PPC is bootstrapping with gcc6 (no other choice). So with this gcc6 macports configuration, all the x86 code fails to build, and the system tries to build the ppc and ppc64 code. But all these test compiles fail to build as well for some reason (Cmake error log attached), so I guess it defaults to i386 and x86_64. And herein comes the "lucky" quirk - when gcc6 on ppc gets asked to build -arch i386, it says it can't and then builds it -arch ppc instead. So that is how we wind up getting code out.
    6 
    7 The supplied object files that make libclang_rt.10.4.a are close to correct, but they don't actually include the proper ppc ASM code from the ppc folder -- the system builds the i386 folder instead, as it is confused.
    8 
    9 With that, it's perhaps surprising that in the end, this produces a build system that passes 487/500 tests in the test-suite. (10 of those the broken exceptions on ppc).
    10 
    11 To fix this issue, the easiest thing to do would be to skip the tricky and multi-arch cmake build tricks used in compiler_rt and just write up a cmake build file by hand. This turned out to be trivial (attached), but I need to make sure I have all the proper objects included and none of the not-needed ones, and this is not so trivial. Any help there appreciated.
    12 
    13 Alternatively, it is likely possible to see why all the gcc ppc cmake build tests are failing, and fix that. No doubt this is the proper thing to do, and wish that I could do that.
    14 
    15 Finally, it might be possible to build clang_rt as a separate project using the makefiles as per the old days -- it is designed to do that as a separate build I see.
    16 
    17 Pretty close. clang-3.8 on PPC is working surprisingly well to build software that can't be built any other way, in the end.
     5and then tries to run a test-compile with each using the build system. This build of clang-3.8 on 10.5 PPC is bootstrapping with gcc6 (no other choice). So with this gcc6 macports configuration, all the x86 code fails to build, and the system tries to build the ppc and ppc64 code. But all these test compiles fail to build as well for some reason (Cmake error log attached), soit defaults to i386 and x86_64. And herein comes the "lucky" quirk - when gcc6 on ppc gets asked to build -arch i386, it says it can't and then builds it -arch ppc instead. So that is how we wind up getting code out.