summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2003-06-06 03:10:18 +0000
committerwtc%netscape.com <devnull@localhost>2003-06-06 03:10:18 +0000
commit858074eb6d651b40ee7bbd93d1b24045e36e692e (patch)
tree3eafd7d45cd47673a34e405d7119f7e8964f7097
parent8114e7909e6f7d617d9193413380182636feb8ea (diff)
downloadnspr-hg-858074eb6d651b40ee7bbd93d1b24045e36e692e.tar.gz
Bug 207421: use /Op to disable some floating-point optimizations of MSVC
6.0 Processor Pack because they make the floating-point calculations in prdtoa.c produce incorrect results. r=cls.
-rw-r--r--pr/src/misc/Makefile.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/pr/src/misc/Makefile.in b/pr/src/misc/Makefile.in
index 5949d507..afc4b631 100644
--- a/pr/src/misc/Makefile.in
+++ b/pr/src/misc/Makefile.in
@@ -82,6 +82,16 @@ RELEASE_BINS = $(srcdir)/compile-et.pl $(srcdir)/prerr.properties
include $(topsrcdir)/config/rules.mk
+# Prevent floating point errors caused by MSVC 6.0 Processor Pack
+# optimizations (bug 207421). This disables optimizations that
+# could change the precision of floating-point calculations for
+# this single compilation unit.
+ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
+$(OBJDIR)/prdtoa.$(OBJ_SUFFIX): prdtoa.c
+ @$(MAKE_OBJDIR)
+ $(CC) -Fo$@ -c $(CFLAGS) -Op $(call abspath,$<)
+endif
+
#
# Generate prerr.h, prerr.c, and prerr.properties from prerr.et.
#