Configuring gcc for a s390 or criss crosscompiler? (was: [PATCH] Add --with-cross configure option to force -DCROSS_COMPILE behavior)
Dan Kegel
dkegel@ixiacom.com
Mon Jun 9 01:38:00 GMT 2003
Unfortunately, Daniel's trick doesn't work on s390 and cris, which seem
to canonicalize target tuples harder than other targets:
+ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
--prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
--enable-languages=c
--with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
--disable-shared
...
*** --with-headers is only supported when cross compiling
Testing config.sub out directly, I see:
$ for arch in i686 sparc arm cris ppc m68k ia64 s390 mips sparc64; do
/bin/sh build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/config.sub
$arch-blort-linux-gnu; done
i686-blort-linux-gnu
sparc-blort-linux-gnu
arm-blort-linux-gnu
cris-axis-linux-gnu
powerpc-blort-linux-gnu
m68k-blort-linux-gnu
ia64-blort-linux-gnu
s390-ibm-linux-gnu
mips-blort-linux-gnu
sparc64-blort-linux-gnu
So I'm still a bit stuck -- if I want my toolchain build script
script to work for all the architectures gcc/glibc/linux support,
I guess I need to figure out how to coax config.sub into
thinking I'm building a cross-compiler.
How horrible would it be if I just disabled the rabid canonicalization
in the s390 and cris cases?
- Dan
-----Original Message-----
From: Daniel Jacobowitz
To: DJ Delorie
Cc: dkegel@ixiacom.com; gcc-patches@gcc.gnu.org
Sent: 02.06.2003 18:30
Subject: Re: [PATCH] Add --with-cross configure option to force
-DCROSS_COMPILE behavior
On Mon, Jun 02, 2003 at 09:03:59PM -0400, DJ Delorie wrote:
>
> Isn't this what the sysroot patches were for?
Yes, absolutely. That should be used instead. It does require that
$build != $target, but:
> Note that you can also tweak the --host parameter in subtle ways, like
> "--host=i386-pc-linux --target=i686-pc-linux"
Or even subtler:
--host=i686-buildhost-linux --target=i686-pc-linux
then later:
--build=i686-buildhost-linux --host=i686-pc-linux
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list