gcc3.3: problem compiling elf/soinit.c (int. compiler error)
Hillier Gernot
gernot.hillier@siemens.com
Thu Jan 8 13:19:00 GMT 2004
Hi!
I sent this message already to bug-glibc in August 2003, but never got an
answer. So I try to re-post it here today. Hope this is ok...
--- SNIP ---
I'm just trying to build a cross toolchain with target platform AMD64.
With gcc-3.2, everything went fine, but with 3.3 I get an internal compiler
error at elf/soinit.c:
[...]
make -C elf subdir_lib
make[2]: Entering directory `/usr/src/glibc-2.2.5/elf'
x86_64-pc-linux-gcc soinit.c -c -O2 -Wall -Winline -Wstrict-prototypes
-Wwrite-strings -g -fPIC -I../include -I.
-I/usr/local/build-root/build-sles8-64/x86_64-pc-linux-glibc/elf -I..
-I../libio -I/usr/local/build-root/build-sles8-64/x86_64-pc-linux-glibc
-I../sysdeps/x86_64/elf -I../linuxthreads/sysdeps/unix/sysv/linux/x86_64
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread
-I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv
-I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/x86_64
-I../sysdeps/unix/sysv/linux/x86_64 -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/x86_64
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu
-I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -D_LIBC_REENTRANT -include
.../include/libc-symbols.h -DPIC -DSHARED -o
/usr/local/build-root/build-sles8-64/x86_64-pc-linux-glibc/elf/soinit.os
soinit.c:25: internal compiler error: in named_section_flags, at varasm.c:412
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[2]: ***
[/usr/local/build-root/build-sles8-64/x86_64-pc-linux-glibc/elf/soinit.os]
Error 1
make[2]: Leaving directory `/usr/src/glibc-2.2.5/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/usr/src/glibc-2.2.5'
make: *** [all] Error 2
This bug has been reported to gcc people, see:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9552
There, they claim that the source code is somehow buggy and that this
__EH_FRAME_BEGIN should be const - at least if I understand it right...
The problem occured first with glibc-2.2.5 (I have to use this one) for me,
but I also tried glibc-2.3.2 in the meantime with the same result. I also had
a look at the glibc CVS and there, soinit.c is untouched since ages.
I tried to constify the line by changing the corresponding part to
--- glibc-2.3.2/elf/soinit.c 2001-11-16 00:09:20.000000000 +0100
+++ glibc-2.3.2/elf/soinit.c 2003-08-12 09:13:34.000000000 +0200
@@ -25,7 +25,7 @@
}
#ifdef HAVE_DWARF2_UNWIND_INFO
-static char __EH_FRAME_BEGIN__[]
+const static char __EH_FRAME_BEGIN__[]
__attribute__ ((section (".eh_frame")))
= { };
# ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
and this one worked. At least it compiled without problems.
So my questions are:
- Is this really a bug in the glibc sources? Or a bug in the build process?
- Is just adding "const" in front of this line the right solution (tm)? Or did
I break something by doing this? Should I submit the above patch somewhere
else?
Many thanks in advance!!
All tools I use:
binutils 2.12.90.0.15
gcc 3.3
glibc 2.2.5 (also tried glibc 2.3.2)
Don't ask me why these versions together - there are some good reasons... :-)
--
Ciao,
Gernot Hillier
Siemens AG
CT SE 2
More information about the Libc-alpha
mailing list