From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EDBF7C3DA5D for ; Fri, 19 Jul 2024 09:30:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GcCEnXuM+iferIqvex1Gb+h+i+Rt2X3sxXfK40NWecU=; b=QTM0+YjbLMqgr0CQguiFspH5ci IpYFPHHwi8QBZFsxupvbH5JL+Spq6p4FejKGmd1LFgExs0kKCemUhIQg1tAZfL0LicKGNSyPV7Aj5 g1Tbx9WiCFm8M3/HVZ/saWxBI0Gia6ppV6dpfmi/ymyYaP2prMqFxpjTdEX3gcXYuWoRIaja09owb FyaKUzDfGRuOG9MWWxjxJsflivTS6Z+/O+JLu87RKNWjB1Y/gUpqdfXqKv+N77JpKqM5zefe8N/gQ sGVCJ7EY73QawiFt8//pW8JCk7zaKHfbAMLHV59IsZdfPxP/entoiKYT5unFcLSCYdyJ/U3rKNzVn epfmas/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sUjwW-00000002Eny-2IPD; Fri, 19 Jul 2024 09:30:24 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sUjvz-00000002Eda-3Md3 for linux-arm-kernel@lists.infradead.org; Fri, 19 Jul 2024 09:29:53 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C46CE1042; Fri, 19 Jul 2024 02:30:14 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 810623F762; Fri, 19 Jul 2024 02:29:47 -0700 (PDT) Date: Fri, 19 Jul 2024 10:29:41 +0100 From: Mark Rutland To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, alex.coplan@arm.com, catalin.marinas@arm.com, jakub@gcc.gnu.org, linux-arm-kernel@lists.infradead.org, peterz@infradead.org, seanjc@google.com, szabolcs.nagy@arm.com, will@kernel.org Subject: Re: [PATCH] init/Kconfig: remove CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND Message-ID: References: <20240718120647.1115592-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240719_022951_978357_03610EFA X-CRM114-Status: GOOD ( 15.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 18, 2024 at 10:59:16AM -0700, Linus Torvalds wrote: > On Thu, 18 Jul 2024 at 09:59, Linus Torvalds > wrote: > > > > Let's keep the "which gcc versions are scrogged" as a separate config > > entry, and then have this just as a > > > > default n if CC_IS_GCC && GCC_NO_ASM_GOTO_OUTPUTS > > Ok, I ended up playing around with this a bit more, and it ended up like > > config GCC_ASM_GOTO_OUTPUT_BROKEN > bool > depends on CC_IS_GCC > default y if GCC_VERSION < 110500 > .. > > with then CC_HAS_ASM_GOTO_OUTPUT just having a > > depends on !GCC_ASM_GOTO_OUTPUT_BROKEN > > in it. That looks fairly legible to me, and seems to work fine. > > I left it all credited to you, since you found all the problems and > wrote that big nice commit log. But it means that if I screwed up in > my edits, you get the blame too. So if that happens, just point haters > at this email and say it's all my fault. Thanks; that all looks good to me. Just to be sure, I ran a few quick checks (below) and the detection logic looks sound. I also built and boot-tested defconfig for arm64 and x86_64 with the most recent broken GCC (13.2.0), and see no problems. Toolchains which SHOULD work: | % usellvm 14.0.0 make ARCH=arm64 LLVM=1 -s defconfig | % grep OUTPUT .config | CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y | CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y | | % usellvm 13.0.1 make ARCH=arm64 LLVM=1 -s defconfig | % grep OUTPUT .config | CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y | | % usekorg 14.1.0 make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -s defconfig | % grep OUTPUT .config | CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y | CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y | | % usekorg 13.3.0 make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -s defconfig | % grep OUTPUT .config | CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y | CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y | | % usekorg 12.4.0 make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -s defconfig | % grep OUTPUT .config | CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y | CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y Toolchains which SHOULD NOT work | % usekorg 13.2.0 make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -s defconfig | % grep OUTPUT .config | CONFIG_GCC_ASM_GOTO_OUTPUT_BROKEN=y | | % usekorg 12.3.0 make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -s defconfig | % grep OUTPUT .config | CONFIG_GCC_ASM_GOTO_OUTPUT_BROKEN=y | | % usekorg 11.4.0 make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -s defconfig | % grep OUTPUT .config | CONFIG_GCC_ASM_GOTO_OUTPUT_BROKEN=y | | % usekorg 10.5.0 make ARCH=arm64 CROSS_COMPILE=aarch64-linux- -s defconfig | % grep OUTPUT .config | CONFIG_GCC_ASM_GOTO_OUTPUT_BROKEN=y Mark.