summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2003-06-06 03:09:17 +0000
committerwtc%netscape.com <devnull@localhost>2003-06-06 03:09:17 +0000
commit4cc1e6c7c6033c985d7981105ae4c849af8dde4a (patch)
tree2afa02ae56b223b08bba2327b9e3a66df85a701e
parentf6ff609ca48b1d19305aba22d21dda3b05e3927c (diff)
downloadnspr-hg-4cc1e6c7c6033c985d7981105ae4c849af8dde4a.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. Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-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.
#