Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2073133pxb; Fri, 29 Jan 2021 12:22:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo4vH25WRmjv6uU1XMkX9ORG3qCgYiCYwRTvpqse/iZGRNgLFU2O621RBrR9voZzEt0KOG X-Received: by 2002:aa7:c895:: with SMTP id p21mr7176930eds.165.1611951731017; Fri, 29 Jan 2021 12:22:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611951731; cv=none; d=google.com; s=arc-20160816; b=lk+vK5Qi2fq/eeabz6GnX6It79lw4qzK1/Hr68tFeIJuETN5K+eOo1SBJGzLDfErcO n2JTaff9onLJze9++GDiam/AcVNqpcJ3pxBA/uZrYR9n6SdTXWFcjUN4K343XA1ek+mx nXQYu5V/bvxD0pQMDdLlsyahu194tAQYCnTT2dxkR+TWtIG4NUa+0drajIiGTx7Iu4zy eA+3LfOThY13v0bp33PJTimyfATBeT+d72UQ6dQ9EJdl+5BF55EyY0l5vUL/8bUtQitx Q+Cv/jejvicC0N+UrEkelkyttPZhG74/q9nXXJ20xFAl4UrCbcZW/vf3ONncM6QDrH2j Y0KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=x8T48UJksYBBzMUWKPVavtIXowDuSQOy7SfNWHvVKVo=; b=P3CMrXZ0HNfNvrFEtPIsMCOvOy6xjIuGzmoii9bEC36kKVEhnS5XvxVurKR0ZEd6Wo WMD9qMjzoy6fpo9H5jHDGRURE9z5nlDIjo1WT6Mx3FJaJsEw+WRC+YM1/kCgP4ahr4Bh n9cANX3e2cxMGKWWMBXJv7b53HKXu8BUP2fJ9cFZrmbtHxEg4wbEFkIfTroQhR/AXcal tayU8Uj9M8f1/SGa5JWSxaq67PNAO+2VSpCYlOfLjZpnAHmHqX3AXI3f/6KMzNTW4ZpD uHgHLBlZCk9fpE6Fz1gVwxw/HoHZab3T15sy1uHhIU4FNvNRqG3IGowgcTMICcj6Zr++ tKOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rNZQoLZg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si6634655edy.455.2021.01.29.12.21.46; Fri, 29 Jan 2021 12:22:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rNZQoLZg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232847AbhA2UUq (ORCPT + 99 others); Fri, 29 Jan 2021 15:20:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232839AbhA2UUi (ORCPT ); Fri, 29 Jan 2021 15:20:38 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECD42C061574 for ; Fri, 29 Jan 2021 12:19:57 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id u67so6939852pfb.3 for ; Fri, 29 Jan 2021 12:19:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x8T48UJksYBBzMUWKPVavtIXowDuSQOy7SfNWHvVKVo=; b=rNZQoLZgqE0y69Li1l9Ns6pAG71/9Vpr2jQBKDj+iVJrGNZ66h2BkLJSEKvrHUcucT FYVnSnxHWQfGdMlFn4O5eNNc3pIW+YDU27bs1bD0JUmy1yh+ekBWPtAdyRIuiK9aYtUs r3SDaxrzKlFYOaaa/vwTAHvAtZznSxRSAFPXyzE5SyfOzDEdCsMTIwmlTfGYO9nx1LwQ 3gFOCsTL3yLPWD+Eb0Ik7w7f/RtHe6vuODnrOuwpaWVZjQkJ6CoDoogdQ1Rn2kz8oqXI 8e5IDV378RXcG8fMb0dGjkOhH5q0y3oo2FnihqLxOXivb4qTVOL7EPLOTBjCsiVMiTgd nipQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x8T48UJksYBBzMUWKPVavtIXowDuSQOy7SfNWHvVKVo=; b=NOZ23cqtyt8HwR2WJPtY+fe5iJoXWAZ08TyHt3f+Xl9ZD1YTqCqTIHpdPM0J7X+kwO e+zQRSX0DzT58zTfv7lusx8129jLSwXMnPGg+fedF1hgWVUn9rt+wRb1zv5HDQilvsPb /AR+IKaWhUZ84Gtbqo4yiuUjH8EU3x1RtbEoLYC5CcR9MRjDX+alU0/fXbFTVmZjB3Y6 orBQf3luyDDwYIP0WTlQf16GEjDHi5Mu/wYgSESkew5q8Y6O5cBGeyM006qPvsD6agn9 0P499cWnn46SVV/aRkxhj0zUte/NUzq3x7XSrmYIKpvesGjMJbx7uI2OKJ9nf5O+x8Kr Qdcg== X-Gm-Message-State: AOAM532AWxiRCIIvMB6qxrwXJ/EqeZfOW6ti2F+8fLoxyTULiaXWw7H1 boBWnXyIFFUuMcG+j81710h60z+XRBRNBjm3rqJ5Kg== X-Received: by 2002:a63:9044:: with SMTP id a65mr111512pge.381.1611951596804; Fri, 29 Jan 2021 12:19:56 -0800 (PST) MIME-Version: 1.0 References: <20210129194318.2125748-1-ndesaulniers@google.com> <20210129194318.2125748-2-ndesaulniers@google.com> <20210129201712.GQ4020736@tucnak> In-Reply-To: <20210129201712.GQ4020736@tucnak> From: Nick Desaulniers Date: Fri, 29 Jan 2021 12:19:46 -0800 Message-ID: Subject: Re: [PATCH v6 1/2] Kbuild: make DWARF version a choice To: Jakub Jelinek Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , Sedat Dilek , LKML , clang-built-linux , Linux Kbuild mailing list , linux-arch , Fangrui Song , Caroline Tice , Nick Clifton , Yonghong Song , Jiri Olsa , Andrii Nakryiko , Arnaldo Carvalho de Melo , Arvind Sankar , Nathan Chancellor Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2021 at 12:17 PM Jakub Jelinek wrote: > > On Fri, Jan 29, 2021 at 11:43:17AM -0800, Nick Desaulniers wrote: > > Modifies CONFIG_DEBUG_INFO_DWARF4 to be a member of a choice. Adds an > > explicit CONFIG_DEBUG_INFO_DWARF2, which is the default. Does so in a > > way that's forward compatible with existing configs, and makes adding > > future versions more straightforward. > > > > Suggested-by: Arvind Sankar > > Suggested-by: Fangrui Song > > Suggested-by: Nathan Chancellor > > Suggested-by: Masahiro Yamada > > Signed-off-by: Nick Desaulniers > > --- > > Makefile | 6 +++--- > > lib/Kconfig.debug | 21 ++++++++++++++++----- > > 2 files changed, 19 insertions(+), 8 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index 95ab9856f357..20141cd9319e 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -830,9 +830,9 @@ ifneq ($(LLVM_IAS),1) > > KBUILD_AFLAGS += -Wa,-gdwarf-2 > > endif > > > > -ifdef CONFIG_DEBUG_INFO_DWARF4 > > -DEBUG_CFLAGS += -gdwarf-4 > > -endif > > +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF2) := 2 > > +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4 > > +DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y) > > Why do you make DWARF2 the default? That seems a big step back from what > the Makefile used to do before, where it defaulted to whatever DWARF version > the compiler defaulted to? > E.g. GCC 4.8 up to 10 defaults to -gdwarf-4 and GCC 11 will default to > -gdwarf-5. > DWARF2 is more than 27 years old standard, DWARF3 15 years old, > DWARF4 over 10 years old and DWARF5 almost 4 years old... > It is true that some tools aren't DWARF5 ready at this point, but with GCC > defaulting to that it will change quickly, but at least DWARF4 support has > been around for years. I agree with you; I also do not want to change the existing defaults in this series. That is a separate issue to address. -- Thanks, ~Nick Desaulniers