Skip to content

Commit 61f2b7c

Browse files
nickdesaulniersmasahir0y
authored andcommitted
Makefile.debug: set -g unconditional on CONFIG_DEBUG_INFO_SPLIT
Dmitrii, Fangrui, and Mashahiro note: Before GCC 11 and Clang 12 -gsplit-dwarf implicitly uses -g2. Fix CONFIG_DEBUG_INFO_SPLIT for gcc-11+ & clang-12+ which now need -g specified in order for -gsplit-dwarf to work at all. -gsplit-dwarf has been mutually exclusive with -g since support for CONFIG_DEBUG_INFO_SPLIT was introduced in commit 866ced9 ("kbuild: Support split debug info v4") I don't think it ever needed to be. Link: https://lore.kernel.org/lkml/[email protected]/ Link: https://lore.kernel.org/lkml/CAK7LNARPAmsJD5XKAw7m_X2g7Fi-CAAsWDQiP7+ANBjkg7R7ng@mail.gmail.com/ Link: https://reviews.llvm.org/D80391 Cc: Andi Kleen <[email protected]> Reported-by: Dmitrii Bundin <[email protected]> Reported-by: Fangrui Song <[email protected]> Reported-by: Masahiro Yamada <[email protected]> Suggested-by: Dmitrii Bundin <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 2154aca commit 61f2b7c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scripts/Makefile.debug

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
DEBUG_CFLAGS :=
1+
DEBUG_CFLAGS := -g
22

33
ifdef CONFIG_DEBUG_INFO_SPLIT
44
DEBUG_CFLAGS += -gsplit-dwarf
5-
else
6-
DEBUG_CFLAGS += -g
75
endif
86

97
ifndef CONFIG_AS_IS_LLVM

0 commit comments

Comments
 (0)