[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Building latest snapshot[with Cygwin]
- Date: Tue, 31 Aug 1999 21:00:09 +0100
- From: D.J at fiddes.surfaid.org (David J. Fiddes)
- Subject: Building latest snapshot[with Cygwin]
Hi,
As an excercise I tried to build the latest RTEMS using Cygwin Beta 20.1 on
a new Celeron 466 that had never seen Cygwin before. It worked OK for
m68k-rtems but choked on m68k-rtemself. This is roughly what I did:
Setting up Cygwin:
1) Install Cygwin to e:\cygnus
2) Add SET CYGWIN=binmode and SET HOME=/home in cygwin.bat
3) Run up Cygwin shell and "mount -b e:\\unix /" and "mount -b e:\\cygnus
/cygnus"
4) Created /bin, /tmp, /home /source and /build directories
5) Rename sh.exe to sh.exe.old and copy bash.exe to sh.exe and to
/bin/sh.exe
6) Build make-3.77 and manually copied and stripped make.exe to cygwin bin
directory
7) Downloaded and unpacked Cygwin perl 5.005_03.
8) Created ~/.bashrc with "export
PATH=/cygnus/cygwin-b20/H-i586-cygwin32/bin:/gcc-m68k/bin:/usr/local/bin"
and restarted shell to make Perl available and eradicate DOS paths.
9) Configured, built and installed autoconf-2.13 and automake-1.4
with --prefix=/cygnus/cygwin-b20
and --exec-prefix=/cygnus/cygwin-b20/H-i586-cygwin32
Building the toolset:
1) Unpack gcc-2.95.1, binutils-2.9.1 and newlib-1.8.1 into /source
2) Patch with RTEMS patches as per usual
3) configure, build and install binutils with --prefix=/gcc-m68k
and --target=m68k-rtems(elf)
4) Link ../newlib-1.8.1/newlib and libgloss with newlib and libgloss in
gcc-2.95.1 directory
5) Remove libchill, libobjc, libf2c, gcc/f, gcc/ch, gcc/objc, gcc/java from
gcc.
6) Configure gcc with --with-newlib, make with "make -k cross" (it choked
for me on all-target-libiberty) and make -k install (I was too lazy to
install texinfo like I normally do).
Building RTEMS:
1) Set CC=gcc with "export CC=gcc"
2) Configure RTEMS with
configure --target=m68k-rtems(elf) --enable-rtemsbsp=gen68360 once I'd
remembered about the CC=gcc hack it worked as per usual.
3) Ran make....after all the usual collection of target compiler check
semi-failures it actually started building stuff. I ran out of time and had
to go home so I stopped the build half way through the networking I think.
The only unknown failure I came across was that m68k-rtemself failed during
the make time configure when it first tried to see if the compiler worked.
The configure just stopped dead and hung Cygwin... Haven't investigated what
caused this yet. Plain old m68k-rtems worked just fine.
I've just remembered the --print-file-name hack that we had to put in to
support Cygwin pre-4.0. This can definitely be removed *if* we are moving to
gcc-2.95.x for the target compiler. It can be removed from host stuff *if*
we make Cygwin users move to gcc-2.95.1 as their main compiler (a move that
official Cygwin will make in a while anyway). Another hack that was added at
about the same time is that cygwin doesn't support --pipe. As of Beta 20.1
and egcs-1.1b it does. Not a major thing but worth a cleanup.
With the number of target compiler checks made during an RTEMS build now
quite large the "Terminate" dialog is really bugging me. I'm going to give a
new cygwinb1.dll a go then try hacking cygwin myself to add a check that the
EXE being passed to CreateProcess() starts with either MZ, NE or PE. It may
be dirty but it should serve our purpose.
Dave