From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32D23C433DB for ; Thu, 4 Feb 2021 19:58:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0325E64F45 for ; Thu, 4 Feb 2021 19:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239882AbhBDT5w convert rfc822-to-8bit (ORCPT ); Thu, 4 Feb 2021 14:57:52 -0500 Received: from wildebeest.demon.nl ([212.238.236.112]:37446 "EHLO gnu.wildebeest.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239790AbhBDT46 (ORCPT ); Thu, 4 Feb 2021 14:56:58 -0500 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id DA19930278CD; Thu, 4 Feb 2021 20:56:05 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 880BF40C9DA3; Thu, 4 Feb 2021 20:56:05 +0100 (CET) Message-ID: <20fdd20fe067dba00b349407c4a0128c97c1a707.camel@klomp.org> Subject: Re: [PATCH v7 1/2] Kbuild: make DWARF version a choice From: Mark Wielaard To: Nick Desaulniers Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , Sedat Dilek , LKML , clang-built-linux , Linux Kbuild mailing list , linux-arch , Jakub Jelinek , Fangrui Song , Caroline Tice , Nick Clifton , Yonghong Song , Jiri Olsa , Andrii Nakryiko , Arnaldo Carvalho de Melo , Arvind Sankar , Nathan Chancellor Date: Thu, 04 Feb 2021 20:56:05 +0100 In-Reply-To: References: <20210130004401.2528717-1-ndesaulniers@google.com> <20210130004401.2528717-2-ndesaulniers@google.com> <20210204103946.GA14802@wildebeest.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Thu, 2021-02-04 at 11:18 -0800, Nick Desaulniers wrote: > On Thu, Feb 4, 2021 at 2:41 AM Mark Wielaard wrote: > > 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@mail.gmail.com/ > """ > 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 agree with Jakub. Now that GCC has defaulted to DWARF5 all the tools have adopted to the new default version. And DWARF5 has been out for more than 4 years already. It isn't unreasonable to assume that people using GCC11 will also be using the rest of the toolchain that has moved on. Which DWARF consumers are you concerned about not being ready for GCC defaulting to DWARF5 once GCC11 is released? Thanks, Mark