Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Cross Compiling gcc

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: "Chris Brien" <christopher_brien AT hotmail.com>
  • To: <spencero AT mail.utexas.edu>, "Julian v. Bock" <julian AT openit.de>
  • Cc: <SM-Discuss AT lists.ibiblio.org>
  • Subject: Re: [SM-Discuss] Cross Compiling gcc
  • Date: Mon, 4 Nov 2002 23:18:56 -0000

Not within the framework of sourcemage, no. I have been playing with this
for a bit, and came to the conclusion that it would be possible, as long as
the installroot is always set and used. To make a cross-compiler, all you
need to do is

./configure --host=$THE_COMPUTER_YOU_ARE_BUILDING_ON \
--build=$THE_COMPUTER_IT_WILL_EVENTUALLY_RUN_ON \
--target=$THE_COMPUTER_IT_WILL_GENERATE_CODE_FOR

So, for a x86-cross-mips, its

./configure --host=i386-pc-linux-gnu \
--build=i386-pc-linux-gnu \
--target=mips-linux-gnu

Or something like that. Have the binutils source in your gcc source
directory to build that at the same time with the same options. After this
is installed, you can cross-compile stuff by setting "--build=mips" in
configure, or by exporting CC=mips-pc-linux-gnu-gcc.

I think it would be great for sorcery to support cross-compiles, as it would
allow you to set up a compile farm serving binaries for any machine you
have. Which would be very nice. It would, however, require some hacking of
almost every spell to install in the right place :o( . Unless anyone can
think of another way to do it.

Chris

----- Original Message -----
From: "Julian v. Bock" <julian AT openit.de>
To: <spencero AT mail.utexas.edu>
Cc: <SM-Discuss AT lists.ibiblio.org>
Sent: Monday, November 04, 2002 4:39 PM
Subject: Re: [SM-Discuss] Cross Compiling gcc


> Hi
>
> >>>>> "SO" == Spencer Ogden <spencero AT mail.utexas.edu> writes:
>
> SO> Is it possible to install a version of gcc which can cross compile
> SO> to say MIPS within the framework of sourcemage? Of do I have to
> SO> download it on my own and compile it?
>
> Theoretically yes, but you won't end up having fun if your freshly
> compiled mips glibc is installed under /usr...
>
> There is no installation prefix option in sorcery IIRC, and many
> spells which don't use the default build procedure have /usr hardcoded
> anyway.
>
> Furthermore, optimization flags, configure options, and other stuff is
> likely to get in your way.
>
> Julian




Archive powered by MHonArc 2.6.24.

Top of Page