Re: [PATCH v2 1/3] arm64: rust: Enable Rust support for AArch64

Jamie Cunliffe
2023-06-12T15:27:30Z

> I don't think you need "-fp-armv8" here, because "aarch64-unknown-none"
> target doesn't have the target-feature "fp-arm64":
>
> rustc +1.68.2 --print cfg --target aarch64-unknown-none | grep target_feature
>
> target_feature="neon"
>
> , and having the "-fp-armv8" gave me a warning at compile time:
>
> RUSTC L rust/core.o warning: unknown feature specified for `-Ctarget-feature`: `fp-armv8`
> |
> = note: it is still passed through to the codegen backend
> = help: consider filing a feature request

Rust removed the fp feature for arm64 and tied it with Neon. However
this initially had a bug that meant it couldn't be disabled. This has
now been fixed in https://github.com/rust-lang/rust/pull/107294 so
once we can update rustc we can fix that warning by removing the
`-fp-armv8`. Until we do that we still need the `-fp-armv8` otherwise
we will get some floating point usage. This can be seen by doing an
objdump of core.o if you build after removing the `-fp-armv8`.

You can also see that fp-armv8 is enabled in the aarch64-unknown-none target
here: https://raw.githubusercontent.com/rust-lang/rust/master/compiler/rustc_target/src/spec/aarch64_unknown_none.rs

Thanks,
Jamie.