Why is one compiler on 10.6 able to generate PPC binaries and not the other?

Mojca Miklavec mojca at macports.org
Thu Mar 10 17:20:05 PST 2016


On 10 March 2016 at 21:26, Ryan Schmidt wrote:
>> On Mar 10, 2016, at 1:00 PM, Mojca Miklavec wrote:
>>
>> Hi,
>>
>> While following
>>    https://trac.macports.org/wiki/LibcxxOnOlderSystems#Leopardppc
>> on 10.6/x86_64 I tried to install clang 3.7 (thinking that version 3.7
>> might have an even better support for PPC than 3.6).
>>
>> The problem is that clang-mp-3.7 doesn't want to produce ppc binaries,
>> so I wasn't able to install libcxx. I get:
>>
>>> clang++-mp-3.7 a.cc -arch ppc
>> ld: unknown/unsupported architecture name for: -arch ppc
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>
>> At the same time clang++-mp-3.4 works fine even though both clang 3.4
>> and 3.7 are x86_64 only.
>>
>> I'm now trying to rebuild everything as +universal (with ppc included
>> in the list of universal architectures) and hope that it will work
>> afterwards. But I would be grateful for ideas about why clang 3.4
>> would be able to create ppc binaries and clang 3.7 not.
>>
>> Thank you,
>>   Mojca
>>
>> PS: I'm not actually using the PPC, I'm doing this all for fun and as
>> a challenge. But I don't have any VM with 10.5, so I wanted to do the
>> cross-compiling step on VM with 10.6.
>
> Maybe:
>
> https://trac.macports.org/changeset/129356

Weird. This changes predates the initial version of
    https://trac.macports.org/wiki/LibcxxOnOlderSystems
that suggests cross-compiling libcxxabi with ppc support.

Judging from
    http://www.csl.cornell.edu/~fang/sw/llvm/
I would imagine that there must be a way to compile libc++ (even on
10.4 and even if from another repository). The problem is a bit of a
chicken-and-egg, requiring a working clang-3.6 (3.7?) compiler to
build libc++; but 3.7 would refuse to do the linking step. Maybe I'll
need to do that in multiple stages as described on that website.

I'm waiting for the universal build of clang 3.4 to finish first. I
don't know if that will make any difference, but let's see.

Mojca


More information about the macports-dev mailing list