git: 1e54857bd9f5 - main - Stop defaulting to DWRAF2 in kernel compilation

Ed Maste emaste at FreeBSD.org
Thu Dec 31 20:56:59 UTC 2020


The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=1e54857bd9f5791ec1edfc5c21edb374519e9061

commit 1e54857bd9f5791ec1edfc5c21edb374519e9061
Author:     Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2020-12-31 19:31:12 +0000
Commit:     Ed Maste <emaste at FreeBSD.org>
CommitDate: 2020-12-31 20:56:18 +0000

    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}}


More information about the dev-commits-src-main mailing list