Subject: glibc/gcc problems. Any ideas?

From: Phil Norman <[email-masked]>
Date: Mon, 22 Jun 1998 12:51:40 +0100 (BST)

Hi!

As I've mentioned before, I've been trying to compile up a set of ELF 
compilation tools.  I'm currently on the stage of getting glibc to work, 
and am having a few problems.  I compiled up gcc after configuring it so:

./configure --prefix=/usr/elf --host=arm-linuxaout --target=arm-linux

And I've compiled binutils with exactly the same arguments (although I 
had to make symlinks in /usr/elf/bin since binutils created all the binaries 
with names like arm-linux-ld and arm-linux-as).  Now, when I come to compile 
glibc, with the following configure line:

./configure --prefix=/usr/elf --enable-addons=crypt,linuxthreads 
--build=arm-linuxaout --host=arm-linux

I currently get the following error when making:

gcc assert.c -c -O -Wall -Winline -Wno-parentheses -Wstrict-prototypes 
-Wwrite-strings -g     -I.  -I.. -I../include -I../libio  
-I../sysdeps/arm/elf -I../sysdeps/unix/sysv/linux/arm 
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common 
-I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv 
-I../sysdeps/unix/arm -I../sysdeps/unix -I../sysdeps/posix 
-I../sysdeps/arm/fpu -I../sysdeps/arm -I../sysdeps/wordsize-32 
-I../sysdeps/ieee754 -I../sysdeps/libm-ieee754 -I../sysdeps/generic    
-include ../include/libc-symbols.h     -o assert.o
assert.c:78: section attributes are not supported for this target
make[1]: *** [assert.o] Error 1
make[1]: Leaving directory `/usr/src/glibc-2.0.94/assert'
make: *** [assert/subdir_lib] Error 2

This looks like a problem with the compiler (which is why I've included 
the configure line from that above).  Any ideas anyone?

BTW, I'm writing a how-to as I go along which should enable people in the 
future to compile up ELF stuff with fewer problems than I've having.

Bye for now, and thanks in advance,
Phil

-- 
Rule of programming #3: The number of bugs which exist in a program is
	approximately equal to the square of the number of bugs which
	you think exist.

Phil Norman, mailing from Exeter University.
email:	[email-masked]
URL:	http://newton.ex.ac.uk/general/ug/norman

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

---

From: Philip Blundell <[email-masked]>
Date: Mon, 22 Jun 1998 13:03:53 +0100

>with names like arm-linux-ld and arm-linux-as).

Actually, had you just done "--prefix=/usr" this would have just worked.  GCC 
and binutils are smart enough to spot when you're building a cross-compiler 
and install it correctly in /usr/arm-linux/...

>--build=arm-linuxaout --host=arm-linux

You need to tell it what compiler to use.  Try something like this:

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

Otherwise it will use your native compiler which doesn't understand all the 
features needed for glibc.

p.

---

From: Matthew Wilcox <[email-masked]>
Date: Mon, 22 Jun 1998 13:46:55 +0100 (BST)

Philip Blundell
> and install it correctly in /usr/arm-linux/...

the plan was to keep everything separate in case anything went wrong.

> features needed for glibc.

ah, /usr/elf/bin was in his $PATH ahead of /usr/bin, and typing
`gcc --version' reports 2.8.1

-- 
Set Alias$Case Set Alias$[ |||| |MSet Alias$Otherwise Set Alias$[ \ Matthew
"" |MSet Alias$When If %0=%%0 Then Set Alias$[ "" ||MIf %0=%%0    \ Wilcox
Then Set Alias$Otherwise Set Alias$[ |||||||||||||||| ||MIf       \
%0=%%0 Then Set Alias$When Set Alias$[ ||||||||||||||||
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]