[fedora-arm] dietlibc port?

Gordan Bobic gordan at bobich.net
Thu Jan 6 16:17:09 UTC 2011


Hi,

I'm trying to get dietlibc to build on ARM F12, and the build fails with 
a segfault. The last bit is:

----snip----
bin-arm/diet gcc -D__dietlibc__ -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -march=armv5te -fomit-frame-pointer 
-fno-exceptions -fno-asynchronous-unwind-tables -fno-stack-protector -Os 
-g3 -Werror-implicit-function-declaration  -o bin-arm/elftrunc 
contrib/elftrunc.c
make: *** [bin-arm/elftrunc] Segmentation fault
error: Bad exit status from /var/tmp/rpm-tmp.sNdS8b (%build)
----snap----

This happens with all 0.31 and 0.32 versions of the src.rpm all the way 
back fo F9.

I tried with 0.30 going back to F5, but that seems to die with a patch 
failure.

Digging a bit more, it seems that bin-arm/diet segfaults when executed 
without any parameters, so it seems that this is the bit that 
miscompiled somewhere.

It turns out that the problem is actually to do witha GCC bug. When it 
is building bin-arm/diet with -Ox (x = {s,2,3}) , the resulting binary 
segfaults. When the binary is built with -O1 or -O0, it works fine.

There also seem to be a few other binaries produced in this package that 
have a similar problem. Thankfully, dietlibc comes with a test suite of 
it's own that showed these issues up. It makes me wonder how much of the 
rest of the distribution packages (the ones without test suites) end up 
being silently broken by GCC.

So I would like to ask how we go about doing fixes on a level as 
fundamental as the compiler on a distribution level? Do I file a bug on 
bugzilla.redhat.com against distro=F12, platform=arm, package=gcc?

Gordan


More information about the arm mailing list