-mno-fancy-math-387 disables generation of fsqrt, fsin, and several other instructions. It was needed long ago when FreeBSD supported FPUless 80386 and 80486 systems via a partial in-kernel emulator that couldn't cope with these instructions. Support for FPUless x86 machines was dropped many years ago, and the emulator is gone, so -mfancy-math-387 should be the default for FreeBSD. http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/gcc/config/i386/freebsd.h.diff?r1=1.75;r2=1.76
Patches goto gcc-patches@gcc.gnu.org with a changelog.
Thanks for reporting this, David, and I'm sorry that nobody analyzed this before. I cannot find a bit like this in the GCC sources and a bit of digging reveals Revision 1.35: Thu Mar 23 10:18:25 2000 UTC (10 years, 10 months ago) by obrien Branches: MAIN Changes since revision 1.34: +545 -382 lines Clean up the FreeBSD configuration files -- includes removing the usage of svr4.h on the i386, and moving all the shared arch neutral bits into the FreeBSD general config header. http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/gcc/config/i386/freebsd.h.diff?r1=1.34;r2=1.35;f=h as the point where this was introduced into the FreeBSD system compiler. I believe there is no action to be taken on the upstream GCC side. If I am wrong or missing something, please let me know and I'll do my best to help address this!
Author: gerald Date: Fri Jul 3 01:35:18 2015 New Revision: 225367 URL: https://gcc.gnu.org/viewcvs?rev=225367&root=gcc&view=rev Log: PR target/37072 * doc/invoke.texi (i386 and x86-64 Options): -mno-fancy-math-387 is not actually the default on FreeBSD. Modified: trunk/gcc/ChangeLog trunk/gcc/doc/invoke.texi
Author: gerald Date: Fri Jul 3 09:33:17 2015 New Revision: 225370 URL: https://gcc.gnu.org/viewcvs?rev=225370&root=gcc&view=rev Log: PR target/37072 * doc/invoke.texi (i386 and x86-64 Options): -mno-fancy-math-387 is not actually the default on FreeBSD. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/doc/invoke.texi