Message ID | 20220831184408.2778264-6-ndesaulniers@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fix debug info for asm and DEBUG_INFO_SPLIT | expand |
On Wed, Aug 31, 2022 at 11:44:08AM -0700, Nick Desaulniers wrote: > 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 866ced950bcd ("kbuild: Support split debug info v4") > I don't think it ever needed to be. > > Link: https://lore.kernel.org/lkml/20220815013317.26121-1-dmitrii.bundin.a@gmail.com/ > Link: https://lore.kernel.org/lkml/CAK7LNARPAmsJD5XKAw7m_X2g7Fi-CAAsWDQiP7+ANBjkg7R7ng@mail.gmail.com/ > Link: https://reviews.llvm.org/D80391 > Cc: Andi Kleen <ak@linux.intel.com> > Reported-by: Dmitrii Bundin <dmitrii.bundin.a@gmail.com> > Reported-by: Fangrui Song <maskray@google.com> > Reported-by: Masahiro Yamada <masahiroy@kernel.org> > Suggested-by: Dmitrii Bundin <dmitrii.bundin.a@gmail.com> > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > Changes v1 -> v2: > * Add reference to 866ced950bcd, cc Andi, in commit message. > > scripts/Makefile.debug | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/scripts/Makefile.debug b/scripts/Makefile.debug > index 46e88f0ca998..b6eb532af3cc 100644 > --- a/scripts/Makefile.debug > +++ b/scripts/Makefile.debug > @@ -1,10 +1,8 @@ > -DEBUG_CFLAGS := > +DEBUG_CFLAGS := -g > +KBUILD_AFLAGS += -g > > ifdef CONFIG_DEBUG_INFO_SPLIT > DEBUG_CFLAGS += -gsplit-dwarf > -else > -DEBUG_CFLAGS += -g > -KBUILD_AFLAGS += -g > endif > > ifdef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT > -- > 2.37.2.672.g94769d06f0-goog >
diff --git a/scripts/Makefile.debug b/scripts/Makefile.debug index 46e88f0ca998..b6eb532af3cc 100644 --- a/scripts/Makefile.debug +++ b/scripts/Makefile.debug @@ -1,10 +1,8 @@ -DEBUG_CFLAGS := +DEBUG_CFLAGS := -g +KBUILD_AFLAGS += -g ifdef CONFIG_DEBUG_INFO_SPLIT DEBUG_CFLAGS += -gsplit-dwarf -else -DEBUG_CFLAGS += -g -KBUILD_AFLAGS += -g endif ifdef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
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 866ced950bcd ("kbuild: Support split debug info v4") I don't think it ever needed to be. Link: https://lore.kernel.org/lkml/20220815013317.26121-1-dmitrii.bundin.a@gmail.com/ Link: https://lore.kernel.org/lkml/CAK7LNARPAmsJD5XKAw7m_X2g7Fi-CAAsWDQiP7+ANBjkg7R7ng@mail.gmail.com/ Link: https://reviews.llvm.org/D80391 Cc: Andi Kleen <ak@linux.intel.com> Reported-by: Dmitrii Bundin <dmitrii.bundin.a@gmail.com> Reported-by: Fangrui Song <maskray@google.com> Reported-by: Masahiro Yamada <masahiroy@kernel.org> Suggested-by: Dmitrii Bundin <dmitrii.bundin.a@gmail.com> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> --- Changes v1 -> v2: * Add reference to 866ced950bcd, cc Andi, in commit message. scripts/Makefile.debug | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)