Re: [PATCH 3/3] rust: Enable for MIPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在2024年9月3日九月 下午7:17,Miguel Ojeda写道:
[...]
>
> I guess you mean you are getting the warning about the
> unknown/unstable feature passed to the backend? i.e. `rustc` knows
> about those LLVM ones and forwards them when enabled via
> `-Ctarget-feature` (with a warning):
>
>     rustc --target mips64-unknown-linux-gnuabi64 --print target-features
>
> So they would need to be added to the list at [1] (or targeted flags created).
>
> Until those do not emit a warning, it is fine using the `target.json`,
> but I wanted to understand if there is something else you may need,
> since we will need to eventually avoid the `target.json`, so it is
> best asking upstream as soon as possible.

Ahh thanks for the elaboration.

So there are some targets vs feature stuff which is still not clear for
rust upstream.

For example, on ISA level (things like +mips64r2, +mips3), currently for
rust upstream, it is handled by target name. (i.e. regular mips64-unknown-linux-gnuabi64
triple would pass +mips64r2 to backend, mips64isar6-unknown-linux-gnuabi64
would pass +mips64r6).

However, kernel supports many ISA variants that are not defined by any rust target
triple, I'm not really sure if it's appropriate to define them all in upstream.

The same applies to +soft-float and +noabicalls options as well. It seems like
+soft-float and +noabicalls are only enabled by bare-metal toolchains as rust
recognise them as a target defined features.

Thanks
>
> Thanks!
>
> [1] 
> https://github.com/rust-lang/rust/blob/d6c8169c186ab16a3404cd0d0866674018e8a19e/compiler/rustc_target/src/target_features.rs#L368
>
> Cheers,
> Miguel

-- 
- Jiaxun





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux