Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libm Default our libm to -frounding-math, if built with ...



details:   https://anonhg.NetBSD.org/src/rev/ff51aac4f9c2
branches:  trunk
changeset: 997101:ff51aac4f9c2
user:      maya <maya%NetBSD.org@localhost>
date:      Fri Feb 22 18:17:22 2019 +0000

description:
Default our libm to -frounding-math, if built with GCC.

The long-standing GCC default is to not respect rounding mode.
it looks like GCC 7 optimizes rint to a builtin, causing our few
rounding mode tests to fail.

Fixes PR port-amd64/54000: FP tests failing on amd64 since gcc7 import

diffstat:

 lib/libm/Makefile |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 84c550122139 -r ff51aac4f9c2 lib/libm/Makefile
--- a/lib/libm/Makefile Fri Feb 22 12:24:34 2019 +0000
+++ b/lib/libm/Makefile Fri Feb 22 18:17:22 2019 +0000
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.205 2018/11/07 04:00:12 riastradh Exp $
+#  $NetBSD: Makefile,v 1.206 2019/02/22 18:17:22 maya Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -14,6 +14,7 @@
 #
 
 NOSANITIZER=           # defined
+COPTS+=                        ${${ACTIVE_CC} == "gcc":? -frounding-math :}
 
 #
 # There are two options in making libm at fdlibm compile time:



Home | Main Index | Thread Index | Old Index