Description of problem:
gcc -I. -isystem include -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -fPIC -D__DYN_LIB -D__DYN_\
LIB_SHARED -c dyn_start.c -o pic-i386/dyn_so_start.o
dyn_start.c:42: internal compiler error: in named_section_real, at varasm.c:427
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccKH6esy.out file, please attach this to your bugreport.
make: *** [pic-i386/dyn_so_start.o] Error 1
Version-Release number of selected component (if applicable):
Created attachment 114766 [details]
preprocessed source file
Apparently dietlibc is buggy, doesn't take into account that .eh_frame
section in more recent toolchains is read-only.
gcc's crtstuff.c from which apparently dietlibc was once copied uses
macro for this, plus autoconf magic.
Plus you should certainly make sure dyn_start.c is compiled with -fno-exceptions,
as otherwise it is broken (otherwise __EH_FRAME_BEGIN__ very well might not be
the beginning of .eh_frame).
It is true that GCC should not ICE on any bad input, but this one is so special
case that I don't think it needs any changes.