Module Name:    src
Committed By:   maya
Date:           Fri Feb 22 18:17:23 UTC 2019

Modified Files:
        src/lib/libm: Makefile

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/lib/libm/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.205 src/lib/libm/Makefile:1.206
--- src/lib/libm/Makefile:1.205	Wed Nov  7 04:00:12 2018
+++ src/lib/libm/Makefile	Fri Feb 22 18:17:22 2019
@@ -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:

Reply via email to