From my tests, -ffast-math affects only targets with a 68881 or compatible (like our -m68020-60). GCC has support for that, it knows which math functions are directly implemented in the FPU. When a program uses sqrt(), GCC simply generates the equivalent FPU instruction instead of calling the function from libm.
Hm, this is really strange then. So I use -m68060 and gcc will use emulated instructions with -ffast-math?
Btw I'd be very interested to know to what situations this -m68060 option applies, i.e. where is an option to branch according to -m68020-60 and -m68060. I can think of 64-bit division and maybe movep (not supported on 68060) while generating code (i.e. internal routines in libgcc will be used instead) and then? Unless -ffast-math is used, everything is handled in libm (including inlining) and if it is used... shouldn't gcc respect other CPU options?
And btw #2, we've discussed this on ACP forum but it might be of interest to others too: while looking into gcc manual pages, it states __HAVE_68881__ is defined only for -mhard-float and -m68881, i.e. mint target is wrong here ! (-m68060 defines it, too, probably because of multilib configuration -m68020-60 ~ -m68060?)
--