Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp819237rwi; Wed, 19 Oct 2022 03:26:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6re8ToE+13F8CnWZvlkNP6czcCFugGCJo12+vt1ePTOoSNso/WaX8QsLazIGrIzAu7nUKO X-Received: by 2002:a17:907:2d89:b0:78d:9c30:452b with SMTP id gt9-20020a1709072d8900b0078d9c30452bmr5690880ejc.533.1666175201582; Wed, 19 Oct 2022 03:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175201; cv=none; d=google.com; s=arc-20160816; b=pjuwn8RFAqS2sRIRaZBsJQ7mDQeuuHzkijjMVqIIbKfOhvKI4pYDbqjeOEJtuzLqUC 3jgetlZVnUci6tAeDQl2sjL2oFc0pEyH2wR/GOct1355IHxZbCvfYshyN3BTOkNVP971 kH1DocE9WSeaKSnkPtxjwyHkg6K34UG79p9mRTV1RG7FvzYq5/6R3q70AU16w7x7vtqb m+AASCcYyOy3T5X+RMeSqSJeaMjooSjQBRhHekpZX3ti1o9dcgePaoYgL3nP+GaCT3y9 8cpBl7ve4scENpurlUqK0a8ywpZnUNF+VPo+qLldwAdS4w0gJtSniwyz46CWY+Ez8ZIn SbMg== 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=qjnzbK+3ALnCT9pMQJ/ZT3I5lVetY8Pb4IuzXZ8d0Vmp96/xNss951cQe2X+p/Ycx3 OI5jQJQ5cXjpMh1BbaJLY5Py/p0joO36RdolkKnHfU/ISkfZVUl1h5805Mvg1ItmbX9g QFBrTIjZu7s5M5jZ0ve9A4Bv9ymL40qK2AcL4xFL32Uq48nra+jMzX9/Qr62cXhjEFnN rWHb529zImgYUisqDieGezvgDkilQ8k62f7fa+Z9pz2gOv95HNcrbUhXv5gjlkeQI7QM ZlZAZ3xlCOegrvlltqI8jMXcUcO8rJ7gFGjXS83QNRsP61H8uzIjOKv+L4PKXFiPdJTL /PVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1cs5caDA; 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 g13-20020a056402090d00b00458b71488bdsi16217766edz.388.2022.10.19.03.26.15; Wed, 19 Oct 2022 03:26:41 -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=1cs5caDA; 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 S234451AbiJSJoB (ORCPT + 99 others); Wed, 19 Oct 2022 05:44:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234518AbiJSJki (ORCPT ); Wed, 19 Oct 2022 05:40:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4987F0186; Wed, 19 Oct 2022 02:16:59 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 5E089617E8; Wed, 19 Oct 2022 09:16:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6ABDBC433C1; Wed, 19 Oct 2022 09:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170982; bh=nWENc6DvF0ptLyQFnc1HPQI6T98w4ylTIBF7MVi5LmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1cs5caDAQSNgxRdC/6vTdtGTMqy99akFOz4isVSTaKjUTvycHHHhx38LonsgYMK0y tu3AUszACaep5Limq2ksTwOs+b683cRHeW+vFYt1eG6DuaHDZ1+exc+nI55RT4dEQM jbLYCllKW0C7G/Wdbi0uDwTH+BEMobtKq0YzZWsc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Nathan Chancellor Subject: [PATCH 6.0 861/862] Kconfig.debug: add toolchain checks for DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT Date: Wed, 19 Oct 2022 10:35:48 +0200 Message-Id: <20221019083327.950968833@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@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.