I wrote:
> I think I haven't seen this in 19990616,

Wrong, 19990616 had it too. Back to 19990623. I've now hacked crtstuff.c
too, and at least gcc compiles, but some things are still very wrong:

 - after make install, <prefix>/lib/gcc-lib/arm-linux/gcc-2.95/include
   contains lots of .c and .o files, and non of the .h files like they
   really belong there
 - things like stdarg.h end up in
   <prefix>/lib/gcc-lib/arm-linux/gcc-2.95/include/ginclude/stdarg.h
                                                  ===

Very weird. I've attached my probably not very useful build instructions.

The include problems above are probably related to the following error
I'm getting during make install:

touch stmp-headers
(cd `pwd`/include ; \
 tar -cf - .; exit 0) | (cd 
/scratch/psion/xdev/lib/gcc-lib/arm-linux/gcc-2.95/include; tar xpBf - )
/bin/sh: /scratch/psion/xdev-1/egcs-19990623/gcc/include: No such file or directory
... a bit later ...
constructing ../fixinc.sh for arm-unknown-linux-gnu
rm -rf include; mkdir include

(I'm building in /scratch/psion/xdev-1/egcs-19990623 and installing into
/scratch/psion/xdev)

Seems that things get set up in the wrong order. This may also explain the
crtstuff.c problems. BTW, some of the chaos could be avoided by changing
cd ...; tar ... to cd ... && tar ...

- Werner

-------------------------------- README.xdev-1 --------------------------------

ARM cross-development environment (for i386 hosts)
---------------------------------

xdev-1 provides the arm-linux tools (binutils-2.9.1.0.25 and gcc-2.95).
The target format of arm-linux is ELF. If you want to build your own
tool chain from source, see the instructions at the end.

Historical remark: xdev-0 used binutils-2.9.1.0.15 and egcs-1.1b.
Meanwhile, the egcs and gcc development branches have merged again, and
the new "stable" gcc is gcc-2.95 which calls itself sometimes also egcs.
Confused ? Good :-) The egcs/gcc home page is http://egcs.cygnus.com/

Install as follows:
 - create a directory for the development tools
 - if its name isn't /scratch/psion/xdev, create (a) symbolic link(s)
   such that /scratch/psion/xdev points to this directory
 - extract xdev-1.tar.gz in / (all paths begin with scratch/psion/xdev)
 - add /scratch/psion/xdev/bin to your PATH

The binaries were built on a RedHat 5.2 host, so the shared libraries
should be okay for most people. Famous last words, I know :-)


The build instructions for binutils and gcc
-------------------------------------------

First a warning that you need a bit of free disk space (all numbers
rounded up):

  Sizes           Download        Build           Installed
  ---------------------------------------------------------------------
  binutils         5.7MB           49MB            15MB
  gcc              8.4MB           52MB            48MB ?!?
  gcc patches        4kB           n/a             n/a

If you want to use an installation directory different from /usr/local,
e.g. /scratch/psion/xdev:
 - mkdir /scratch/psion/xdev
 - update PATH (maybe change .profile or such too) to include
   /scratch/psion/xdev/bin
 - use the --prefix options
Otherwise, _don't_ use any --prefix

Build binutils:
 - get
   ftp://ftp.varesearch.com/pub/support/hjl/binutils/binutils-2.9.1.0.25.tar.gz
 - tar xfz binutils-2.9.1.0.25.tar.gz
 - cd binutils-2.9.1.0.25
 - ./configure --target=arm-linux --prefix=/scratch/psion/xdev
 - make
 - make install
If short on space,  rm -rf binutils-2.9.1.0.25  now. If very short on
space,  rm binutils-2.9.1.0.25.tar.gz  too.

Make kernel headers accessible:
 - install the Linux-7k kernel source tree, with all patches, etc. (But
   don't try to compile anything yet.) For details, see README in
   ftp://lrcftp.epfl.ch/pub/people/almesber/psion/boot-12.tar.gz
 - cd to the kernel source top-level directory
 - make symlinks
 - cd /scratch/psion/xdev (or wherever you want to install the build tools)
 - mkdir arm-linux/include
 - ln -s /wherever-your-kernel-is/include/{linux,asm} arm-linux/include

Build gcc:
 - get the following files
   ftp://egcs.cygnus.com/pub/egcs/snapshots/1999-06-23/egcs-core-19990623.tar.gz
   ftp://ftp.netwinder.org/users/p/philb/gcc-2.95-diff-990623.gz
   ftp://lrcftp.epfl.ch/pub/people/almesber/psion/egcs-19990623-xdev-1.patch.gz
 - be sure to have bison and autoconf installed
 - tar xfz egcs-core-19990623.tar.gz
 - cd egcs-19990623/gcc/config/arm
 - zcat ../../../../gcc-2.95-diff-990623.gz | patch -s
 - cd ../../..
 - zcat ../egcs-19990623-xdev-1.patch.gz | patch -p1 -s
 - if very short on space,  rm ../egcs-core-19990623.tar.gz  now
 - ./configure --target=arm-linux --prefix=/scratch/psion/xdev --disable-threads
 - make cross
   It will stop after a while with with
     make[1]: *** No rule to make target `c++', needed by `native'.  Stop.
     make[1]: Leaving directory `/scratch/psion/xdev-1/egcs-19990623/gcc'
     make: *** [cross] Error 2
 - make install LANGUAGES=c
   This one should finish without errors.
If short on space,  cd .. && rm -rf egcs-19990623  now.

-- 
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH       [EMAIL PROTECTED] /
/_IN_R_131__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to