Skip to content

Commit 2ef8496

Browse files
QNX target renaming
- aarch64-unknown-nto-qnx800 becomes simply aarch64-unknown-qnx - x86_64-pc-nto-qnx800 becomes simply x86_64-pc-qnx - references to QNX OS and QNX Neutrino RTOS are replaced with QNX SDP for uniformity - various nto_qnx modules are named to qnx_sdp to match the above The new target names are more consistent with those used by the QNX SDP 8.0 toolchain, and reflect a level on ongoing API stability similar to that for macOS and Linux (which simply have minimum supported versions record for their targets). Once the compiler knows about the new target names, libc and backtrace can be updated to match, and then building libstd for the new targets can be fixed. With these changes I can run: ```console $ ./x build library/std --stage 2 --target x86_64-pc-nto-qnx710,aarch64-unknown-nto-qnx710,x86_64-pc-nto-qnx710_iosock,aarch64-unknown-nto-qnx710_iosock,aarch64-unknown-nto-qnx700 $ ./x build library/core --stage 1 --target x86_64-pc-qnx,aarch64-unknown-qnx ```
1 parent eb6346c commit 2ef8496

53 files changed

Lines changed: 229 additions & 181 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

compiler/rustc_target/src/spec/base/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ pub(crate) mod managarm_mlibc;
2626
pub(crate) mod motor;
2727
pub(crate) mod msvc;
2828
pub(crate) mod netbsd;
29-
pub(crate) mod nto_qnx;
3029
pub(crate) mod openbsd;
30+
pub(crate) mod qnx_sdp;
3131
pub(crate) mod redox;
3232
pub(crate) mod solaris;
3333
pub(crate) mod solid;
File renamed without changes.

