r193528 - Support cross linking to arm on ubuntu.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Oct 28 17:41:21 PDT 2013

>> 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...

You are correct that there is no 64 libraries in it. Yet, you can
compile gcc with biarch support even if there is no parallel arch. I
am pretty sure you can compile it biarch for ia64.

On my fedora 18 on a arm chromebook gcc says it was compiled with

 ../configure --prefix=/usr --mandir=/usr/share/man
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--disable-build-with-cxx --disable-build-poststage1-with-cxx
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-plugin --enable-initfini-array --enable-java-awt=gtk
--disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-
--enable-libgcj-multifile --enable-java-maintainer-mode
--disable-libjava-multilib --with-ppl --with-cloog
--disable-sjlj-exceptions --with-cpu=cortex-a8 --with-tune=cortex-a8
--with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16
--with-abi=aapcs-linux --build=armv7hl-redhat-linux-gnueabi

The actual build instructions are

>> > 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.

Call it what you want, but the end result is that running

$ gcc test.o -o t -Wl,-debug 2>&1 | grep bin/ld | sed "s/ /\n/g" |
grep "dynamic\|ld-linux\|-L\|crt"



and we should print the same.


More information about the cfe-commits mailing list