Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1588503pxb; Thu, 4 Feb 2021 17:47:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJy17ZlZbXBEuFfI3oF8oc+wqFsEvBDxfGDVT84hkaHypOI57UQ8dsVJR09xzgBlKENAb8hw X-Received: by 2002:a17:906:fa10:: with SMTP id lo16mr1801809ejb.135.1612489629153; Thu, 04 Feb 2021 17:47:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612489629; cv=none; d=google.com; s=arc-20160816; b=Wjaa7DkB29bs70vVJdyqu4mv9H0urMabzPOi3HcM2phuvPfuT79IZZWi05wO5AiKce 5VI5zUG6/vHIZfx/hv3c76VbCPxweiUaOPf+EUQLHOa5b/Ud6OINCHK8CP12XJdOeo3Q 0BPrhnXc3wUPVM1uJ/67ZtPyr5letnIkiSXHeRb+4A5y5/NX4Pm77XZNI2Fgz8pUYMsA ef+OvT9we++c7GSb/0jMALc/sMns1jQ/w2j/U35AhBEgYXu+27sAEyVd34BitK1QzZ3k p0TOre8beaODu03r0iRgKGyRk1MVOh7Jt7QPx03uBbY8lltXuLsp5fSjrfCY1CJ7DxMb HiIQ== 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=O8yTv9yXpLpwpmF6h6vJLjNPBqLU4fLmK2RwFD/j9hc=; b=ZystxOaptRjQ1TWXiBhIpVabtjaOqqmNe/x5SGqL+3A4VpU5T6IXtwSCu26BtGg/Zl WK8UFxnAGYuyIS0Mcf4XEIRtlg5rHusrTfRLxVUtch5d3NSFebO48lsgNKpC9axqcuTT MmyGgH6WrXBTb/6NqIzBnLKd8aWksYEyyrzFaq8JkBplgLXDLtrcNeSBnvpyC6USqJCz YufiaUHUrqPhr7P3l3hnuTjeMG0HBBDs0iD9F6184V+Y6rj5wg9XO9xeMe5l0ODIKMXD qvYyhmVZRJ7YsFTXrMUVXqBtvXGnxqgVNhB334qi/q07qhF8ZHwPcguNuLgA75pxQGAm QCWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KitKv59S; 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 r23si4977824edy.455.2021.02.04.17.46.45; Thu, 04 Feb 2021 17:47:09 -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=KitKv59S; 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 S239953AbhBDUGG (ORCPT + 99 others); Thu, 4 Feb 2021 15:06:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239008AbhBDUFo (ORCPT ); Thu, 4 Feb 2021 15:05:44 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45FFBC0613D6 for ; Thu, 4 Feb 2021 12:05:04 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id g15so2459645pjd.2 for ; Thu, 04 Feb 2021 12:05:04 -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=O8yTv9yXpLpwpmF6h6vJLjNPBqLU4fLmK2RwFD/j9hc=; b=KitKv59S0KZUVykZ6ItTKBrIPA93df0eb38/9t4KUTgKq2uh7behhmwlQVq8qfnJSe sjX0Q7FVpceYLH8jY8jMexr3/MRkR+ZpXmPfWn7xr/okoGAjNJ3F7qBnHkH/v3/jpMJA ILJUujFRQUun1191Q8JTDOst7DFbvAp4ijkK+WgvcFzTrg9nD+gVU7xLfeyLbXovNF1A D9wx5Gy9BqcYOR+f5CHDDjq53WflJalYd6p0KVsotSm954Bf+9EpWosWGcJDXFgjrW8J L3u5U86qLj2M4UPNDF2lHcni4iom+j8Uyu5y6PnOSDo1y9dJjzW2oPUc18ATk7WMRwY6 9jGg== 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=O8yTv9yXpLpwpmF6h6vJLjNPBqLU4fLmK2RwFD/j9hc=; b=PK4T9BOpDs/evkZYCk/Bo+7BngnrdijFaWmGeM0JNB54sffC/NefBaJ2MxWGjfrc1N 6TzlH6KQGpeLgYCOtGY4OjuiTJJiwgPwXCa+9Qx5Kh3IdzECNzRQJnaw7cbkomp1PJLy th8dL/fLQmDLvp2kbJxloH6zKJ5DRCThmOi7Gr4kyCiY6cbJ7n6bakd4wrSeNb8NntiK XoXdX/KuvbrkeLi4Ou7UTlVpnYOIBgnHodVfCEWrgLuqz1f+9TxKU07bubYScKrJyGG4 4hwqNiJ30owuoON+nOz9gG92M2tkXk1cl+67TfEP4BSJHgZAtcOLNViqYT0zI76wOjSr OpGg== X-Gm-Message-State: AOAM5332PeC6Bkc7b7oSJ7mJKS5pAhQ0zo/tZ1bgbW4y0lMumleJqx7s liLl8SqOd5+0tIU9IDkaMRIUbu2eQ1rMyyi5mskvEw== X-Received: by 2002:a17:90a:bf10:: with SMTP id c16mr595707pjs.101.1612469103596; Thu, 04 Feb 2021 12:05:03 -0800 (PST) MIME-Version: 1.0 References: <20210130004401.2528717-1-ndesaulniers@google.com> <20210130004401.2528717-2-ndesaulniers@google.com> <20210204103946.GA14802@wildebeest.org> <20fdd20fe067dba00b349407c4a0128c97c1a707.camel@klomp.org> In-Reply-To: <20fdd20fe067dba00b349407c4a0128c97c1a707.camel@klomp.org> From: Nick Desaulniers Date: Thu, 4 Feb 2021 12:04:51 -0800 Message-ID: Subject: Re: [PATCH v7 1/2] Kbuild: make DWARF version a choice To: Mark Wielaard Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , Sedat Dilek , LKML , 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 , Nathan Chancellor Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 4, 2021 at 11:56 AM Mark Wielaard wrote: > > On Thu, 2021-02-04 at 11:18 -0800, Nick Desaulniers wrote: > > On Thu, Feb 4, 2021 at 2:41 AM Mark Wielaard wrote: > > > 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. > > > > > > And since GCC 11 it defaults to DWARF version 5. > > > > > > It would be better to set the default to the DWARF version that the > > > compiler generates. So if the user doesn't select any version then it > > > should default to just -g (or -gdwarf). > > > > I disagree. > > > > https://lore.kernel.org/lkml/CAKwvOdk0zxewEOaFuqK0aSMz3vKNzDOgmez=-Dae4+bodsSg5w@mail.gmail.com/ > > """ > > I agree that this patch takes away the compiler vendor's choice as to > > what the implicit default choice is for dwarf version for the kernel. > > (We, the Linux kernel, do so already for implicit default -std=gnuc* > > as well). ... > > But I'm > > going to suggest we follow the Zen of Python: explicit is better than > > implicit. > > """ > > We have a number of in tree and out of tree DWARF consumers that > > aren't ready for DWARF v5. Kernel developers need a way to disable > > DWARF v5 until their dependencies are deployed or more widely > > available. > > I agree with Jakub. Now that GCC has defaulted to DWARF5 all the tools > have adopted to the new default version. And DWARF5 has been out for "all of the tools" ? > more than 4 years already. It isn't unreasonable to assume that people > using GCC11 will also be using the rest of the toolchain that has moved > on. Which DWARF consumers are you concerned about not being ready for > GCC defaulting to DWARF5 once GCC11 is released? Folks who don't have top of tree pahole or binutils are the two that come to mind. I don't have specifics on out of tree consumers, but some Aarch64 extensions which had some changes to DWARF for ARMv8.3 PAC support broke some debuggers. I don't doubt a lot of work has gone into fixing many downstream projects and then when building everything from ToT that there are no issues with DWARF v5. The issue is getting upgrades into developers hands, and what to default to until then. -- Thanks, ~Nick Desaulniers