r193528 - Support cross linking to arm on ubuntu.

Chandler Carruth chandlerc at google.com
Mon Oct 28 17:08:21 PDT 2013


(adding list back)

On Mon, Oct 28, 2013 at 4:58 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> > Why? Why is it ever OK to infer anything about the detected GCC
> installation
> > from the distro? If I put my own GCC installation onto a redhat system,
> it's
> > not clear why it's biarch-ness would follow from the distro.
>
> It would not with that patch. It was checking for the file in the
> sysroot.


Yes, but it is still assuming that any GCC installation within that sysroot
is configured the same as all other GCC installations within that sysroot.
This seems trivially not always true.

As for why I think it is needed, it is because I don't see
> another way of knowing the difference of a redhat and a ubuntu ARM
> installation. In a ubuntu install, it is not biarch and it should
> have:
>
>
> /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib
>
> Note the funny looking "lib/../lib".


Yes, this is due to a lack of a bi-arch suffix for this target architecture.


> On fedora gcc is built as biarch
> and there is not such line.
>

How on earth do you get a biarch arm toolchain. There isn't (to my
knowledge) a non-cross-compiling way to compile for a 32-bit arm platform
and a 64-bit arm platform? They have totally different ABIs?

What is the actual layout of the ubuntu vs. fedora toolchains you're trying
to use? i typically use find to print this out...


> > I would much rather this code detect biarch-ness from the manifest
> > properties of the installed GCC toolchain rather than hard coding
> settings
> > for one distro or another.
>
> How?
>
> In the worst case of a gcc installation built as biarch with only one
> arch actually present (fedora arm), the only way to know there is a
> difference is the order gcc looks for libraries. There is no 32, 64,
> lib32 or lib64 directory.
>

If there is no 32, 64, lib32, or lib64 directory, it isn't a biarch
toolchain by definition. And biarch makes no real sense for arm anyways.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131028/8c4fce6c/attachment.html>


More information about the cfe-commits mailing list