more on ffast-math and gcc-4.1.1 (and finally fixed)

Robert Connolly robert at linuxfromscratch.org
Sun Aug 20 17:04:42 PDT 2006


I still can't get uClibc working with gcc-4.1.1. Everything linked to uClibc 
crashes, including main(){}. I used the patches below, along with patches 
from uClibc.org (buildroot). I also tried building with -Os and -O2.

robert

On Tuesday 08 August 2006 02:03, Kevin Day wrote:
> After boot-strapping my system for a few weeks, and cleaning every
> error that pops-up, I am now getting something more useful error
> messages with my ffast-math problems.
>
> /bin/ld: crtfastmath.o: No such file: No such file or directory
>
> crtfastmath pulled more results than -ffast-math on both bugzilla for
> gcc and google.com/linux.
> I ended up at the following sites (one way or another):
>
> http://www.netdomination.org/~stkn/index.php?/archives/24-Anatomy-of-a-segf
>ault....html http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28621
> http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01179.html
> http://gcc.gnu.org/ml/gcc/2005-08/msg00281.html
> http://gcc.gnu.org/ml/gcc/2005-08/msg00282.html
> http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01073.html
>
> 1) -Os is note passed to/by uClibc thanks to hlfs's sed command that
> removes this.
> 2) in gcc/config/i386/t-crtfm, i found that -msse is passed, so
> targets that do not support sse will have problems with ffast-math
> 3) I added i386/t-crtfm to the gcc/config.gcc file where uclibc
> support is added by the gcc-4.1.1-uclibc patch
>
> 4) Now the -ffast-math links once again and suddenly the apps segfault
> again. (echo 'int main(){}' >> test.c && gcc test.c -ffast-math && ./a.out)
> == segfault
>
> 5) I apply the patch: gcc-crt-align-1.patch, which I will have
> rediffed and labeled appropriately for HLFS and supplied with this
> e-mail and segfault no more!! (with additional patch by Lu, Hongjiu
> from intel).
>
> 6) I also have my fix for making sure crtfastmath.o gets compiled and
> installed. It looks like glibc should be unaffected by this problem,
> but the uClibc patch overlooks this and a rediff has been made and
> supplied.
> I have yet to switch to the new development version of HLFS, so the
> uClibc_conf-2 patch may not be needed for the new HLFS dev.
>
> 7) Now all I have to do is get the -ffast-math calls back into my
> system and see if things that should be noticably effected improve.
> (most specifically, MESA!!).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20060820/7e0fcd48/attachment.sig>


More information about the hlfs-dev mailing list