From patchwork Wed Aug 31 18:44:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 12961304 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 481AAECAAD4 for ; Wed, 31 Aug 2022 18:44:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232965AbiHaSoc (ORCPT ); Wed, 31 Aug 2022 14:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233009AbiHaSo3 (ORCPT ); Wed, 31 Aug 2022 14:44:29 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28FED26FD for ; Wed, 31 Aug 2022 11:44:26 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-340a4dcb403so190023017b3.22 for ; Wed, 31 Aug 2022 11:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc; bh=nxmpsFmEnqVW7vmZQzr2xRuU6Ch0EkVsaTgU/u2vV4k=; b=SAAFmWyauBySzjpJrNvt73SE2HPay3Orf8jgDhjx36QAx7OjiDOdYgsm0SfNZdYfwR 1aWZ13i7QRQptij6GuG9iGtF5yNsL2kRXMc/dvOv+5aTsicc+ef1Ql2h5biLg+VJPx0G rmMAQwuOVN9lN15VJGyMBfX+4vBc79LhEGOh+DryEgZCI6vTG2qdzrFp2UzJi1YWMD9a vVxzoMSlkBRJLBl9oBX4X28ujseOHFASxxhznifxHhpBPOECjZcdTeTNVIfpWNZ/Xz1a F2xgmh8MU7SgOqR7WoUtklnxM60uI9cp0b8xB0qwWelT9D1xKvMAqzogZGtG4cA2VV1t OZqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc; bh=nxmpsFmEnqVW7vmZQzr2xRuU6Ch0EkVsaTgU/u2vV4k=; b=Ff2cK2uqjIh6DD8BgL/YIFm0cMQt/cmQhfel6gJC4AoT7ZAsIokb79ZTMBdvhbwHYg CcpUCxD7oHavfEaE8ZwYOKzRnZzKM040i3WzGkkH9joJxx1BgCpQKPEeFhOxiqIE5FvO yzZLLX2qFGloUAgn7QMRWvcJBnLY/+yR4P5aqjOHVJYK1tev0iKt4FjG/1tWrZB8/RJw bdpa2GIjBj6/zF4F/32rUYVHlb+zzDortv8CU3Gc60/RA4ICWOz23uc0EYC7L5R17gWq 5RfbPrctwhrYmlVFwPQ4pew1qZ0JOBZoQZhbOK+jwh+VCB+EFCkVi8GPfEEV6w2sf4rp xoiA== X-Gm-Message-State: ACgBeo1sB+CoAyPrdjGFt50EWjU8XrwG697Vm0iQ3tG/OVcn6PngKqou r+ykgKTUJNYorL2DkWkK2jAgGSi4FFxj82KMvwo= X-Google-Smtp-Source: AA6agR79hkk5fE74ISpRQrASiipyjZ0iIGE2aErmcWn9sSqmbylmLaYlnrPt+lkeerueBeb+/SoRGdoJiwqeKBj6cUk= X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:0:100e:712:5f5d:95d5:9a3:d41]) (user=ndesaulniers job=sendgmr) by 2002:a0d:e850:0:b0:33d:c65e:db0f with SMTP id r77-20020a0de850000000b0033dc65edb0fmr19134259ywe.253.1661971465422; Wed, 31 Aug 2022 11:44:25 -0700 (PDT) Date: Wed, 31 Aug 2022 11:44:08 -0700 In-Reply-To: <20220831184408.2778264-1-ndesaulniers@google.com> Mime-Version: 1.0 References: <20220831184408.2778264-1-ndesaulniers@google.com> X-Developer-Key: i=ndesaulniers@google.com; a=ed25519; pk=lvO/pmg+aaCb6dPhyGC1GyOCvPueDrrc8Zeso5CaGKE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1661971448; l=1621; i=ndesaulniers@google.com; s=20211004; h=from:subject; bh=vWDrWFVICt3Ai14ovaPS7sV9hqYwW1jW8tWWfH+heHY=; b=7NUjXNp3Kko38nPRelaw4RlNwQnLJ60Pq2Feeg9ta5r0PFwgmr+eznfGI29OX44l2Ycx4qKFO/UY y+0hS6/tAzQOJuSLTxlLvDIvqPKvb5NZIizBF2kXCnKd1dlp6AQn X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog Message-ID: <20220831184408.2778264-6-ndesaulniers@google.com> Subject: [PATCH v2 5/5] Makefile.debug: set -g unconditional on CONFIG_DEBUG_INFO_SPLIT From: Nick Desaulniers To: Masahiro Yamada Cc: Michal Marek , Nathan Chancellor , 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 , Nick Desaulniers , Andi Kleen Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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