This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Cygwin Cross compiler on Linux
- From: "Lassi A. Tuura" <lassi dot tuura at cern dot ch>
- To: Tim Renner <l0ci at hotmail dot com>
- Cc: cygwin at cygwin dot com
- Date: Fri, 28 Mar 2003 08:25:54 +0100
- Subject: Re: Cygwin Cross compiler on Linux
- Organization: Northeastern University, Boston, USA
- References: <F106VwrblZz02H67yRL0001820a@hotmail.com>
> I was wondering if anyone has successfully built a Cygwin gcc cross compiler
> (Host=i686-suse-linux, Target=i386-pc-cygwin) under Linux, and if so, could
> you post or email me the steps you took to do it...
I guess mine counts as successful, it works in that I can compile simple
hello-world C++ programs, but I haven't tried running them, I don't yet
have cygwin on my box (yet to install windows...).
Below, /asis is untarred GNU releases. ~/dev/cygwin/src is my cygwin
repository checkout.
Here we go -- get sources first:
mkdir -p /home/lat/dev/gnu/src/gcc-3.2.2/linux-x-cygwin
cd !$
lndir /asis/src/GNU.LANG/gcc-3.2.2 .
rm -fr libiberty
mkdir cygwin
lndir ~/dev/cygwin/src cygwin
cd cygwin
mv bfd binutils gas intl libiberty ld mmalloc newlib opcodes winsup ..
cd include
for f in *.h */; do
[ -e ../../include/$f ] && rm -f ../../include/$f;
done
cd ..
mv include/* ../include
cd ..
rm -fr cygwin
rm libiberty/cplus-dem.c
ln -s /asis/src/GNU.LANG/gcc-3.2.2/libiberty/cplus-dem.c libiberty
Build Cygwin cross compiler:
mkdir -p /home/lat/dev/gnu/build/gcc-3.2.2/linux-x-cygwin
cd !$
../../../src/gcc-3.2.2/linux-x-cygwin/configure \
--prefix=/home/lat/dev/gnu/linux-x-cygwin \
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu \
--target=i686-pc-cygwin --with-gnu-ld --with-gnu-as \
--enable-threads=no --with-mmap --enable-bfd-assembler \
--enable-languages="c,c++"
make -kj4 cross
make -kj4 cross
make -kj4 install-cross
# Edit the specs (*startfile:) for full path to *crt.o (two places)
//lat
--
Real Programmers don't need comments -- the code is obvious.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/