Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp685060pxb; Wed, 3 Feb 2021 15:20:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXVD99JFJcvMOuzEWDy02ABTFe7vRbXLuF0w/yH1X5BRd/1bgpmWkhZPZp5PEGCA1hmnyS X-Received: by 2002:a17:906:f195:: with SMTP id gs21mr5462203ejb.225.1612394458946; Wed, 03 Feb 2021 15:20:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612394458; cv=none; d=google.com; s=arc-20160816; b=Dppkhl3gqIRvhdKsb38P/OMhnI8YlHRTzpOnZme1zhtep77k3pUVz4/GG3/ZKOj+Mf v44YYEQvsGwLcihb9GEbWugMf1lLy9ldxh2QpJmSDt449bpDm91CZ2Ew79NCQZkob2jd v59JVnugUBQ2k1uwP/OdQRliH3GGptUoqHpbEcYt5wLCC5Se0+RaOp/489c2okSN8iaM /EmkOiD9Py3qYfFfCDD9AzfwIVFxKKlWM7HSmlTJiOcCPBvgNIcxDVLQFvpIrh76RzIv CrobE6BYpY5jFCREOyvTA6fu/tFXqNYlw+h9F0hYSKelW3B61p9jYjyYbjA6P8gbreSD pMNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=wll2IwjnBP1ph+olB4IOjZDnzGBUCfeA4SIYv2XGwvY=; b=AucDfMGgwYGaNtm/1KAuWI9NNfxoecEuUSQgzJYCyD4/PYn/2mDTglhqcQ3ruEwXI4 sAVnXc1tTMUticSBuadGshQ4CTkyAYA5peq8vd/YlXSaW7IZrkmuwyQKFhfXHN7M3Snz PNZ9+cFkDgW9EktrNHwJX/aiCDZ01s21GR2K8AAR3zLBVGM9bMbNmDfnpWH4xe02P6E2 xkFX/ETiYgNDpuKz9R/LBWp1lGWDE4naiuSmkTqKG5xok+gjqKjx+UJ8nnXCslahFXZc cEYJ1sWZktXRUovI8NcsM6TVW+PenG0HbczkVXXNsxqzrA6XnBUCyehUMleWrFSUsfN+ azCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=L805BloR; 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 s17si2219406edw.158.2021.02.03.15.20.34; Wed, 03 Feb 2021 15:20:58 -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=L805BloR; 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 S233213AbhBCXSG (ORCPT + 99 others); Wed, 3 Feb 2021 18:18:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233858AbhBCXRS (ORCPT ); Wed, 3 Feb 2021 18:17:18 -0500 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00D6EC061573 for ; Wed, 3 Feb 2021 15:16:38 -0800 (PST) Received: by mail-pg1-x533.google.com with SMTP id o63so810173pgo.6 for ; Wed, 03 Feb 2021 15:16:37 -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:content-transfer-encoding; bh=wll2IwjnBP1ph+olB4IOjZDnzGBUCfeA4SIYv2XGwvY=; b=L805BloRtBtPlJIIokA0buZ9FzfGZwJCsIbvjlgsLGB4UVShVw05gdvo8m41brHXWy b9SuUS8kL1Re6gQ3Et/tLjDlqUmw9hSqsUydFnf6n+SrGOzkgydTgRA1rhjC+7GmMAjN Hj3qhphMEI+bsWHlBwha58ateol6XcHO/EUBdlDD09GWSQEmehAPy/rZM3sNrIAJDQvl ugYLw4+tsXvqaEYGAlIVlzuBC+jGMHWQsd4qSqYt72VUixNO8IDG8uHjURkLFoKBZRAg wQ85GiAlF5/T3Mu6AC83aUt9QNqinr56PIJLskxDJj+Hoxx8wJCZt4x94ldlfT11IMUN D2MA== 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:content-transfer-encoding; bh=wll2IwjnBP1ph+olB4IOjZDnzGBUCfeA4SIYv2XGwvY=; b=bzbJnNBFDrd0tlOs546MryajVeNIP4QoUAGd5s9cIxkYhyok4BfvQd2l1QY3YrBT75 gXMpGtLlYVo0tja7o8WLRSpDJkz+fZ/Jo2q4qdaHQFmAA5bf2I2+7Dcy23kx2j5r6yP+ O44tsC7RU4+lGaun93q3OBan6D4AuAc+V7sBIX/LttnZrWDE5SPErGH81abRvqxcBhcB 6KXwCpkQEtkDiWwOGVI3KAqeCVQ0cYg+gnxQuyFJF8TOclAbMuz/mt80w3KN21WzqzQM AxkB0Js5r8pb1Rr89b+tucQpd0CrhdB4mvvMbqY4IIgGCLQG6xVS/FSccVDubqp5LwKv oHJA== X-Gm-Message-State: AOAM531sQtYRiml5JlYrCJNdDoRdFme1fL5lbqrRv8mVINAQFaRHIQe/ 1lNifLBA9e/nIG/C/tdJ3mv/lQ9VksMpTmVoKyTbOA== X-Received: by 2002:a62:838d:0:b029:1ba:9b85:2eac with SMTP id h135-20020a62838d0000b02901ba9b852eacmr5312098pfe.36.1612394197279; Wed, 03 Feb 2021 15:16:37 -0800 (PST) MIME-Version: 1.0 References: <20210130004401.2528717-1-ndesaulniers@google.com> <20210130004401.2528717-2-ndesaulniers@google.com> <20210130015222.GC2709570@localhost> In-Reply-To: From: Nick Desaulniers Date: Wed, 3 Feb 2021 15:16:24 -0800 Message-ID: Subject: Re: [PATCH v7 1/2] Kbuild: make DWARF version a choice To: Masahiro Yamada Cc: Nathan Chancellor , Nathan Chancellor , Andrew Morton , Sedat Dilek , Linux Kernel Mailing List , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 3, 2021 at 2:24 PM Masahiro Yamada wrote= : > > On Sat, Jan 30, 2021 at 10:52 AM Nathan Chancellor wr= ote: > > > > 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. > > > > > > Suggested-by: Arvind Sankar > > > Suggested-by: Fangrui Song > > > Suggested-by: Nathan Chancellor > > > Suggested-by: Masahiro Yamada > > > Signed-off-by: Nick Desaulniers > > > > One comment below: > > > > Reviewed-by: Nathan Chancellor > > > > > --- > > > Makefile | 5 ++--- > > > lib/Kconfig.debug | 16 +++++++++++----- > > > 2 files changed, 13 insertions(+), 8 deletions(-) > > > > > > diff --git a/Makefile b/Makefile > > > index 95ab9856f357..d2b4980807e0 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -830,9 +830,8 @@ ifneq ($(LLVM_IAS),1) > > > KBUILD_AFLAGS +=3D -Wa,-gdwarf-2 > > > > It is probably worth a comment somewhere that assembly files will still > > have DWARF v2. > > I agree. > Please noting the reason will be helpful. Via a comment in the source, or in the commit message? > > Could you summarize Jakub's comment in short? > https://patchwork.kernel.org/project/linux-kbuild/patch/20201022012106.18= 75129-1-ndesaulniers@google.com/#23727667 Via a comment in the source, or in the commit message? > One more question. > > > Can we remove -g option like follows? > > > ifdef CONFIG_DEBUG_INFO_SPLIT > DEBUG_CFLAGS +=3D -gsplit-dwarf > -else > -DEBUG_CFLAGS +=3D -g > endif > > > > > > In the current mainline code, > -g is the only debug option > if CONFIG_DEBUG_INFO_DWARF4 is disabled. > > > The GCC manual says: > https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Debugging-Options.html#Debu= gging-Options > > > -g > > Produce debugging information in the operating system=E2=80=99s > native format (stabs, COFF, XCOFF, or DWARF). > GDB can work with this debugging information. > > > Of course, we expect the -g option will produce > the debug info in the DWARF format. > > > > > > With this patch set applied, it is very explicit. > > Only the format type, but also the version. > > The compiler will be given either > -gdwarf-4 or -gdwarf-5, > making the -g option redundant, I think. Can I provide that as a separate patch? I don't want any breakage from that to delay DWARF v5 support further. If so, should it be the first patch or last? --=20 Thanks, ~Nick Desaulniers