Subject: Again toolchain building problems

From: "e-Fred" <[email-masked]>
Date: Sat, 13 Mar 1999 15:29:06 +0100

Hi all
As I've already submitted encountered problems while
building the complete toolchain for ELF (for both kernel and user space binaries)
to P. Blundell and C. Rutter, so I submit here a sum up of the situation (as asked by Chris).

I own a StrongARM RPC 32mb memory with the initial ARMLINUX distribution based on RedHat 3.0.3.

Everything is ok, and all compilations will produce the a.out format.
[ for example, I partially compiled fwm95 and other stuff without problems, samba runs quite
well, and  I use my PC as an X terminal to unload memory from the rpc box etc..]

As specified, I have all sources for egcs1.1.1 , binutils 2.0.19a and glibc 2.1.
I patched all these trees using the appropriate patches from P. Blundell and R.M.King.
I've a patched kernel source tree for version 2.2.1 which seems to be ok.

for all configure commands, I'm using a syntax like this in my case (native tool chain)

./configure arm-linux --prefix=/usr

binutils compilation proceed and link without errors, using the initial GCC and binutils 
from armlinux distrib. (a.out format) good !

Then "looping" problems appears :

1. I "make install" the new Binutils in order to proceed afterward to the egcs gcc compilation.

(new binutils is now installed) the new ld is installed and will, at final link stages fo gcc, ask
for the crt1.o file. So, I cant't link the gcc compiler at this point.
Ok; this file should be produced by glibc 2.1.

I'm working with now the new binutils for ELF and the old aout 2.7.2 gcc.
(correct me if I'm wrong)

2. So I stop fighting with the egcs compilation, and start a glibc 2.1 compilation
(with the threads and crypt add-ons) to get the crt1.o built.

-Glibc2.1 should not use any crt*.o because of the fact glibc 2.1 build itself
crt*.o files. (AFAI understand)-

This time, glibc stops at linking stage, with a "memory exhausted" error from ld.
Ok. This problem already exists with the old linker... so I think something should
be done with the ld compilation in binutils .. but what ?

Each time I tried another test, I reverted to the old distribution using 
a command like rpm -i --force /RedHat/RPMS/gcc... and also for binutils.

I can compile directly egcs gcc with the standard distrib, then I compile binutils
(note the order : egcs *then* binutils). But I got then an AOUT gcc and a binutils for ELF ?!!

I can not compile the kernel (2.2.1 patched) because of the crt1.o missing error from ld.

To sum up, ld needs crt1.o from glibc2.1 which can't be built because of exhausted memory from ld
itself. (this is why i call this a "looping" problem!)

I'm sure there's something to do.... Any idea ?

did anyone successfully build an Armlinux ELF working on an SA RISC PC or is it only likely
to exist ? Or should I revert to a Intel linux and only cross compile to target the Risc PC
armlinux ?
I promise I'll write a "getting a working ELF toolchain for Native armlinux on riscPC FAQ"
as soon as I'll be able to actually do so !!

Cheers,
Frederic.

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Sat, 13 Mar 1999 16:30:21 +0000 (GMT)

e-Fred writes:
> As specified, I have all sources for egcs1.1.1 , binutils 2.0.19a
> and glibc 2.1. I patched all these trees using the appropriate patches
> from P. Blundell and R.M.King.  I've a patched kernel source tree for
> version 2.2.1 which seems to be ok.
> 
> binutils compilation proceed and link without errors, using the initial
> GCC and binutils from armlinux distrib. (a.out format) good !

The binutils should not have overwritten your a.out binutils.  The ELF
stuff should be named arm-linux-as, arm-linux-ar, arm-linux-ld etc.

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">

PS, please turn off HTML in your mail client!
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]