From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E1FA4C72 for ; Wed, 31 Aug 2022 20:23:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 563B7C433D6; Wed, 31 Aug 2022 20:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661977383; bh=5uN7nzPwfI/1N2ti9Lp5VrCgxZVrN89dYdqpAIQOF6s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CA23Eldvy/3ULld1WpL1lAnDzzQD1phusjI7CK4wIZvslO1aL8OOfNQ69a8J2Q57A COq0zBpdM2bF/6wmcWgj2SMyQ+AoP83IR8EQxGFb2mtdhwuAK1YnBu2Ye7LIElOsrq Lb/E943++QUC9yMiSZQoPWJalkuufXONeR4YG/3ddH0k6h2fmi6eE6k32Qf2wnpeRx o1o/Ff0E0LUCfcULCF88iJ509Gy964IRaXir+h1Mf/GjC5GQSPhBSDyUJk5/s1CSpx weomMrDW+vvhYUhBxrNS7l6Do6OICJRQKOVKucSNDd3DTvYe0lU+zAl/6DOoEyme3w 1js6ugKD51U9A== Date: Wed, 31 Aug 2022 13:23:00 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: Masahiro Yamada , Michal Marek , Tom Rix , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, x86@kernel.org, Dmitrii Bundin , Fangrui Song , Alexey Alexandrov , Bill Wendling , Greg Thelen , Andi Kleen Subject: Re: [PATCH v2 5/5] Makefile.debug: set -g unconditional on CONFIG_DEBUG_INFO_SPLIT Message-ID: References: <20220831184408.2778264-1-ndesaulniers@google.com> <20220831184408.2778264-6-ndesaulniers@google.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220831184408.2778264-6-ndesaulniers@google.com> On Wed, Aug 31, 2022 at 11:44:08AM -0700, Nick Desaulniers wrote: > Dmitrii, Fangrui, and Mashahiro note: > > Before GCC 11 and Clang 12 -gsplit-dwarf implicitly uses -g2. > > Fix CONFIG_DEBUG_INFO_SPLIT for gcc-11+ & clang-12+ which now need -g > specified in order for -gsplit-dwarf to work at all. > > -gsplit-dwarf has been mutually exclusive with -g since support for > CONFIG_DEBUG_INFO_SPLIT was introduced in > commit 866ced950bcd ("kbuild: Support split debug info v4") > I don't think it ever needed to be. > > Link: https://lore.kernel.org/lkml/20220815013317.26121-1-dmitrii.bundin.a@gmail.com/ > Link: https://lore.kernel.org/lkml/CAK7LNARPAmsJD5XKAw7m_X2g7Fi-CAAsWDQiP7+ANBjkg7R7ng@mail.gmail.com/ > Link: https://reviews.llvm.org/D80391 > Cc: Andi Kleen > Reported-by: Dmitrii Bundin > Reported-by: Fangrui Song > Reported-by: Masahiro Yamada > Suggested-by: Dmitrii Bundin > Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor > --- > Changes v1 -> v2: > * Add reference to 866ced950bcd, cc Andi, in commit message. > > scripts/Makefile.debug | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/scripts/Makefile.debug b/scripts/Makefile.debug > index 46e88f0ca998..b6eb532af3cc 100644 > --- a/scripts/Makefile.debug > +++ b/scripts/Makefile.debug > @@ -1,10 +1,8 @@ > -DEBUG_CFLAGS := > +DEBUG_CFLAGS := -g > +KBUILD_AFLAGS += -g > > ifdef CONFIG_DEBUG_INFO_SPLIT > DEBUG_CFLAGS += -gsplit-dwarf > -else > -DEBUG_CFLAGS += -g > -KBUILD_AFLAGS += -g > endif > > ifdef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT > -- > 2.37.2.672.g94769d06f0-goog >