compiler/rustc_target/src/spec/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,10 +1790,10 @@ supported_targets! {
17901790
("aarch64-unknown-nto-qnx700", aarch64_unknown_nto_qnx700),
17911791
("aarch64-unknown-nto-qnx710", aarch64_unknown_nto_qnx710),
17921792
("aarch64-unknown-nto-qnx710_iosock", aarch64_unknown_nto_qnx710_iosock),
1793-
("aarch64-unknown-nto-qnx800", aarch64_unknown_nto_qnx800),
1793+
("aarch64-unknown-qnx", aarch64_unknown_qnx),
17941794
("x86_64-pc-nto-qnx710", x86_64_pc_nto_qnx710),
17951795
("x86_64-pc-nto-qnx710_iosock", x86_64_pc_nto_qnx710_iosock),
1796-
("x86_64-pc-nto-qnx800", x86_64_pc_nto_qnx800),
1796+
("x86_64-pc-qnx", x86_64_pc_qnx),
17971797
("i686-pc-nto-qnx700", i686_pc_nto_qnx700),
17981798

17991799
("aarch64-unknown-linux-ohos", aarch64_unknown_linux_ohos),
@@ -1994,6 +1994,7 @@ crate::target_spec_enum! {
19941994
OpenBsd = "openbsd",
19951995
Psp = "psp",
19961996
Psx = "psx",
1997+
Qnx = "qnx",
19971998
Qurt = "qurt",
19981999
Redox = "redox",
19992000
Rtems = "rtems",
@@ -2034,7 +2035,6 @@ crate::target_spec_enum! {
20342035
Nto70 = "nto70",
20352036
Nto71 = "nto71",
20362037
Nto71IoSock = "nto71_iosock",
2037-
Nto80 = "nto80",
20382038
Ohos = "ohos",
20392039
Relibc = "relibc",
20402040
Sgx = "sgx",
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
use crate::spec::base::nto_qnx;
1+
use crate::spec::base::qnx_sdp;
22
use crate::spec::{Env, Target};
33

44
pub(crate) fn target() -> Target {
5-
let mut target = nto_qnx::aarch64();
6-
target.metadata.description = Some("ARM64 QNX Neutrino 7.0 RTOS".into());
5+
let mut target = qnx_sdp::aarch64();
6+
target.metadata.description = Some("ARM64 QNX SDP 7.0".into());
77
target.options.pre_link_args =
8-
nto_qnx::pre_link_args(nto_qnx::ApiVariant::Default, nto_qnx::Arch::Aarch64);
8+
qnx_sdp::pre_link_args(qnx_sdp::ApiVariant::Default, qnx_sdp::Arch::Aarch64);
9+
// for QNX SDP 7.x, we keep target_os = "nto" for backwards compatibility, and use target_env to specify which version
910
target.options.env = Env::Nto70;
1011
target
1112
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::nto_qnx;
1+
use crate::spec::base::qnx_sdp;
22
use crate::spec::{Env, Target};
33

44
pub(crate) fn target() -> Target {
5-
let mut target = nto_qnx::aarch64();
6-
target.metadata.description =
7-
Some("ARM64 QNX Neutrino 7.1 RTOS with io-pkt network stack".into());
5+
let mut target = qnx_sdp::aarch64();
6+
target.metadata.description = Some("ARM64 QNX SDP 7.1 with io-pkt network stack".into());
87
target.options.pre_link_args =
9-
nto_qnx::pre_link_args(nto_qnx::ApiVariant::Default, nto_qnx::Arch::Aarch64);
8+
qnx_sdp::pre_link_args(qnx_sdp::ApiVariant::Default, qnx_sdp::Arch::Aarch64);
9+
// for QNX SDP 7.x, we keep target_os = "nto" for backwards compatibility, and use target_env to specify which version
1010
target.options.env = Env::Nto71;
1111
target
1212
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::nto_qnx;
1+
use crate::spec::base::qnx_sdp;
22
use crate::spec::{Env, Target};
33

44
pub(crate) fn target() -> Target {
5-
let mut target = nto_qnx::aarch64();
6-
target.metadata.description =
7-
Some("ARM64 QNX Neutrino 7.1 RTOS with io-sock network stack".into());
5+
let mut target = qnx_sdp::aarch64();
6+
target.metadata.description = Some("ARM64 QNX SDP 7.1 with io-sock network stack".into());
87
target.options.pre_link_args =
9-
nto_qnx::pre_link_args(nto_qnx::ApiVariant::IoSock, nto_qnx::Arch::Aarch64);
8+
qnx_sdp::pre_link_args(qnx_sdp::ApiVariant::IoSock, qnx_sdp::Arch::Aarch64);
9+
// for QNX SDP 7.x, we keep target_os = "nto" for backwards compatibility, and use target_env to specify which version
1010
target.options.env = Env::Nto71IoSock;
1111
target
1212
}

compiler/rustc_target/src/spec/targets/aarch64_unknown_nto_qnx800.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use crate::spec::base::qnx_sdp;
2+
use crate::spec::{Os, Target};
3+
4+
pub(crate) fn target() -> Target {
5+
let mut target = qnx_sdp::aarch64();
6+
target.metadata.description = Some("ARM64 QNX SDP 8.0+".into());
7+
target.options.pre_link_args =
8+
qnx_sdp::pre_link_args(qnx_sdp::ApiVariant::Default, qnx_sdp::Arch::Aarch64);
9+
// for QNX SDP 8.0, we have target_os = "qnx" and no target_env
10+
target.options.os = Os::Qnx;
11+
target
12+
}
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use crate::spec::base::nto_qnx;
1+
use crate::spec::base::qnx_sdp;
22
use crate::spec::{Arch, Env, RustcAbi, StackProbeType, Target, TargetOptions, base};
33

44
pub(crate) fn target() -> Target {
5-
let mut meta = nto_qnx::meta();
6-
meta.description = Some("32-bit x86 QNX Neutrino 7.0 RTOS".into());
5+
let mut meta = qnx_sdp::meta();
6+
meta.description = Some("32-bit x86 QNX SDP 7.0".into());
77
meta.std = Some(false);
88
Target {
99
llvm_target: "i586-pc-unknown".into(),
@@ -17,14 +17,15 @@ pub(crate) fn target() -> Target {
1717
rustc_abi: Some(RustcAbi::X86Sse2),
1818
cpu: "pentium4".into(),
1919
max_atomic_width: Some(64),
20-
pre_link_args: nto_qnx::pre_link_args(
21-
nto_qnx::ApiVariant::Default,
22-
nto_qnx::Arch::I586,
20+
pre_link_args: qnx_sdp::pre_link_args(
21+
qnx_sdp::ApiVariant::Default,
22+
qnx_sdp::Arch::I586,
2323
),
24+
// for QNX SDP 7.x, we keep target_os = "nto" for backwards compatibility, and use target_env to specify which version
2425
env: Env::Nto70,
2526
vendor: "pc".into(),
2627
stack_probes: StackProbeType::Inline,
27-
..base::nto_qnx::opts()
28+
..base::qnx_sdp::opts()
2829
},
2930
}
3031
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use crate::spec::base::nto_qnx;
1+
use crate::spec::base::qnx_sdp;
22
use crate::spec::{Env, Target};
33

44
pub(crate) fn target() -> Target {
5-
let mut target = nto_qnx::x86_64();
6-
target.metadata.description =
7-
Some("x86 64-bit QNX Neutrino 7.1 RTOS with io-pkt network stack".into());
5+
let mut target = qnx_sdp::x86_64();
6+
target.metadata.description = Some("x86 64-bit QNX SDP 7.1 with io-pkt network stack".into());
87
target.options.pre_link_args =
9-
nto_qnx::pre_link_args(nto_qnx::ApiVariant::Default, nto_qnx::Arch::X86_64);
8+
qnx_sdp::pre_link_args(qnx_sdp::ApiVariant::Default, qnx_sdp::Arch::X86_64);
9+
// for QNX SDP 7.x, we keep target_os = "nto" for backwards compatibility, and use target_env to specify which version
1010
target.options.env = Env::Nto71;
1111
target
1212
}

0 commit comments

Comments
 (0)