From owner-freebsd-toolchain@FreeBSD.ORG Sun Feb 6 22:30:03 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F2051065674 for ; Sun, 6 Feb 2011 22:30:03 +0000 (UTC) (envelope-from das@freebsd.org) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 083138FC18 for ; Sun, 6 Feb 2011 22:30:02 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.4/8.14.2) with ESMTP id p16MDZdk077016; Sun, 6 Feb 2011 17:13:35 -0500 (EST) (envelope-from das@freebsd.org) Received: (from das@localhost) by zim.MIT.EDU (8.14.4/8.14.2/Submit) id p16MDZJx077015; Sun, 6 Feb 2011 17:13:35 -0500 (EST) (envelope-from das@freebsd.org) Date: Sun, 6 Feb 2011 17:13:35 -0500 From: David Schultz To: Gerald Pfeifer Message-ID: <20110206221335.GA76984@zim.MIT.EDU> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: "Pedro F. Giffuni" , freebsd-toolchain@freebsd.org Subject: Re: -fno-math-errno by default X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2011 22:30:03 -0000 On Sun, Feb 06, 2011, Gerald Pfeifer wrote: > Pedro kindly made me aware of > > http://svn.freebsd.org/viewvc/base?view=revision&revision=181538 > > where David made -fno-math-errno the default for GCC with the following > background: > > Our libm doesn't support the SysV mistake of setting errno, and never > has. This will need to be fixed upstream in a more generic way, but > the changes are somewhat more involved. > > Do I understand correctly that libm on all versions of FreeBSD and on > all platforms does not set errno, so this should become the default for > FreeBSD also upstream? That is correct. Basically nobody sets errno in the math library anymore, except for compatibility with old apps written for the System V math library. BSD never has and never will. IEEE 754 floating point exception flags are much saner and faster. > It would have been nice to report this upstream (and apologies if you > did and it got missed) and I'll try to raise it there, but wanted to > get confirmation first. I submitted a change request to gcc about 2.5 years ago: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37073