From owner-freebsd-toolchain@FreeBSD.ORG Mon Feb 7 03:03:04 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 63A78106566B; Mon, 7 Feb 2011 03:03:04 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id F276B8FC12; Mon, 7 Feb 2011 03:03:03 +0000 (UTC) Received: by ywp6 with SMTP id 6so1651945ywp.13 for ; Sun, 06 Feb 2011 19:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:date:message-id:subject :from:to:cc:content-type; bh=xqo3p97fZ4eoBM+A9WlkzeKB2BfAM61Z4tdytuM4yUo=; b=JjgnDurQb0ApNCmbcgEBZ5SVwsIS452ap30cdx3CHtU3tpk7liUvU+LnXkPvHtzqyn oFiVXaTXkdZvLnZXatcO/j7Lh/mgQuV8CUNiEpV1u95iZ5lyqmCK7VKQHuNzmWQ12xZU umqsYGlgEKNDJIpB6uWm9x/RV3lcvA9q7pqvA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:cc :content-type; b=teh9jwQnKv5h3zZPw0E/iKlgpu7Sv2fg0aca81ta/Hq/vvz2niB1g2kcmmAhYdqZDI DctdL9rPq5X829fixGDndJ4SfT4cl8VPReXn5/+6YWzupurOcplMmRapNT1Cj53uRuHy rV9knR2Kp+yKlQ/c12YB/kywKHJuaSiLhTGwk= MIME-Version: 1.0 Received: by 10.236.105.200 with SMTP id k48mr1272529yhg.89.1297047783138; Sun, 06 Feb 2011 19:03:03 -0800 (PST) Received: by 10.236.110.52 with HTTP; Sun, 6 Feb 2011 19:03:03 -0800 (PST) Date: Sun, 6 Feb 2011 22:03:03 -0500 Message-ID: From: "b. f." To: David Schultz Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-toolchain@FreeBSD.org, gerald@FreeBSD.org Subject: Re: -fno-math-errno by default X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2011 03:03:04 -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 But if I remember correctly, you didn't add it to the default CFLAGS and FFLAGS used on FreeBSD, because you either suspected or knew that it would incur additional overhead when using the compiler and not actually needing libm. Is that the case, or should we just add it to the default flags? I did so on my system at home, but I didn't measure if there was a penalty. b.