Skip to content

Commit 46a0333

Browse files
committed
Update documentation to include QNX 8.0
Signed-off-by: Florian Bartels <[email protected]>
1 parent 3f045c9 commit 46a0333

File tree

2 files changed

+51
-44
lines changed

2 files changed

+51
-44
lines changed

src/doc/rustc/src/platform-support.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,14 @@ target | std | host | notes
254254
[`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3
255255
[`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon
256256
[`aarch64-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | ARM64 FreeBSD
257-
`aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
258257
[`aarch64-unknown-hermit`](platform-support/hermit.md) | ✓ | | ARM64 Hermit
259258
[`aarch64-unknown-illumos`](platform-support/illumos.md) | ✓ | ✓ | ARM64 illumos
260259
`aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI)
261260
[`aarch64-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | ARM64 NetBSD
262-
[`aarch64-unknown-nto-qnx710_iosock`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS with new network stack (io-sock) |
263-
[`aarch64-unknown-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS |
261+
[`aarch64-unknown-nto-qnx700`](platform-support/nto-qnx.md) | ? | | ARM64 QNX Neutrino 7.0 RTOS |
264262
[`aarch64-unknown-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS with default network stack (io-pkt) |
263+
[`aarch64-unknown-nto-qnx710_iosock`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS with new network stack (io-sock) |
264+
[`aarch64-unknown-nto-qnx800`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 8.0 RTOS |
265265
[`aarch64-unknown-nuttx`](platform-support/nuttx.md) | * | | ARM64 with NuttX
266266
[`aarch64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | ARM64 OpenBSD
267267
[`aarch64-unknown-redox`](platform-support/redox.md) | ✓ | | ARM64 Redox OS
@@ -408,6 +408,7 @@ target | std | host | notes
408408
[`x86_64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | x86 64-bit Apple WatchOS simulator
409409
[`x86_64-pc-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | x86 64-bit QNX Neutrino 7.1 RTOS with default network stack (io-pkt) |
410410
[`x86_64-pc-nto-qnx710_iosock`](platform-support/nto-qnx.md) | ✓ | | x86 64-bit QNX Neutrino 7.1 RTOS with new network stack (io-sock) |
411+
[`x86_64-pc-nto-qnx800`](platform-support/nto-qnx.md) | ✓ | | x86 64-bit QNX Neutrino 8.0 RTOS |
411412
[`x86_64-unikraft-linux-musl`](platform-support/unikraft-linux-musl.md) | ✓ | | 64-bit Unikraft with musl 1.2.3
412413
`x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
413414
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku

src/doc/rustc/src/platform-support/nto-qnx.md

+47-41
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Currently, the following QNX Neutrino versions and compilation targets are suppo
2222

2323
| QNX Neutrino Version | Target Architecture | Full support | `no_std` support |
2424
|----------------------|---------------------|:------------:|:----------------:|
25+
| 8.0 | AArch64 | ? ||
26+
| 8.0 | x86 | ? ||
2527
| 7.1 with io-pkt | AArch64 |||
2628
| 7.1 with io-sock | AArch64 | ? ||
2729
| 7.1 with io-pkt | x86_64 |||
@@ -31,6 +33,8 @@ Currently, the following QNX Neutrino versions and compilation targets are suppo
3133

3234
On QNX 7.0 and 7.1, `io-pkt` is used as network stack by default. QNX 7.1 includes
3335
the optional network stack `io-sock`.
36+
QNX 8.0 always uses `io-sock`. QNX 8.0 support is currently in development
37+
and not tested.
3438

3539
Adding other architectures that are supported by QNX Neutrino is possible.
3640

@@ -121,53 +125,55 @@ For conditional compilation, following QNX Neutrino specific attributes are defi
121125

122126
1. Create a `config.toml`
123127

124-
Example content:
128+
Example content:
125129

126-
```toml
127-
profile = "compiler"
128-
change-id = 115898
129-
```
130+
```toml
131+
profile = "compiler"
132+
change-id = 999999
133+
```
130134

131-
2. Compile the Rust toolchain for an `x86_64-unknown-linux-gnu` host (for both `aarch64` and `x86_64` targets)
135+
2. Compile the Rust toolchain for an `x86_64-unknown-linux-gnu` host
132136

133-
Compiling the Rust toolchain requires the same environment variables used for compiling C binaries.
134-
Refer to the [QNX developer manual](https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.prog/topic/devel_OS_version.html).
137+
Compiling the Rust toolchain requires the same environment variables used for compiling C binaries.
138+
Refer to the [QNX developer manual](https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.prog/topic/devel_OS_version.html).
135139

136-
To compile for QNX Neutrino (aarch64 and x86_64) and Linux (x86_64):
140+
To compile for QNX Neutrino, environment variables must be set to use the correct tools and compiler switches:
137141

138-
```bash
139-
export build_env='
140-
CC_i586_pc_nto_qnx700=qcc
141-
CFLAGS_i586_pc_nto_qnx700=-Vgcc_ntox86_cxx
142-
CXX_i586_pc_nto_qnx700=qcc
143-
AR_i586_pc_nto_qnx700=ntox86-ar
144-
145-
CC_aarch64_unknown_nto_qnx710=qcc
146-
CFLAGS_aarch64_unknown_nto_qnx710=-Vgcc_ntoaarch64le_cxx
147-
CXX_aarch64_unknown_nto_qnx710=qcc
148-
AR_aarch64_unknown_nto_qnx710=ntoaarch64-ar
149-
150-
CC_aarch64_unknown_nto_qnx710_iosock=qcc
151-
CFLAGS_aarch64_unknown_nto_qnx710_iosock=-Vgcc_ntoaarch64le_cxx
152-
CXX_aarch64_unknown_nto_qnx710_iosock=qcc
153-
AR_aarch64_unknown_nto_qnx710_iosock=ntoaarch64-ar
154-
155-
CC_aarch64_unknown_nto_qnx700=qcc
156-
CFLAGS_aarch64_unknown_nto_qnx700=-Vgcc_ntoaarch64le_cxx
157-
CXX_aarch64_unknown_nto_qnx700=qcc
158-
AR_aarch64_unknown_nto_qnx700=ntoaarch64-ar
159-
160-
CC_x86_64_pc_nto_qnx710=qcc
161-
CFLAGS_x86_64_pc_nto_qnx710=-Vgcc_ntox86_64_cxx
162-
CXX_x86_64_pc_nto_qnx710=qcc
163-
AR_x86_64_pc_nto_qnx710=ntox86_64-ar
164-
'
142+
- `CC_<target>=qcc`
143+
- `CFLAGS_<target>=<nto_cflag>`
144+
- `CXX_<target>=qcc`
145+
- `AR_<target>=<nto_ar>`
165146

166-
env $build_env \
167-
./x.py build \
168-
--target aarch64-unknown-nto-qnx710_iosock,aarch64-unknown-nto-qnx710,x86_64-pc-nto-qnx710,x86_64-unknown-linux-gnu \
169-
rustc library/core library/alloc library/std
170-
```
147+
With:
148+
149+
- `<target>` target triplet using underscores instead of hyphens, e.g. `aarch64_unknown_nto_qnx710`
150+
- `<nto_cflag>`
151+
152+
- `-Vgcc_ntox86_cxx` for x86 (32 bit)
153+
- `-Vgcc_ntox86_64_cxx` for x86_64 (64 bit)
154+
- `-Vgcc_ntoaarch64le_cxx` for Aarch64 (64 bit)
155+
156+
- `<nto_ar>`
157+
158+
- `ntox86-ar` for x86 (32 bit)
159+
- `ntox86_64-ar` for x86_64 (64 bit)
160+
- `ntoaarch64-ar` for Aarch64 (64 bit)
161+
162+
Example to build the Rust toolchain including a standard library for x86_64-linux-gnu and Aarch64-QNX-7.1:
163+
164+
```bash
165+
export build_env='
166+
CC_aarch64_unknown_nto_qnx710=qcc
167+
CFLAGS_aarch64_unknown_nto_qnx710=-Vgcc_ntoaarch64le_cxx
168+
CXX_aarch64_unknown_nto_qnx710=qcc
169+
AR_aarch64_unknown_nto_qnx710=ntoaarch64-ar
170+
'
171+
172+
env $build_env \
173+
./x.py build \
174+
--target x86_64-unknown-linux-gnu,aarch64-unknown-nto-qnx710 \
175+
rustc library/core library/alloc library/std
176+
```
171177

172178
## Running the Rust test suite
173179

0 commit comments

Comments
 (0)