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

Kevin Day thekevinday at gmail.com
Mon Aug 7 23:03:49 PDT 2006


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-segfault....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!!).

-- 
Kevin Day
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-4.1.1-fix_fastmath-1.patch
Type: application/octet-stream
Size: 1764 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20060808/cfc62d41/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-4.1.1-uClibc_conf-2.patch
Type: application/octet-stream
Size: 3423 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20060808/cfc62d41/attachment-0001.obj>


More information about the hlfs-dev mailing list