Module Name:    src
Committed By:   rin
Date:           Thu Oct  8 08:32:57 UTC 2020

Modified Files:
        src/external/gpl3/gdb/lib/libgdb: Makefile

Log Message:
Apply hack for GDB 8.3 on arm to GDB 11.

XXX
Not tested as GDB 11 does not build for arm at the moment.

Note that dist/gdb/dwarf2foo.c was renamed to dist/gdb/dwarf2/foo.c.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/external/gpl3/gdb/lib/libgdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/lib/libgdb/Makefile
diff -u src/external/gpl3/gdb/lib/libgdb/Makefile:1.27 src/external/gpl3/gdb/lib/libgdb/Makefile:1.28
--- src/external/gpl3/gdb/lib/libgdb/Makefile:1.27	Thu Sep 17 16:36:38 2020
+++ src/external/gpl3/gdb/lib/libgdb/Makefile	Thu Oct  8 08:32:57 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.27 2020/09/17 16:36:38 christos Exp $
+#	$NetBSD: Makefile,v 1.28 2020/10/08 08:32:57 rin Exp $
 
 NOCTF=
 HOSTPROG_CXX=   1
@@ -59,12 +59,15 @@ CFLAGS:=		${CXXFLAGS} -std=gnu++11 -Wno-
 
 ada-exp.c: ada-lex.c
 
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc"
-.if !empty(MACHINE_ARCH:Mearmv7hf*)
-# GCC 8.4 miscompiles this with -O2 or -O1 for earmv7hf{,eb}.
-# Neither earmv6hf{,eb} nor earmv7{,eb} are affected.
-COPTS.dwarf2expr.c+=-O0
-.endif
+.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
 
 # These are generated by implicit rules and are not easy to generate

Reply via email to