Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src On VAX, compile gdtoa/misc.c at -O0 to avoid incorrect machi...
details: https://anonhg.NetBSD.org/src/rev/3cba6c30dd87
branches: trunk
changeset: 372523:3cba6c30dd87
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sun Dec 04 22:35:15 2022 +0000
description:
On VAX, compile gdtoa/misc.c at -O0 to avoid incorrect machine code
resulting in some doubles printing as garbage.
diffstat:
doc/HACKS | 10 +++++++++-
lib/libc/gdtoa/Makefile.inc | 9 ++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
diffs (44 lines):
diff -r f6668cb609c4 -r 3cba6c30dd87 doc/HACKS
--- a/doc/HACKS Sun Dec 04 19:01:19 2022 +0000
+++ b/doc/HACKS Sun Dec 04 22:35:15 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.231 2022/09/12 08:11:51 rin Exp $
+# $NetBSD: HACKS,v 1.232 2022/12/04 22:35:15 jakllsch Exp $
#
# This file is intended to document workarounds for currently unsolved
# (mostly) compiler bugs.
@@ -592,6 +592,14 @@
unitialized with -O1, works with -O0
kcah
+ hack gdtoa/misc.c miscompile
+ cdate Sun Dec 4 22:27:26 UTC 2022
+ who jakllsch
+ file src/lib/libc/gdtoa/Makefile.inc : 1.11
+ descr
+ some doubles print as garbage if gdtoa/misc.c isn't compiled at -O0
+ kcah
+
port arm
hack gcc-unsigned-compare
diff -r f6668cb609c4 -r 3cba6c30dd87 lib/libc/gdtoa/Makefile.inc
--- a/lib/libc/gdtoa/Makefile.inc Sun Dec 04 19:01:19 2022 +0000
+++ b/lib/libc/gdtoa/Makefile.inc Sun Dec 04 22:35:15 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2019/08/01 02:06:31 riastradh Exp $
+# $NetBSD: Makefile.inc,v 1.12 2022/12/04 22:35:15 jakllsch Exp $
# gdtoa sources
.PATH: ${.CURDIR}/gdtoa
@@ -44,3 +44,10 @@
.if ${MACHINE_ARCH} != "vax"
SRCS+= strtord.c
.endif
+
+# XXX revisit with newer GCC.
+# Ensure numbers like 0xffff319f5fa95963 print correctly
+# ("999999999999999.98", not garbage like "?A>C>@>C:BA;A><.:<")
+.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC)
+COPTS.misc.c+= -O0
+.endif
Home |
Main Index |
Thread Index |
Old Index