crosscompiling a crosscompiler ?
Brian Dessent
brian@dessent.net
Tue Aug 7 21:21:00 GMT 2007
Tobi wrote:
> i'd like to build a compiler running on cygwin with target
> i586-unknown-linux-gnu.
> is it possible to build a toolchain like this with a linux->cygwin
> crosscompiler (already running on my linux box) ?
> how can i tell crosstool to use a crosscompiler ?
Sure it's possible, but probably not with crosstool.
> i tried setting HOST=i686-pc-cygwin and CC=i686-pc-cygwin-gcc
> but it fails with
That won't work. First you need to build a linux->cygwin cross
(build=linux, host=linux, target=cygwin), then you use that to produce
the canadian cross (build=linux, host=cygwin, target=linux). You don't
do it by setting CC, you do it by setting build/host/target.
Since you won't be using crosstool you will have to arrange for the
target libc to be available for building target libraries (libgcc,
libstdc++, etc) which is normally the difficulty that makes people turn
to crosstool in the first place. But if you have access to the libc on
both systems it's not hard to just create a sysroot, populate it with
the target libc+headers+startup objects, and give that as --with-sysroot
when configuring.
Brian
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list