Bug 37072 - -mfancy-math-387 should be the default in FreeBSD
Summary: -mfancy-math-387 should be the default in FreeBSD
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.1
: P3 enhancement
Target Milestone: ---
Assignee: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-10 19:04 UTC by David Schultz
Modified: 2023-12-29 11:13 UTC (History)
3 users (show)

See Also:
Host: amd64-undermydesk-freebsd
Target: i386-undermydesk-freebsd
Build: amd64-undermydesk-freebsd
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Schultz 2008-08-10 19:04:17 UTC
-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
Comment 1 Andrew Pinski 2008-08-10 19:57:03 UTC
Patches goto gcc-patches@gcc.gnu.org with a changelog.
Comment 2 Gerald Pfeifer 2011-02-16 00:23:00 UTC
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!
Comment 3 gerald@gcc.gnu.org 2015-07-03 01:35:50 UTC
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
Comment 4 gerald@gcc.gnu.org 2015-07-03 09:33:49 UTC
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