[PATCH 3/3] arm64: rust: Disable neon and fp target features.
Vincenzo Palazzo
vincenzopalazzodev at gmail.com
Wed Jan 25 11:55:42 PST 2023
On Wed Jan 25, 2023 at 5:37 PM CET, 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>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev at gmail.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"
> +
> KBUILD_CFLAGS += $(call cc-option,-mabi=lp64)
> KBUILD_AFLAGS += $(call cc-option,-mabi=lp64)
>
> --
> 2.30.2
More information about the linux-arm-kernel
mailing list