From 6f00f42ab62c063f484054f12dece8fbe7bbc8dc Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sun, 29 Mar 2020 23:59:14 +0000 Subject: [PATCH] gdb: compile with -fcommon explicitly As described in the comment, gdb relies on some of the linker magic that happens with -fcommon. I suspect the life expectancy of gdb-in-base is low enough that this isn't worth spending much time addressing, especially given the vintage. Hit it with the -fcommon hammer so that it continues to just work. MFC after: 3 days --- gnu/usr.bin/gdb/Makefile.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/usr.bin/gdb/Makefile.inc b/gnu/usr.bin/gdb/Makefile.inc index f7dd8452abad..68e7a6c3b986 100644 --- a/gnu/usr.bin/gdb/Makefile.inc +++ b/gnu/usr.bin/gdb/Makefile.inc @@ -47,6 +47,11 @@ CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit +# Some bits here currently rely on some of the linker-merging magic that happens +# with -fcommon. While this is the default right now, explicitly set -fcommon +# so that it continues to build when the default flips. +CFLAGS+= -fcommon + GENSRCS+= nm.h tm.h .if defined(GDB_CROSS_DEBUGGER)