public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
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
Date: Fri, 19 Jul 2024 10:29:41 +0100	[thread overview]
Message-ID: <ZpoyBSv7sFW1_Mui@J2N7QTR9R3> (raw)
In-Reply-To: <CAHk-=wjQVVXx=vu5O3MxcscKKujvjUZebfUG-QuOkBV1GrnDqg@mail.gmail.com>

On Thu, Jul 18, 2024 at 10:59:16AM -0700, Linus Torvalds wrote:
> On Thu, 18 Jul 2024 at 09:59, Linus Torvalds
> <torvalds@linux-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.


      reply	other threads:[~2024-07-19  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 12:06 [PATCH] init/Kconfig: remove CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND Mark Rutland
2024-07-18 16:59 ` Linus Torvalds
2024-07-18 17:59   ` Linus Torvalds
2024-07-19  9:29     ` Mark Rutland [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZpoyBSv7sFW1_Mui@J2N7QTR9R3 \
    --to=mark.rutland@arm.com \
    --cc=alex.coplan@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=jakub@gcc.gnu.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=seanjc@google.com \
    --cc=szabolcs.nagy@arm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox