Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7149032rwi; Mon, 24 Oct 2022 10:24:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7sDiPsh3OUrv94W30Vk7nVHeeRL1ynEAOP6mp41I7cOQRe953BQEyjshfUSgJRlJdj9ep9 X-Received: by 2002:a63:6bc5:0:b0:460:bd9a:64b8 with SMTP id g188-20020a636bc5000000b00460bd9a64b8mr29664521pgc.257.1666632252840; Mon, 24 Oct 2022 10:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666632252; cv=none; d=google.com; s=arc-20160816; b=INo4ca8fXX1UmpEsJ/8DGAtrpHanJXckMtT7RmylAUZfL4ncZ4nogvEjOUctn6XYNU KqsV2CbsccRlajrhhFaPihevNI82mFIaox1VBuKeJvNVXGFNZhb2cMzMCNW6XWSF1MiY 9nFswb9qqvIHDrewhJv+2hrSjf4AkWoSAZuVxW6Q6AhVRhoQp2BxM3FeSx8LxZmNwb1a oKbNcCXaB7J2nRl9JT6f7J8tBEsp+c6iNwUmjUYcX412e+ngQIMvpZqyDD7uiGVxNJ7D Q+et6Tu8eDJ47RErU1oXIJWHDrcEjYRfMna7iNe5dyGNVfmc9a83cgboyQEk3Do3uyji Yrcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B4bJTkHe+R1eK/WnG/xq+YU70EqnI7wD4R6olOnLYU0=; b=TIPQBJKhZ9AWvNXw6/WnIMprGGYD08qzqxbYc0hjCAeCom98oTuR/BLUjTcGC7X8fI AJdVxZ3nuToSVhLOBpEhSVQqMxioa6VFPLn5bL6ZAxuBuY+TfJ3MH/fmWsbHsfZNg+da FkwfggkdvXnYq2gcv8Zg4uRljdS5l4T2INIS7s+oq5xvLHdQmhzB2GLhnfb2YQO4bhgx urINGnLix0LAMhxl0E8E7F6r+PSTrwwCnWQWc75Unjzt408nDHh+Lnq/kphRMz3fk7cg 3COYr5hj0da2nC+B8sEKV7ONHc4Hh217NGkTAg58UUhSiIhmbdnEkHuQnjoNSV9lJPwk 7Whw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BwQ4+5Gu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a170902d65200b0017d2c45e93fsi52438plh.169.2022.10.24.10.24.00; Mon, 24 Oct 2022 10:24:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BwQ4+5Gu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233615AbiJXQwS (ORCPT + 99 others); Mon, 24 Oct 2022 12:52:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235181AbiJXQtL (ORCPT ); Mon, 24 Oct 2022 12:49:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 281DF29374; Mon, 24 Oct 2022 08:32:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C49D6B8169F; Mon, 24 Oct 2022 12:56:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 204DFC433D6; Mon, 24 Oct 2022 12:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666616167; bh=TKp8IR472I0R5bhXMPRr5MsR+QW2qWUVfFl89+7+dwQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BwQ4+5GuCGev/ZZBWTaNlMFrttrz1N52y9Rrpk2Wnzjksfg7UsBGhPQsSSJG0chsh Pg8LdgBelwDMIDIvPQNhIrmttq4MLXTgvC9USFGcVBOis4h+XcDMUGUf/8q0qV+zwx MOOogkXdrPSAuyCgtbATbBTVxiv99LkLWBWZ+RLo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Nathan Chancellor Subject: [PATCH 5.15 525/530] Kconfig.debug: add toolchain checks for DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT Date: Mon, 24 Oct 2022 13:34:29 +0200 Message-Id: <20221024113108.763453921@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada commit bb1435f3f575b5213eaf27434efa3971f51c01de upstream. CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT does not give explicit -gdwarf-* flag. The actual DWARF version is up to the toolchain. The combination of GCC and GAS works fine, and Clang with the integrated assembler is good too. The combination of Clang and GAS is tricky, but at least, the -g flag works for Clang <=13, which defaults to DWARF v4. Clang 14 switched its default to DWARF v5. Now, CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT has the same issue as addressed by commit 98cd6f521f10 ("Kconfig: allow explicit opt in to DWARF v5"). CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y for Clang >= 14 and GAS < 2.35 produces a ton of errors like follows: /tmp/main-c2741c.s: Assembler messages: /tmp/main-c2741c.s:109: Error: junk at end of line, first unrecognized character is `"' /tmp/main-c2741c.s:109: Error: file number less than one Add 'depends on' to check toolchains. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor [nathan: Fix conflict due to lack of f9b3cd24578401e] Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -274,6 +274,7 @@ choice config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT bool "Rely on the toolchain's implicit default DWARF version" + depends on !CC_IS_CLANG || AS_IS_LLVM || CLANG_VERSION < 140000 || (AS_IS_GNU && AS_VERSION >= 23502) help The implicit default version of DWARF debug info produced by a toolchain changes over time.