Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2072569pxb; Fri, 29 Jan 2021 12:21:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqwXU/6eeeWAvEA0nS/fDDPfjTNBleDydYFCqUxCUP1+qjJeBuZCNDI479vlH8zLdMccdy X-Received: by 2002:a05:6402:424a:: with SMTP id g10mr7167597edb.236.1611951673224; Fri, 29 Jan 2021 12:21:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611951673; cv=none; d=google.com; s=arc-20160816; b=oBsnOT5o/NET1v0fD0GFpmyhp+JZ0brn2JvnCiMcYkp/YZ3pEly88+cM954XdS0Vbs Q3C+BPkMx6gzbOeJlhXuED4+N3ocTUR2CbvMeEAh/KHZDZp5DZvrr/ExJRmn1gNRlr/q z25M7ofdXL4ZqAOpl4Qsasda5j8RS2Rh9cRtuLKx5SFltEMJgvdWRUJkxeQAF8OxldhD 5bys78IH+wJ2FnW5aBnzh/tF6dNpb3i22FrX32nMYW3PxWnQSo5u/BNR+9grTh1N9apO z/brqeq0UmPJbKUkrq2nE7l/dS7doLGyaAcggMmIZ69gDkeKJ83tx8FopPGFk40QfBDp 8odA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=3W/U2GBNiUXOVq9NMd7nVXM4YErVjermutIrsOy/S4s=; b=J3pRTN/qx3VauaGFvArJFXgMfPfnCloSXz3IqY8UP3Mk8zRD38hymaKh2QPv/AVp3m 6tLffDB7QbfRhsY324VNBPe5bplAVdangdgLhg1Na4+vMpBqNQRDa2UufFtKJ1+orelf JzS++nfTlJo17xPvcKE2AuF9nHfQ9B2rQ4v6UcKvywIweHxmpP/PfS6bcHQOuzvTMg/3 OhzKhlur2ULdtVI6F8T/aG5SCAVAuPlBNCSgKh5hMJwYQc2F+WHrfTt3RKt4mhSFtGjH 7PFlI55FD1yDFDBGOw5etSQxJLmQQJCVM9nEgsQ3c+3CcYjxHTm9dhzuQupWxaaioX2o 5sfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FD5fhlGm; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si5888580edx.267.2021.01.29.12.20.47; Fri, 29 Jan 2021 12:21: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=@redhat.com header.s=mimecast20190719 header.b=FD5fhlGm; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233054AbhA2UTJ (ORCPT + 99 others); Fri, 29 Jan 2021 15:19:09 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:48485 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233092AbhA2UTC (ORCPT ); Fri, 29 Jan 2021 15:19:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611951456; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=3W/U2GBNiUXOVq9NMd7nVXM4YErVjermutIrsOy/S4s=; b=FD5fhlGmX66Y6+iG9GPR92aJrd7FwWBvEwolmpTyjkdBzr5LGxFYgMZXKSa1NGOxhKxueq UmRCNtih8rnKPC8FXR/fo8YwVnn5yCLj7zs8uoFvUBruZpWC8GTHWeQzd7buE/hPPwo3d3 ZVyl92jR2e7u7Y2sgsqhdEcC1LEnDLE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-273-9fMf1rNKMvaCwOvRcrJ4vQ-1; Fri, 29 Jan 2021 15:17:32 -0500 X-MC-Unique: 9fMf1rNKMvaCwOvRcrJ4vQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 970748144E0; Fri, 29 Jan 2021 20:17:29 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-64.ams2.redhat.com [10.36.112.64]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA4F25C257; Fri, 29 Jan 2021 20:17:25 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 10TKHH9i2368212 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 29 Jan 2021 21:17:17 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 10TKHCBD2368211; Fri, 29 Jan 2021 21:17:12 +0100 Date: Fri, 29 Jan 2021 21:17:12 +0100 From: Jakub Jelinek To: Nick Desaulniers Cc: Masahiro Yamada , Nathan Chancellor , Andrew Morton , Sedat Dilek , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, Fangrui Song , Caroline Tice , Nick Clifton , Yonghong Song , Jiri Olsa , Andrii Nakryiko , Arnaldo Carvalho de Melo , Arvind Sankar , Nathan Chancellor Subject: Re: [PATCH v6 1/2] Kbuild: make DWARF version a choice Message-ID: <20210129201712.GQ4020736@tucnak> Reply-To: Jakub Jelinek References: <20210129194318.2125748-1-ndesaulniers@google.com> <20210129194318.2125748-2-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210129194318.2125748-2-ndesaulniers@google.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2021 at 11:43:17AM -0800, Nick Desaulniers wrote: > Modifies CONFIG_DEBUG_INFO_DWARF4 to be a member of a choice. Adds an > explicit CONFIG_DEBUG_INFO_DWARF2, which is the default. Does so in a > way that's forward compatible with existing configs, and makes adding > future versions more straightforward. > > Suggested-by: Arvind Sankar > Suggested-by: Fangrui Song > Suggested-by: Nathan Chancellor > Suggested-by: Masahiro Yamada > Signed-off-by: Nick Desaulniers > --- > Makefile | 6 +++--- > lib/Kconfig.debug | 21 ++++++++++++++++----- > 2 files changed, 19 insertions(+), 8 deletions(-) > > diff --git a/Makefile b/Makefile > index 95ab9856f357..20141cd9319e 100644 > --- a/Makefile > +++ b/Makefile > @@ -830,9 +830,9 @@ ifneq ($(LLVM_IAS),1) > KBUILD_AFLAGS += -Wa,-gdwarf-2 > endif > > -ifdef CONFIG_DEBUG_INFO_DWARF4 > -DEBUG_CFLAGS += -gdwarf-4 > -endif > +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF2) := 2 > +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4 > +DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y) Why do you make DWARF2 the default? That seems a big step back from what the Makefile used to do before, where it defaulted to whatever DWARF version the compiler defaulted to? E.g. GCC 4.8 up to 10 defaults to -gdwarf-4 and GCC 11 will default to -gdwarf-5. DWARF2 is more than 27 years old standard, DWARF3 15 years old, DWARF4 over 10 years old and DWARF5 almost 4 years old... It is true that some tools aren't DWARF5 ready at this point, but with GCC defaulting to that it will change quickly, but at least DWARF4 support has been around for years. Jakub