configure.info: Cross Cygnus CCross
Go backward to Standard Cygnus CCross
Go up to CCross in Cygnus Tree
Go to the top op configure
Building a Cross Program
There are additional considerations if you want to build a cross
compiler, rather than a native compiler, in the Cygnus tree using a
Canadian Cross.
When you build a cross compiler using the Cygnus tree, then the
target libraries will normally be built with the newly built target
compiler (*note Host and Target Libraries::). However, this will not
work when building with a Canadian Cross. This is because the newly
built target compiler will be a program which runs on the host system,
and therefore will not be able to run on the build system.
Therefore, when building a cross compiler with the Cygnus tree, you
must first install a set of build cross target tools. These tools will
be used when building the target libraries.
Note that this is not a requirement of a Canadian Cross in general.
For example, it would be possible to build just the host cross target
tools on the build system, to copy the tools to the host system, and to
build the target libraries on the host system. The requirement for
build cross target tools is imposed by the Cygnus tree, which expects
to be able to build both host programs and target libraries in a single
`configure'/`make' step. Because it builds these in a single step, it
expects to be able to build the target libraries on the build system,
which means that it must use a build cross target toolchain.
For example, suppose you want to build a Windows cross MIPS ELF
compiler on a GNU/Linux system. You must have previously installed
both a GNU/Linux cross Windows compiler and a GNU/Linux cross MIPS ELF
compiler.
In order to build the Windows (configuration name `i386-cygwin32')
cross MIPS ELF (configure name `mips-elf') compiler, you might execute
the following commands (long command lines are broken across lines with
a trailing backslash as a continuation character).
mkdir linux-x-cygwin32
cd linux-x-cygwin32
SRCDIR/configure --target i386-cygwin32 --prefix=INSTALLDIR \
--exec-prefix=INSTALLDIR/H-i386-linux
make
make install
cd ..
mkdir linux-x-mips-elf
cd linux-x-mips-elf
SRCDIR/configure --target mips-elf --prefix=INSTALLDIR \
--exec-prefix=INSTALLDIR/H-i386-linux
make
make install
cd ..
mkdir cygwin32-x-mips-elf
cd cygwin32-x-mips-elf
SRCDIR/configure --build=i386-linux-gnu --host=i386-cygwin32 \
--target=mips-elf --prefix=WININSTALLDIR \
--exec-prefix=WININSTALLDIR/H-i386-cygwin32
make
make install
You would then copy the contents of WININSTALLDIR over to the
Windows machine, and run the resulting programs.
Created Wed Sep 1 16:42:00 2004 on bee with info_to_html version 0.9.6.