Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src PR toolchain/55837



details:   https://anonhg.NetBSD.org/src/rev/7ddbbef2146d
branches:  trunk
changeset: 983653:7ddbbef2146d
user:      rin <rin%NetBSD.org@localhost>
date:      Mon May 31 22:33:19 2021 +0000

description:
PR toolchain/55837

Get rid of -O0 hack for GDB for hard-float arm. This was necessary because
libunwind did not support s0-s31. Note that for *most* cases (not all!),
-O0 stops using VFP registers for general purposes.

Also note that this hack was incomplete. We had to compile every functions
with -O0, that can be unwinded. Otherwise, GDB crashed every time exceptions
were raised.

diffstat:

 doc/HACKS                                 |  15 +--------------
 external/gpl3/gdb.old/lib/libgdb/Makefile |  12 +-----------
 external/gpl3/gdb/lib/libgdb/Makefile     |  13 +------------
 3 files changed, 3 insertions(+), 37 deletions(-)

diffs (82 lines):

diff -r 6a4e33fa2f7d -r 7ddbbef2146d doc/HACKS
--- a/doc/HACKS Mon May 31 21:45:41 2021 +0000
+++ b/doc/HACKS Mon May 31 22:33:19 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.217 2021/05/08 12:27:21 christos Exp $
+# $NetBSD: HACKS,v 1.218 2021/05/31 22:33:19 rin Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -975,19 +975,6 @@
        function "__int64_t llvm::MachineFrameInfo::getObjectOffset(int) const"
 kcah
 
-port   arm
-hack   compile gdb/dwarf2{expr,loc}.c with -O0 for GCC[89] (PR/54820, 54877)
-cdate  Wed Apr 29 11:04:58 UTC 2020
-mdate  Thu Oct  8 17:00:00 JST 2020
-who    rin
-file   src/external/gpl3/gdb/lib/libgdb/Makefile: 1.22
-descr  For earmv7hf{,eb}, GCC 8.4 and 9.3 miscompile dwarf2expr.c with -O[21].
-       For earmv5hf{,eb}, GCC 9.3 miscompiles dwarf2{expr,loc}.c with -O2
-       (GCC9 -O1 and GCC8 -O2 work fine). These result in GDB crash with
-       ``gdb_exception_RETURN_MASK_ERROR''. For everyone's safety, compile
-       these files with -O0 for all arm variants with GCC >= 8.
-kcah
-
 port   m68k
 hack   compile aes_ccm_tag() with -O0 for GCC8 and GCC9
 cdate  Mon Aug 10 06:27:29 UTC 2020
diff -r 6a4e33fa2f7d -r 7ddbbef2146d external/gpl3/gdb.old/lib/libgdb/Makefile
--- a/external/gpl3/gdb.old/lib/libgdb/Makefile Mon May 31 21:45:41 2021 +0000
+++ b/external/gpl3/gdb.old/lib/libgdb/Makefile Mon May 31 22:33:19 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.12 2021/05/07 12:19:48 rin Exp $
+#      $NetBSD: Makefile,v 1.13 2021/05/31 22:33:19 rin Exp $
 
 NOCTF=
 HOSTPROG_CXX=   1
@@ -54,16 +54,6 @@
 
 ada-exp.c: ada-lex.c
 
-.if ${MACHINE_CPU} == "arm"
-. if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8
-# GCC 8.4/9.3 miscompile this with -O[21] for earmv7hf{,eb}.
-# GCC 9.3 miscompile this with -O2 for earmv5hf{,eb}.
-COPTS.dwarf2expr.c+=   -O0
-# GCC 9.3 miscompile this with -O2 for earmv5hf{,eb}.
-COPTS.dwarf2loc.c+=    -O0
-. endif
-.endif
-
 # These are generated by implicit rules and are not easy to generate
 CLEANDIRFILES+= \
        ada-exp.c ada-lex.c \
diff -r 6a4e33fa2f7d -r 7ddbbef2146d external/gpl3/gdb/lib/libgdb/Makefile
--- a/external/gpl3/gdb/lib/libgdb/Makefile     Mon May 31 21:45:41 2021 +0000
+++ b/external/gpl3/gdb/lib/libgdb/Makefile     Mon May 31 22:33:19 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.30 2021/05/30 02:23:25 joerg Exp $
+#      $NetBSD: Makefile,v 1.31 2021/05/31 22:33:19 rin Exp $
 
 NOCTF=
 HOSTPROG_CXX=   1
@@ -59,17 +59,6 @@
 
 ada-exp.c: ada-lex.c
 
-.if ${MACHINE_CPU} == "arm"
-. if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8
-# XXX taken from GDB 8.3; not tested for GDB 11:
-# GCC 8.4/9.3 miscompile this with -O[21] for earmv7hf{,eb}.
-# GCC 9.3 miscompile this with -O2 for earmv5hf{,eb}.
-COPTS.expr.c+= -O0
-# GCC 9.3 miscompile this with -O2 for earmv5hf{,eb}.
-COPTS.loc.c+=  -O0
-. endif
-.endif
-
 .if ${MACHINE} == "vax"
 . if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8
 COPTS.read.c+= -O0



Home | Main Index | Thread Index | Old Index