Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp376301pxb; Fri, 15 Jan 2021 15:58:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9bAqKv7cv77J+eCt2vIbyUYy1kJPa7E9SiMq1rYRNLIVP3WUlNMe0t+Tctsw8cK7GdiKC X-Received: by 2002:a17:906:369a:: with SMTP id a26mr10110838ejc.276.1610755093916; Fri, 15 Jan 2021 15:58:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610755093; cv=none; d=google.com; s=arc-20160816; b=HLbYR38qKK8TDmjh2f4UTkDPekTJ4YyF65Tkm1VJdpYu63wHijLpB09zBktdrcKd5x 7LBsX6B7kiRCte6d8zAfP1ATiHIA345Rav14WUBoez6AfTTSi+g5BCZrAWtk/XKNo9Q6 rqnR/DUb7GzK1DIHvggtgkLimH2WQUy4vz1lcTpj1Y3XHOjgLXeymxxIQ4x6IeGnfoWq sWhM841M8g8boiHf3DkTLoNJFKnjhbBQxryBOvnHO1mDpafsi0RShY20aNvPIpYNyd+5 is8rMhep4QqpQOG3py89ymY/OS9u1IcY/r93gUnygG7V7OlmWt/QPM+6XAVlb4Lj5VBY POzg== 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:dkim-filter; bh=0dGmFEa9ilYXRN0NxJbL4xcI2a0rn0KztsLjZt1VYKw=; b=uvefIKA0M/8M6NXTyQ2wUdbWbqofzFS4TzFXbdorxhoIHRuABPV909Pmf9lcGeb2gW Ea/HdvbgxAdWkPxkvnMWLvvinwmtv72IyyHBcWq16WOgvnPaMT9LcMBDevMH/9llz+qQ G9p5Ms1lmtx01O0oto4XGGYJ2IOx5+Gq8A8X+2Cx4rUch2AIdKJ7vCTgR1e/r1ff2mar cLjSG5LSXhToaNCX9x9ivwqvWaup12mdUm6wf2F+x/LsuKIuR3Uz2U6HDpGwlBIfiQK6 zuvdEjn3VxTZtPhmpLzL4WUQLPz4upfPx+Rwr4fPhd7c7f93eRru3JJYEnhm4nPx2z9s tv/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=gZHUbr4f; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs4si3448312edb.555.2021.01.15.15.57.50; Fri, 15 Jan 2021 15:58:13 -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=@nifty.com header.s=dec2015msa header.b=gZHUbr4f; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728535AbhAOXzm (ORCPT + 99 others); Fri, 15 Jan 2021 18:55:42 -0500 Received: from conssluserg-01.nifty.com ([210.131.2.80]:52332 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727782AbhAOXzm (ORCPT ); Fri, 15 Jan 2021 18:55:42 -0500 X-Greylist: delayed 71991 seconds by postgrey-1.27 at vger.kernel.org; Fri, 15 Jan 2021 18:55:41 EST Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 10FNskgH004013; Sat, 16 Jan 2021 08:54:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 10FNskgH004013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1610754886; bh=0dGmFEa9ilYXRN0NxJbL4xcI2a0rn0KztsLjZt1VYKw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gZHUbr4ftVVeKIwsv6M+WeWXvOH5j3BIKKBdzanVs6NqMkpxpFEX/nAY8pqug6Xux aOAotIohR6ZT5Fy6eznn3kdqsWWvgqNVlmv8HB+h0MxZy4QW8mlhX0Z+ntug0DPrXr m+fC03IlD9R1ctOq1QEEjIWgiSxMyt7MvZRde1x0DX3Pg5Qu03T7Z81f03svvu3lwJ 3uHeO8Gy5/jlQZJmaOZsylKBUR7Cr6bzWRi6HokVuCi0IztNENkFoxEqWxQ7kawyf8 ciiuotQa+kAf0ZkZPQIBPiwli4lkEIu9gJ4aNbE6DmT0SVKh/UcXPj9f7n/pEoYrZ8 SYoSx+xvYVmcA== X-Nifty-SrcIP: [209.85.214.182] Received: by mail-pl1-f182.google.com with SMTP id be12so5518707plb.4; Fri, 15 Jan 2021 15:54:46 -0800 (PST) X-Gm-Message-State: AOAM532IDN4KHHn95iUNExrVdEK4GMInqdwz8wciwUE5QVxvcRb2SWol 1Nipr8/XjG7u71/UaOvknXaKvv07H55lR4AsGJw= X-Received: by 2002:a17:90a:3481:: with SMTP id p1mr4363127pjb.198.1610754885822; Fri, 15 Jan 2021 15:54:45 -0800 (PST) MIME-Version: 1.0 References: <20210115210616.404156-1-ndesaulniers@google.com> <20210115210616.404156-2-ndesaulniers@google.com> In-Reply-To: From: Masahiro Yamada Date: Sat, 16 Jan 2021 08:54:08 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/3] Remove $(cc-option,-gdwarf-4) dependency from CONFIG_DEBUG_INFO_DWARF4 To: Nick Desaulniers Cc: Sedat Dilek , 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 Sat, Jan 16, 2021 at 6:51 AM Nick Desaulniers wrote: > > 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. I will apply this in my tree, adding "kbuild:" and fixing the typo pointed out by Fangrui. You do not need to resend this one. > > > > - 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 -- Best Regards Masahiro Yamada