[PATCH 3/3] arm64: rust: Disable neon and fp target features.
Will Deacon
will at kernel.org
Thu Jan 26 08:37:54 PST 2023
On Wed, Jan 25, 2023 at 04:37:39PM +0000, Jamie Cunliffe wrote:
> Disable the neon and fp target features to avoid fp & simd
> registers. The use of fp-armv8 will cause a warning from rustc about
> an unknown feature that is specified. The target feature is still
> passed through to LLVM, this behaviour is documented as part of the
> warning. This will be fixed in a future version of the rustc
> toolchain.
>
> Signed-off-by: Jamie Cunliffe <Jamie.Cunliffe at arm.com>
> ---
> arch/arm64/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index b53ab6aa2dfe..33ae20fc3f56 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -41,6 +41,8 @@ KBUILD_CFLAGS += -mgeneral-regs-only \
> KBUILD_CFLAGS += $(call cc-disable-warning, psabi)
> KBUILD_AFLAGS += $(compat_vdso)
>
> +KBUILD_RUSTFLAGS += -C target-feature="-neon,-fp-armv8"
Why do we advertise these features as present in
scripts/generate_rust_target.rs?
Will
More information about the linux-arm-kernel
mailing list