Add tier 3 no_std AArch64/x86_64 support for the QNX Neutrino RTOS by flba-eb · Pull Request #102701 · rust-lang/rust (original) (raw)

…illot

Add tier 3 no_std AArch64/x86_64 support for the QNX Neutrino RTOS

This change allows to compile no_std applications for the QNX Neutrino Real-time operating system for ARM 64 bit CPUs. Tested with QNX Neutrino 7.1.

Partially discussed in zulip.


Tier 3 target policy

At this tier, the Rust project provides no official support for a target, so we place minimal requirements on the introduction of targets.

A proposed new tier 3 target must be reviewed and approved by a member of the compiler team based on these requirements. The reviewer may choose to gauge broader compiler team consensus via a [Major Change Proposal (MCP)][MCP].

A proposed target or target-specific patch that substantially changes code shared with other targets (not just target-specific code) must be reviewed and approved by the appropriate team for that shared code before acceptance.

See also nto-qnx.md; designated developers are:

aarch64-unknown-nto-qnx7.1.0 and x86_64-pc-nto-qnx7.1.0 have been chosen as these strings are used in the official QNX Neutrino toolchain (for C/C++). It should also harmonize with the other Rust targets.

The version (7.1.0 ) is needed because libc needs to distinguish between different versions (target_env is set to 710 for QNX Neutrino 7.1): For example, functions are removed from 7.0 to 7.1, sometimes the signature of functions is slightly changed or size/alignment of structs. I'm expecting the same for future versions. This works very well in e.g. libc (tested with 7.0 which I'm not going to support).

No issue as far as I can see.

Ok

No change for host tools. When cross-compiling for QNX Neutrino, the compiler/linker driver "qcc" is called. It should be possible (but not tested) to use other (OSS) compilers/linkers to produce working binaries.

Only rustc is required for code generation (i.e. no additional libraries to generate code). Linking of executables requires the ordinary runtime libraries crt and libc.

I see no issues with any of the above.

core and alloc should be working (no change required). std implementation is ongoing and will be provided separately.

see nto-qnx.md

Ok

Ok