To segfault or not to segfault..

Robert Connolly robert at
Sun Jun 18 15:14:44 PDT 2006

On June 18, 2006 05:22 pm, Kevin Day wrote:
> -ffast-math seems to be a gcc-4.1.? problem. -ffast-math is a major
> cause of segfaulting on the uClibc+gcc-4.1 system.

You can add:

%{ffast-math:%eError "Don't use -ffast-math"}

to your gcc specs under '*cc1:' and '*cc1plus:'. This will make gcc stop if 
your package used -ffast-math:

$ echo "main () {}" | gcc -x c -ffast-math -o main - ; echo $? && ls main
gcc: Error "Don't use -ffast-math"
ls: main: No such file or directory

You can hardcode CC1_SPEC in gcc/config/i386/linux.h, and CC1PLUS_SPEC in 
gcc/gcc.c (or gcc/gcc.h), if you don't want to have a specs file.


More information about the hlfs-dev mailing list