Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp312893pxb; Fri, 15 Jan 2021 13:53:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAREU9bOmJ9NuOE5dPFruwdbIeLoHyemXKfDh0Rios+xo5qv4RcS0wslKamFnWDEZx3Asm X-Received: by 2002:a17:906:d98:: with SMTP id m24mr6441299eji.428.1610747621720; Fri, 15 Jan 2021 13:53:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610747621; cv=none; d=google.com; s=arc-20160816; b=venHFG4v/OFR9RX2RdA3m+1XzZkz7NIE+ozei8QzTiP6t2L2D1i+y2wF53fFMpjYSZ EOqcOpTfPnMOvbRM6kLSEVt80gMAqd3W6bLjg19beEobGr5DAK7qg40mqDVZFzObanVz grfHhOYhWI3lSwryJ+A7si/iBvmJd1cDdxgWUV3rilcvlUmUwNhpdCgGR7kJPKa4FbPb jYJ9VSwPyDNe/dBT8pFArv+ujwnfq6K2j4iPEZy2DCGzlpH91OqedP0+UxkFSce4ymRw Z1NsttqY94OC3SWgMIDAXcDWimyqeOTcOGgX6EAtU9YgcREaY2zGSlzFRlJpjpPzJajP 0Tjw== 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=bDXCYaPPP0GIkxQ0+LDG4H4iGHCT3lB0lv11EmEvqJo=; b=gRaaz0GrWzrZ7VTOom8hVblKamCCDjtkJtyhlpRbzeQ57HnjkC8Az0UtcpgLZ1gPRd EIKf/hz3e+EkfvGv/IT4ik5P1qclDJqcXauIzs30K+zEcrKdURyQtt0BupaibOpT4JG+ d3vZToy3IEvc2uqbG4UTSVDW5S1nnFoBIdaRXQ5wK+dAH8tJzYYSHuTofvkd2sGFZKkK coaef1zbrr8ss9KI7Crlc1VYruBMckFPEib03wwjDFF2ivr9v621smmUDMS3lLu2FXRn vIGT6NsOBWLVXTOvdsJ4ysTV+HkME3+F07704Cg+7nTBb58jhuIVdG5W7WqklNlIBgxn Y3ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=aYNVZ9aK; 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 by2si474982edb.143.2021.01.15.13.53.17; Fri, 15 Jan 2021 13:53:41 -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=aYNVZ9aK; 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 S1726287AbhAOVwC (ORCPT + 99 others); Fri, 15 Jan 2021 16:52:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbhAOVwC (ORCPT ); Fri, 15 Jan 2021 16:52:02 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BF02C061757 for ; Fri, 15 Jan 2021 13:51:22 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id 15so6866755pgx.7 for ; Fri, 15 Jan 2021 13:51:22 -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=bDXCYaPPP0GIkxQ0+LDG4H4iGHCT3lB0lv11EmEvqJo=; b=aYNVZ9aKSBpd8Mj3qDl38GWChq0Ec/arFQZ2fyibRnqtvci54awJw4bKSPn83e0O+u diq+Q83kTaNzVQbuxf9IRHQwgX5p1vR6KFr65Yi9hjHKOMo+9oD0CR+AEdlYWasYnaYV 3U8wZvAJFLgDkWrsByVsKP/VrszQuRDcKYY9V5NUXg2RrmlvAum7f67WLiTWP9nQpmrf G6yEKJusEODXTZjrgDL/HY2AACHiapX4rviYH0tInQxHWw6qLkKO38OwfAvUYS2blIF6 /1rNSdy82Ty4hrC/Og+jxRHKkSqimI/xgcpG4GeflDzLPjpu6y97krH2SIztsjKMMp6L Sp8A== 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=bDXCYaPPP0GIkxQ0+LDG4H4iGHCT3lB0lv11EmEvqJo=; b=eCgi9xzSxJUZx6VJ5Ccawskq4Z1Seg5CloPBq7FbIVrj4pNF4ptBhoOq3FUOIGdeAS kKtFJbasFo3XzQ6cAj5rVU6bCVRizvNc85nLV38na/QRkiuOX7oBRR6mGy8IdtwbM/os PCZ/N7YIQixKU/QSQxgXkwIoBmVrKz/lpEgYnppv4YeHcFUSD3YRv3NFAf2YOiosojFF e2pw1HCi2Cu7GjYIeKYIg7uHKDT2pqTQYrArE3EAQ76jAZl3yqbTqFB9EJROs89VUJgV aI4zYOl6piBWX4V8lKlFTCCoyXxUPvlKgM58ASLHFsLIjvqnV48y3gfuRssHn8puc7tX XnnQ== X-Gm-Message-State: AOAM5314m7r0tjwh5XVd3p/icWWGCypeXcwuF0Lz32ysWP2ksT0qToVM +rqLpZ1hT0hUgF6O3NruEImPaoJvbgIz0dkfa93Hiw== X-Received: by 2002:a62:1896:0:b029:197:491c:be38 with SMTP id 144-20020a6218960000b0290197491cbe38mr14843937pfy.15.1610747481454; Fri, 15 Jan 2021 13:51:21 -0800 (PST) MIME-Version: 1.0 References: <20210115210616.404156-1-ndesaulniers@google.com> <20210115210616.404156-2-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 15 Jan 2021 13:51:10 -0800 Message-ID: Subject: Re: [PATCH v5 1/3] Remove $(cc-option,-gdwarf-4) dependency from CONFIG_DEBUG_INFO_DWARF4 To: Sedat Dilek Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , LKML , Clang-Built-Linux ML , Linux Kbuild mailing list , linux-arch , Jakub Jelinek , Fangrui Song , Caroline Tice , Nick Clifton , Yonghong Song , Jiri Olsa , Andrii Nakryiko , Arnaldo Carvalho de Melo Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 1:48 PM Sedat Dilek wrote: > > On Fri, Jan 15, 2021 at 10:06 PM Nick Desaulniers > wrote: > > > > From: Masahiro Yamada > > > > The -gdwarf-4 flag is supported by GCC 4.5+, and also by Clang. > > > > You can see it at https://godbolt.org/z/6ed1oW > > > > For gcc 4.5.3 pane, line 37: .value 0x4 > > For clang 10.0.1 pane, line 117: .short 4 > > > > Given Documentation/process/changes.rst stating GCC 4.9 is the minimal > > version, this cc-option is unneeded. > > > > Note > > ---- > > > > CONFIG_DEBUG_INFO_DWARF4 controls the DWARF version only for C files. > > > > As you can see in the top Makefile, -gdwarf-4 is only passed to CFLAGS. > > > > ifdef CONFIG_DEBUG_INFO_DWARF4 > > DEBUG_CFLAGS += -gdwarf-4 > > endif > > > > This flag is used when compiling *.c files. > > > > On the other hand, the assembler is always given -gdwarf-2. > > > > KBUILD_AFLAGS += -Wa,-gdwarf-2 > > > > Hence, the debug info that comes from *.S files is always DWARF v2. > > This is simply because GAS supported only -gdwarf-2 for a long time. > > > > Recently, GAS gained the support for --dwarf-[3|4|5] options. [1] > > And, also we have Clang integrated assembler. So, the debug info > > for *.S files might be improved if we want. > > > > In my understanding, the current code is intentional, not a bug. > > > > [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=31bf18645d98b4d3d7357353be840e320649a67d > > > > Reviewed-by: Nick Desaulniers > > Reviewed-by: Nathan Chancellor > > Signed-off-by: Masahiro Yamada > > Subject misses a "kbuild:" label like in all other patches. > You have: > "Remove $(cc-option,-gdwarf-4) dependency from CONFIG_DEBUG_INFO_DWARF4" Ack, I wonder how that happened? Ah well, will fix in v6; thanks for the feedback. > > - Sedat - > > > --- > > lib/Kconfig.debug | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > index 78361f0abe3a..dd7d8d35b2a5 100644 > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -258,7 +258,6 @@ config DEBUG_INFO_SPLIT > > > > config DEBUG_INFO_DWARF4 > > bool "Generate dwarf4 debuginfo" > > - depends on $(cc-option,-gdwarf-4) > > help > > Generate dwarf4 debug info. This requires recent versions > > of gcc and gdb. It makes the debug information larger. > > -- > > 2.30.0.284.gd98b1dd5eaa7-goog > > -- Thanks, ~Nick Desaulniers