Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp310999pxb; Fri, 15 Jan 2021 13:49:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8cdoAki0/O7iVbFGwplNKLHt8UOLmoC9aj0HP6gSwYHSSj5MwDFlX+EhUldInM6fLxh1x X-Received: by 2002:a17:906:7b8d:: with SMTP id s13mr10117799ejo.479.1610747392411; Fri, 15 Jan 2021 13:49:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610747392; cv=none; d=google.com; s=arc-20160816; b=D3swvrJf6Fa7OznaH2TPNROF23saV+V89XbAcMrgYtfmeZ8p73SEYXTMTa5wuk+1vk YwhZOouMyiDPWqy0zI9Q6KroaKiWQytH5niIgVl5Kt5iyjB/JtgMERPVLVIeS29jY5yb 4Rt+OUn4cI+j7udZB5QxSVCtoGbaqCSYN5u54rvaRsnId4WVTu6UTwvwlbPt3P4oDK4A +jNoG5ludeCmXXAm08cLnZjOSQVrNMNS0i4662+Xe2z6VQB3MP3EAniLDqQKj2FXzjb9 jqCFQEiiGmzaZtsi9OraWosFORFkI9mVEVdHWUb5HYX8B2dRIi20LH64jHZ+Kqha3tHD vqYQ== 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:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=zYYFMiVWZRWVRKnudyq1lNHacc6UniMAU/JKqtSTWp8=; b=wVeTKA5H9J3KeHK0kN+XQ/PLBTN6yw/oFZB32lkdw4p0fVLCMyPWMw09MMnL7Mn5P+ Lj9yAoFrP+xwfotXOmdksxDKCF4hd0dPPrMPLxIEuqY6cwpKs4NPQC+49FR6ihwRRuTR eM1ihUnCMfF+THjIu8YGgM42UgrtlP9lURF9DuZS3OYoKfScg0x0MGZoW+y3lPt7p1v0 njRSj6XL4M+2IJzbPdfCShhIy+yA7psRoDKau1XzUM3FaLvubU0Mm5ZoHZsz3QLoXfFB DuiZb0poHzgS6ZKawNVRF+0w3j4oDzrq4tTzpYk4mllVwBcx4ubph7ru9KnaYLtg1EOa sdRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i8x4NwEn; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y2si4380649edu.601.2021.01.15.13.49.29; Fri, 15 Jan 2021 13:49:52 -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=@gmail.com header.s=20161025 header.b=i8x4NwEn; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726287AbhAOVsk (ORCPT + 99 others); Fri, 15 Jan 2021 16:48:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbhAOVsk (ORCPT ); Fri, 15 Jan 2021 16:48:40 -0500 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 034E7C061757; Fri, 15 Jan 2021 13:48:00 -0800 (PST) Received: by mail-io1-xd2f.google.com with SMTP id n2so3845896iom.7; Fri, 15 Jan 2021 13:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=zYYFMiVWZRWVRKnudyq1lNHacc6UniMAU/JKqtSTWp8=; b=i8x4NwEnmjRo6MH0hWEVsP7+ZKONZUSwlLn54xMqjtGHQfwel5ZXpK3x/1MPu6dpem kVN5lmRw4o1dYyhNQY1Rmyn9dkVHy9P8ZpmGDjUJHac7cLnmdxicPB7g4DogBPCV4eRh 9YzIIrYoXnMBJ3sjgtAGi4uMCoeZgVI/vKjiZZMil13wQ7w9tIrGkm3IBtERIFNsQqp6 mFH1vuG3g3loN3IYZwQFQDM5tDBiTs9a8Tdc/zJ4sd4EJwusXFBTLEJ8Ayc8Cv4YkQCb Nbnyhz63r52s+NENwuFkCKjhE25T6ZYwrt4k0D7ZBJCGlhxLM14lHf2+Slm9JbwgGj6w zCeA== 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:reply-to :from:date:message-id:subject:to:cc; bh=zYYFMiVWZRWVRKnudyq1lNHacc6UniMAU/JKqtSTWp8=; b=EC/4Gw3+d9TmYf1jVSY6EU9TYwmmu2HfH/7yzWF4xnsZOML3s+lDfA43sUVsTRgPf1 GUHD60qrJ6eR+jIl0aXZedLEJJXx5oxkwuQrEFtjPueXnK9sA5Ub79ZGMmmZhnmI4rWn +qphr31owZooiY+5AMQ/PdsoIFGjNcRcGqY3gyfAfUg+tJAoF6JEYbf49kfStg68cV0l vApHIihb9s95uuPKJ8vR1LuLlSe8YmXXzaM+dUjA12CpazX1W9sXOOm2s2Oqxrc6UhoU PvyUFAo0rtMAn9bLXZz/5XJPjv+lG7Rkb+kaN8EvKplBuwrmPYYwZldg4a7l9QOAue4G XUSQ== X-Gm-Message-State: AOAM533ReEbYRZuteDQAatEprdDjgcOJuJIebGNilyekEtRxDjPDtomA GxgqU3GTOjRhDY3hahCK6HXPNN1qqnJpq16GWtY511+BP+CjLw== X-Received: by 2002:a92:c692:: with SMTP id o18mr12747830ilg.215.1610747279317; Fri, 15 Jan 2021 13:47:59 -0800 (PST) MIME-Version: 1.0 References: <20210115210616.404156-1-ndesaulniers@google.com> <20210115210616.404156-2-ndesaulniers@google.com> In-Reply-To: <20210115210616.404156-2-ndesaulniers@google.com> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Fri, 15 Jan 2021 22:47:48 +0100 Message-ID: Subject: Re: [PATCH v5 1/3] Remove $(cc-option,-gdwarf-4) dependency from CONFIG_DEBUG_INFO_DWARF4 To: Nick Desaulniers Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , linux-kernel@vger.kernel.org, Clang-Built-Linux ML , linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, 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 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" - 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 >