This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin Cross compiler on Linux

> 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;
  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 \
  make -kj4 cross
  make -kj4 cross
  make -kj4 install-cross
  # Edit the specs (*startfile:) for full path to *crt.o (two places)

Real Programmers don't need comments -- the code is obvious.

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]