Subject: ELF tools / cross compilers

From: Melanie Rhianna Lewis <[email-masked]>
Date: Fri, 9 Oct 1998 12:22:36 +0100 (BST)

Are there any FAQs/Web pages etc about :

a)	Building 32 bit ELF tools for ArmLinux
b)	Building cross compilers (iX86 -> Arm)

I'm pretty good with linux and it seems a shame that I can't make use of
my Intel Linux box to build Arm Linux stuff.  Plus I would like to have a
go at building some ELF stuff.

Melanie

-- 
=====================================================================
Melanie Rhianna Lewis                      [email-masked]
"An it hurt none, do what thou will"    http://www.defaid.demon.co.uk
         TLBB#2 TGMCC#1 - MZ125, X7 (Under re-construction) 
=====================================================================

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Philip Blundell <[email-masked]>
Date: Fri, 09 Oct 1998 23:42:33 +0100

>b)	Building cross compilers (iX86 -> Arm)

The GCC documentation describes the latter and the former is really just a 
special case of it.  In rough order, you need to:

1. Build and install binutils (configure with --prefix=/usr --target=arm-linux)
2. Make sure the kernel headers are in place (/usr/arm-linux/include/asm etc)
3. Build GCC (configure with same options as binutils and make LANGUAGES=c).
Don't try to build Obj, C++ or anything like that, it won't work at this 
stage.  Install the C compiler.
4. Build glibc (configure with --host=armlinux, --build=whatever, --prefix=/
usr/arm-linux).  Install it, but double-check you got the prefix right before 
you do or you will be hosed.
5. Go back and compile the rest of GCC.
6. You should be in business

p.

---

From: Timothy Baldwin <[email-masked]>
Date: Sat, 10 Oct 1998 22:44:01 +0100

In message <[email-masked]>

> >b)   Building cross compilers (iX86 -> Arm)

[snip]

> 4. Build glibc (configure with --host=armlinux, --build=whatever,
>  --prefix=/usr/arm-linux).  Install it, but double-check you got the
>  prefix right before you do or you will be hosed.

Why not in /usr (ie. the default)?

Philip you did not say which version of GCC, and where to get it from.
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Melanie Rhianna Lewis <[email-masked]>
Date: Sun, 11 Oct 1998 12:43:25 +0100 (BST)

> Why not in /usr (ie. the default)?

Because I asked about a cross compiler and so if I used the default it
would overwrite my ix86 GCC and Binutils.

Melanie

-- 
==========================================================================
Melanie Rhianna Lewis                           [email-masked]
    Brought to you by Melanie's RiscPC, Stormbringer running ArmLinux!
==========================================================================

---

From: Philip Blundell <[email-masked]>
Date: Sun, 11 Oct 1998 19:03:58 +0100

>Why not in /usr (ie. the default)?

Because if you're configuring for cross compiling and you put your ARM library 
in /usr it will overwrite your native libraries with hilarious consequences.  
The compiler and binutils can be configured with --prefix=/usr because their 
installation scripts are smart enough to spot that you're building a cross 
compiler and the tools actually end up in /usr/arm-linux/.. in any case.

>Philip you did not say which version of GCC, and where to get it from.

I've posted this information many times already.

p.

---

From: Chris Blazie <[email-masked]>
Date: Tue, 13 Oct 1998 14:51:56 -0400 (EDT)

> stage.  Install the C compiler.

	Can someone tell me exactly which set of header files need to go
into /usr/arm-linux/include?  My first attempt to compile GCC terminated
when libgcc1.a would not compile.  I checked the include files to make
sure the proper ones were in place.  I finally got past libgcc1.a, but I
get undefined reference errors when libgcc1-test tries to link.  According
to the GCC documentation, this means that something went wrong with
libgcc1 when it was created.  

Thanks,

Chris

---

From: Philip Blundell <[email-masked]>
Date: Wed, 14 Oct 1998 09:52:25 +0200

>into /usr/arm-linux/include?  My first attempt to compile GCC terminated

Your target C library ones (ie the ones you get from compiling glibc at a 
later step).

It does now seem to be the case that libgcc2.c wants a couple of header files 
from the target library to build.  They aren't actually necessary and you can 
stop this from happening by adding -Dinhibit_libc to the CFLAGS.  
Alternatively just create empty files with these names as a temporary measure.

p.