Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4079739rwi; Sat, 22 Oct 2022 04:59:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM60GY1VMLN1bNuULU7tdRc/DR6BvY3eJE9IfK5AhXpjxHlY3KQu3xMeB8k8YZrBzkZISjwc X-Received: by 2002:a17:907:7607:b0:78d:66e8:c746 with SMTP id jx7-20020a170907760700b0078d66e8c746mr19845139ejc.220.1666439985141; Sat, 22 Oct 2022 04:59:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666439985; cv=none; d=google.com; s=arc-20160816; b=afGJVr1SP3N2RhFcYeRVuoS/QqY7b9S/jgaN7ywwJSClC/QrGKy1M9wrPxwGWrorjf vQnkjgSVlOEe9CAUK5tbxEHp8WZ6APIcmfBw5/O+Ykq54lG0YgP/BnImUdk3wYy2BsSG oQkP1V6tVHFH1flk2xIrCI2nQYf0F7NtgBGjk6eb2vjOIR09HnG2/GF+SY/ENP2WRb31 RcoJYO5XzueByAFnaPOsazH28AblNLLd6pOqjmMnsU2NNgoFIPiWFuuDDZr3vV8LEthE CQNvNQJHMOhOjYsAf0IXf69HjKoY0iGR3Dz0db2XTwzK22+9stMJ+7haHxmkXSF58X2f AZ7g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he17-20020a1709073d9100b0078bdbb52361si14250016ejc.209.2022.10.22.04.59.19; Sat, 22 Oct 2022 04:59:45 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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.