Re: [PATCH v7 1/2] Kbuild: make DWARF version a choice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 4, 2021 at 2:41 AM Mark Wielaard <mark@xxxxxxxxx> wrote:
>
> Hi Nick,
>
> On Fri, Jan 29, 2021 at 04:44:00PM -0800, Nick Desaulniers wrote:
> > Modifies CONFIG_DEBUG_INFO_DWARF4 to be a member of a choice which is
> > the default. Does so in a way that's forward compatible with existing
> > configs, and makes adding future versions more straightforward.
> >
> > GCC since ~4.8 has defaulted to this DWARF version implicitly.
>
> And since GCC 11 it defaults to DWARF version 5.
>
> It would be better to set the default to the DWARF version that the
> compiler generates. So if the user doesn't select any version then it
> should default to just -g (or -gdwarf).

I disagree.

https://lore.kernel.org/lkml/CAKwvOdk0zxewEOaFuqK0aSMz3vKNzDOgmez=-Dae4+bodsSg5w@xxxxxxxxxxxxxx/
"""
I agree that this patch takes away the compiler vendor's choice as to
what the implicit default choice is for dwarf version for the kernel.
(We, the Linux kernel, do so already for implicit default -std=gnuc*
as well). ...
But I'm
going to suggest we follow the Zen of Python: explicit is better than
implicit.
"""
We have a number of in tree and out of tree DWARF consumers that
aren't ready for DWARF v5.  Kernel developers need a way to disable
DWARF v5 until their dependencies are deployed or more widely
available.

I'm happy to consider eventually moving the default DWARF version for
the kernel to v5, and ideas for how to wean developers off of v4, but
I don't think forcing v5 on kernel developers right now is the most
delicate approach.
-- 
Thanks,
~Nick Desaulniers



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux