Module Name:    src
Committed By:   drochner
Date:           Tue Aug 10 17:53:08 UTC 2010

Modified Files:
        src/lib/libm: Makefile

Log Message:
two disgusting hacks:
-mk/bsd.lib.mk picks up a .S asm file behind our back (did it do so
 always?). s_modf.S is incorrect; I'm undecided whether it makes sense
 to fix it, so add a stupid rule to enforce the .c file to be used.
-on i386, s_tanh.c gets miscompiled. It works with -O0, so add
 COPTS for exactly that file.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 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.96 src/lib/libm/Makefile:1.97
--- src/lib/libm/Makefile:1.96	Sat Aug  7 18:12:46 2010
+++ src/lib/libm/Makefile	Tue Aug 10 17:53:08 2010
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.96 2010/08/07 18:12:46 wiz Exp $
+#  $NetBSD: Makefile,v 1.97 2010/08/10 17:53:08 drochner Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -66,6 +66,8 @@
 	    s_ilogbf.S s_log1p.S s_log1pf.S s_logb.S s_logbf.S s_rint.S \
 	    s_rintf.S s_scalbn.S s_scalbnf.S s_significand.S \
 	    s_significandf.S s_sin.S s_sinf.S s_tan.S s_tanf.S lrint.S
+# do not pick up the i387 asm version, it is incorrect
+s_modf.o s_modf.pico s_modf.po s_modf.d: s_modf.c
 
 .if (${MACHINE_ARCH} == "i386")
 SUBDIR=arch/i387
@@ -189,6 +191,11 @@
 	n_support.S
 .endif
 
+.if (${MACHINE_ARCH} == "i386")
+# XXX this gets miscompiled. There should be a better fix.
+COPTS.s_tanh.c+= -O0
+.endif
+
 MAN+=	acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \
 	cos.3 cosh.3 erf.3 exp.3 fabs.3 floor.3 fmod.3 frexp.3 hypot.3 ieee.3 \
 	ieee_test.3 isinff.3 j0.3 ldexp.3 lgamma.3 lrint.3 \

Reply via email to