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.
This commit is contained in:
rin 2020-10-08 08:32:57 +00:00
parent 75fa0b3cd9
commit c4b815a64a
1 changed files with 10 additions and 7 deletions

View File

@ -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-error=stack-protector
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