Subject: RE: HELP - Egcs 1.1.1

From: "Chagas, Jason" <[email-masked]>
Date: Tue, 23 Feb 1999 08:35:00 -0800

This may sound like a stupid question but are you sure the glibc
that you 
	installed was actually compiled for ARM?  If GCC wasn't installed
properly 
	it seems unlikely that building the C library would have worked.  I
wonder if 
	maybe you accidentally did a native build instead.

	You should be able to tell easily enough by using `file' on the
crt1.o in 
	question.

	p.

Phil,

Yup,  'file ~/glibc-2.0.111/csu/crt1.o' returns  "crt1.o: ELF 32-bit LSB
relocatable, Intel 80386, version 1, not stripped". The files under
'/usr/local/arm/arm-linux/lib/crt1.o' and
'/usr/local/arm/glibc/arm-linux-glibc/lib/crt1.o' are also for 'x86'.  On
the other hand, 'file hello.o' returns "hello.o: ELF 32-bit LSB relocatable,
version 1, not stripped". It says nothing about 'x86' so I take it is an ARM
type.

I wonder why it generated X86 binaries when I specified the target as
'arm-linux':

"./configure --target=arm-linux
--prefix=/usr/local/arm/glibc/arm-linux-glibc -enable-add-ons"

How can I fix the problem? Any ideas?

Jason

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

---

From: Philip Blundell <[email-masked]>
Date: Tue, 23 Feb 1999 17:28:53 +0000

>--prefix=/usr/local/arm/glibc/arm-linux-glibc -enable-add-ons"

Hi Jason,

You need to tell it which compiler to use as well.  Otherwise it defaults to 
`gcc' which is of course the native compiler.

Also, `--target' is meaningless for glibc because it's not a compiler tool.  
Configure was probably ignoring that option and again defaulting to a native 
build.

Try something like this, assuming `arm-linux-gcc' is in your PATH:

$ CC=arm-linux-gcc ./configure arm-linux --enable-add-ons --prefix=whatever

p.

---

From: Philip Blundell <[email-masked]>
Date: Tue, 23 Feb 1999 17:34:04 +0000

>version 1, not stripped". It says nothing about 'x86' so I take it is an ARM

Yes; your `file' probably doesn't understand about ARM binaries.  It's not 
hard to fix, just add an appropriate entry to your magic numbers file.  I 
imagine it already has something like this:

0       string          \177ELF         ELF                                     
[...]
>>18    leshort         0               no machine,                             
>>18    leshort         1               AT&T WE32100 - invalid byte order,      
>>18    leshort         2               SPARC - invalid byte order,             
>>18    leshort         3               Intel 80386,                            

etc; the line you need to add is:

>>18    leshort         40              ARM,

p.