From 1e54857bd9f5791ec1edfc5c21edb374519e9061 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 31 Dec 2020 14:31:12 -0500 Subject: [PATCH] Stop defaulting to DWRAF2 in kernel compilation After the removal of obsolete GDB 6.1.1 from the base system in 1c0ea326aa6d we no longer need to downgrade to DWARF2 debug info. We will need to ensure that our tools (e.g. ctfconvert) handle DWARF5 prior to it becoming the default in the Clang and GCC versions we use. Reported by: jhb Relnotes: Yes Sponsored by: The FreeBSD Foundation --- sys/conf/kern.mk | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index e897249c32e6..8f0163a3d0a0 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -245,17 +245,6 @@ CFLAGS+= -ftrivial-auto-var-init=pattern .endif .endif -# -# Add -gdwarf-2 when compiling -g. The default starting in clang v3.4 -# and gcc 4.8 is to generate DWARF version 4. However, our tools don't -# cope well with DWARF 4, so force it to genereate DWARF2, which they -# understand. Do this unconditionally as it is harmless when not needed, -# but critical for these newer versions. -# -.if ${CFLAGS:M-g} != "" && ${CFLAGS:M-gdwarf*} == "" -CFLAGS+= -gdwarf-2 -.endif - CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${.IMPSRC:T}} CFLAGS+= ${CWARNFLAGS.${COMPILER_TYPE}} CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC:T}}