Problems cross-compiling with clang 3.7 & 3.9 on 10.6
Jeremy Huddleston Sequoia
jeremyhu at macports.org
Mon Mar 27 20:26:05 UTC 2017
> On Mar 27, 2017, at 08:14, Mojca Miklavec <mojca at macports.org> wrote:
>
> Hi,
>
> After a long time I tried cross-compiling a few things on 10.6, but
> most attempts failed:
>
>> clang-mp-3.4 -arch ppc test.c -o test
>
> [OK]
IIRC, cfe just spawns llvm-gcc-4.2 when using -arch ppc in older versions. I suspect 3.4 does that which is why it "works"
>> clang-mp-3.7 -arch i386 test.c -o test
>
> [OK]
>
>> clang-mp-3.7 -arch ppc test.c -o test
> ld: warning: ignoring file
> /opt/local/libexec/llvm-3.7/bin/../lib/clang/3.7.1/lib/darwin/libclang_rt.osx.a,
> missing required architecture ppc in file
> ld: symbol dyld_stub_binder not found (normally in libSystem.dylib).
> Needed to perform lazy binding to function _exit for architecture ppc
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> clang-mp-3.9 test.c -o test
> ld: library not found for -lto_library
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> clang-mp-3.9 -arch i386 test.c -o test
> ld: library not found for -lto_library
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> clang-mp-3.9 -arch ppc test.c -o test
> ld: library not found for -lto_library
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>
> Any hints about how to fix these issues?
What's the output of with '-v -Wl,-v'?
> Any tickets I found that that remotely resembled problems with lto
> have been closed.
>
> With respect to ppc I probably just need to recompile the compiler
> with some proper universal flag? Is there any chance to enable some of
> that on the buildbot?
>
> Mojca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4465 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170327/5e928ea0/attachment.bin>
More information about the macports-dev
mailing list