From patchwork Sat Oct 22 07:29:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1158114wrr; Sat, 22 Oct 2022 04:19:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5S/dd3an16EBYNPLH++wc0cPd1LmncdkX4L0O2sfrTsU3GCCBxjLZHUHbGxwgGzJzElwgS X-Received: by 2002:a65:4084:0:b0:463:aa4:49cf with SMTP id t4-20020a654084000000b004630aa449cfmr19885476pgp.164.1666437575348; Sat, 22 Oct 2022 04:19:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666437575; cv=none; d=google.com; s=arc-20160816; b=wVaOp45zDC/WJGpxep75ye8s8mJrnSNl5IFPVI5zQ4wtPfdNns81uVOPalEjLpTsfJ 1B2ucgE/FFMlLjfxzUYSwHGhxvZE0X3f3Ep265IO0dZC85tEES/V5f6mXlXIM8+akoLQ 042zzqZxEDEIVbZRUlWYBI15FOjags2NW5OCURoo+JPVjPk28lQdAdzh3X+ZnCxmn5NT dMI1/HI14OEOnjqMl9+v20F41og9Qme7SNtCdIrtN3MvK5lODseZpXds3IukRuQN5YYj PwAfvU5I/cli/KEt8cnPVRjVVODE3dCA3QB1nYKRH+bwkuZc5B5od27pVcMoIerOBfc2 D+GA== 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=dSP/WekZqdVNZMemNmsPhTMxr56aGuBQzy47HhWw5XA=; b=kdOWqdgLxJqwVI0gg5Bo8XUXD89F4t6IVHGN7rEiV9S82xRhbof7gjc0shCeYloHym Y7UrvSR0L/rq1STH1h9e9EtAikUGcGEbqRdk/pj6rzzbVW/6RsXxK0HqlPhdwWK84Z0s /uwOxqNKTxQXlGkEA1eEolEoNH3P+h8VEiZ7+wG7bby3Ryb42DJfK/pbkhCc+KYdb7qA DWMFofCJO/lsbzFzbF9t6NSwVaPtRAFubdc2FYQddXYXck9iDwZ8HMXGPV1Z2j9I/eF+ 22He0kvAep81ISDlRaaQKJdC+r9JkiJMJBpOTbpTY0ZMwlqRXOBHUX+AIZWTF0aos50h /2Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1DU/QBD8"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p16-20020a056a000b5000b00565db76831esi28873545pfo.62.2022.10.22.04.19.22; Sat, 22 Oct 2022 04:19:35 -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="1DU/QBD8"; 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 S230503AbiJVLRD (ORCPT + 99 others); Sat, 22 Oct 2022 07:17:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231194AbiJVLQi (ORCPT ); Sat, 22 Oct 2022 07:16:38 -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 5397C27FEAF; Sat, 22 Oct 2022 03:41:13 -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 9496CB82E1D; Sat, 22 Oct 2022 08:07:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECACBC433C1; Sat, 22 Oct 2022 08:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666426078; bh=nWENc6DvF0ptLyQFnc1HPQI6T98w4ylTIBF7MVi5LmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1DU/QBD8c949Kk86HHVnPK4p3egAKHGnNxytTW+0XTskISS96Twq/CPEvgbQURtxK l+qPRfLto/R+3seIgtscz7RxyJsOXdQh2BmBmYg3+6k0xnTl5exX3halDRyi+iMQ// jokNGW+HipGnf/k1aKT8HmZBEaGOAD2zBrgRupKE= 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.19 711/717] Kconfig.debug: add toolchain checks for DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT Date: Sat, 22 Oct 2022 09:29:50 +0200 Message-Id: <20221022072529.902430182@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747386447256683366?= X-GMAIL-MSGID: =?utf-8?q?1747386447256683366?= 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 Signed-off-by: Greg Kroah-Hartman --- lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -253,6 +253,7 @@ config DEBUG_INFO_NONE config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT bool "Rely on the toolchain's implicit default DWARF version" select DEBUG_INFO + 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.