[PATCH] Support cross linking from x86-64 to arm on ubuntu

Chandler Carruth chandlerc at gmail.com
Tue Oct 29 03:35:50 PDT 2013


For the list, Rafael and I spent a bunch of time talking about this in IRC
as well, and it took me some time to debug down to the actual root cause. I
think I found it and fixed it with the surgical change in r193601. I added
back all of the tests from your patch Rafael, but if you think we need
further testing here, by all means.

We're still going to consider *more* directories than GCC would. That's
true for almost all of these though. However, as far as I can tell, the
added places we search are duplicates, and thus either actually harmless,
or unlikely to be problematic ordering changes (looking in /lib after
/usr/lib rather than before /usr/lib when we think the actual libraries are
in /usr/<triple>/lib).

This problem isn't new or specific to the ubuntu config. I'd love ways to
solve it, but historically when I've tried either the complexity sky
rocketed or we stopped matching GCC's behavior if you moved the GCC
installation to a different install prefix or otherwise changed things in
small ways. =/

Anyways, let me know if my patch makes sense and if there is stuff still
not working.


On Mon, Oct 28, 2013 at 7:39 PM, Rafael Ávila de Espíndola <
rafael.espindola at gmail.com> wrote:

>   rebased.
>
> Hi chandlerc, logan,
>
> http://llvm-reviews.chandlerc.com/D2045
>
> CHANGE SINCE LAST DIFF
>   http://llvm-reviews.chandlerc.com/D2045?vs=5214&id=5216#toc
>
> Files:
>   lib/Driver/ToolChains.cpp
>   lib/Driver/ToolChains.h
>   test/Driver/Inputs/fedora_18_tree/etc/redhat-release
>   test/Driver/Inputs/x86-64_ubuntu_13.10/etc/debian_version
>   test/Driver/Inputs/x86-64_ubuntu_13.10/lib/.keep
>   test/Driver/Inputs/x86-64_ubuntu_13.10/usr/arm-linux-gnueabi/lib/crt1.o
>   test/Driver/Inputs/x86-64_ubuntu_13.10/usr/arm-linux-gnueabi/lib/crti.o
>   test/Driver/Inputs/x86-64_ubuntu_13.10/usr/arm-linux-gnueabi/lib/crtn.o
>   test/Driver/Inputs/x86-64_ubuntu_13.10/usr/arm-linux-gnueabihf/lib/crt1.o
>   test/Driver/Inputs/x86-64_ubuntu_13.10/usr/arm-linux-gnueabihf/lib/crti.o
>   test/Driver/Inputs/x86-64_ubuntu_13.10/usr/arm-linux-gnueabihf/lib/crtn.o
>
> test/Driver/Inputs/x86-64_ubuntu_13.10/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/crtbegin.o
>
> test/Driver/Inputs/x86-64_ubuntu_13.10/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/crtend.o
>
> test/Driver/Inputs/x86-64_ubuntu_13.10/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/crtbegin.o
>
> test/Driver/Inputs/x86-64_ubuntu_13.10/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/crtend.o
>   test/Driver/linux-ld.c
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131029/d5275856/attachment.html>


More information about the cfe-commits mailing list