[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZpoyBSv7sFW1_Mui@J2N7QTR9R3>
Date: Fri, 19 Jul 2024 10:29:41 +0100
From: Mark Rutland <mark.rutland@....com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, alex.coplan@....com,
catalin.marinas@....com, jakub@....gnu.org,
linux-arm-kernel@...ts.infradead.org, peterz@...radead.org,
seanjc@...gle.com, szabolcs.nagy@....com, will@...nel.org
Subject: Re: [PATCH] init/Kconfig: remove
CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND
On Thu, Jul 18, 2024 at 10:59:16AM -0700, Linus Torvalds wrote:
> On Thu, 18 Jul 2024 at 09:59, Linus Torvalds
> <torvalds@...ux-foundation.org> 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.
Powered by blists - more mailing lists