[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220224171207.GM614@gate.crashing.org>
Date: Thu, 24 Feb 2022 11:12:07 -0600
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Nicholas Piggin <npiggin@...il.com>
Cc: Anders Roxell <anders.roxell@...aro.org>, mpe@...erman.id.au,
stable@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH 2/3] powerpc: fix build errors
On Thu, Feb 24, 2022 at 03:05:28PM +1000, Nicholas Piggin wrote:
> + * gcc 10 started to emit a .machine directive at the beginning of generated
> + * .s files, which overrides assembler -Wa,-m<cpu> options passed down.
> + * Unclear if this behaviour will be reverted.
It will not be reverted. If you need a certain .machine for some asm
code, you should write just that!
> +#ifdef CONFIG_CC_IS_GCC
> +#if (GCC_VERSION >= 100000)
> +#if (CONFIG_AS_VERSION == 23800)
> +asm(".machine any");
> +#endif
> +#endif
> +#endif
> +#endif /* __ASSEMBLY__ */
Abusing toplevel asm like this is broken and you *will* end up with
unhappiness all around.
Segher
Powered by blists - more mailing lists