@@ -22,6 +22,8 @@ Currently, the following QNX Neutrino versions and compilation targets are suppo
22
22
23
23
| QNX Neutrino Version | Target Architecture | Full support | ` no_std ` support |
24
24
| ----------------------| ---------------------| :------------:| :----------------:|
25
+ | 8.0 | AArch64 | ? | ✓ |
26
+ | 8.0 | x86 | ? | ✓ |
25
27
| 7.1 with io-pkt | AArch64 | ✓ | ✓ |
26
28
| 7.1 with io-sock | AArch64 | ? | ✓ |
27
29
| 7.1 with io-pkt | x86_64 | ✓ | ✓ |
@@ -31,6 +33,8 @@ Currently, the following QNX Neutrino versions and compilation targets are suppo
31
33
32
34
On QNX 7.0 and 7.1, ` io-pkt ` is used as network stack by default. QNX 7.1 includes
33
35
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.
34
38
35
39
Adding other architectures that are supported by QNX Neutrino is possible.
36
40
@@ -121,53 +125,55 @@ For conditional compilation, following QNX Neutrino specific attributes are defi
121
125
122
126
1 . Create a ` config.toml `
123
127
124
- Example content:
128
+ Example content:
125
129
126
- ``` toml
127
- profile = " compiler"
128
- change-id = 115898
129
- ```
130
+ ``` toml
131
+ profile = " compiler"
132
+ change-id = 999999
133
+ ```
130
134
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
132
136
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).
135
139
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 :
137
141
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>`
165
146
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
+ ```
171
177
172
178
# # Running the Rust test suite
173
179
0 commit comments