QNX target renaming#158449
Conversation
|
These commits modify compiler targets.
cc @rust-lang/miri Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb |
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Fixing those stderr failures now. |
- 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 ```
444b00b to
2ef8496
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
The name of the OS had changed, so the tests needed updating
There was a problem hiding this comment.
Can we get a comment in some file explaining that "SDP" implies, functionally, both "the C toolchain" and "the libc"? Or a clarification on that relationship, if that's off? Perhaps one of the std::sys files or on the platform support page? I think it is implied by the current text but with more emphasis on the term it feels a bit more ambiguous, ironically, via repetition.
I skimmed over things and everything seems fine otherwise, though it may benefit from another scan. Mostly just nits and me going "that's odd... eh, doesn't matter, right?"
There was a problem hiding this comment.
...shouldn't it be aarch64-blackberry-qnx...? ...Well, I'm not gonna push on that, they can pretend no one knows who they are if that's how they want to brand things. :^)
| @@ -1,15 +1,8 @@ | |||
| # nto-qnx | |||
| # Q | |||
There was a problem hiding this comment.
Q?
| # Q | |
| # QNX |
| target_os = "haiku", target_os = "nto", | ||
| target_os = "cygwin", | ||
| target_os = "qnx", target_os = "cygwin", |
There was a problem hiding this comment.
A quirk of the current irregular shape is that "pairs" of OS that "resemble each other" are grouped onto the same line, so maybe "target_os = "nto" should be on the same line as target_os = "qnx"? But I don't know how intentional that is.
| For building or using the Rust toolchain for QNX, the relevant version of the [QNX Software Development Platform (SDP)] must be installed and initialized. | ||
| Initialization is usually done by sourcing `qnxsdp-env.sh` (this will be installed as part of the SDP, see also installation instruction provided with the SDP). | ||
| Afterwards [`qcc`](https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.utilities/topic/q/qcc.html) (QNX C/C++ compiler) | ||
| Afterwards [`qcc`](https://www.qnx.com/developers/docs/8.0/com.qnx.doc.neutrino.utilities/topic/q/qcc.html) (the QNX C/C++ compiler) |
There was a problem hiding this comment.
there isn't a "latest version" link, is there?
|
☔ The latest upstream changes (presumably #158508) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
How about if I take the text from the PR description and put it on the QNX target doc page? But you are right, the SDP contains a C toolchain, libc, other libraries, headers - all the ingredients to build your own OS image. |
That is absolutely fine! |
|
r? workingjubilee |
|
|
This PR renames two QNX targets:
aarch64-unknown-nto-qnx800becomes simplyaarch64-unknown-qnxx86_64-pc-nto-qnx800becomes simplyx86_64-pc-qnxIn addition:
spec::base::nto_qnxmodule is renamed tobase::spec::qnx_sdpto match the abovetarget_osof the QNX SDP 8.0 targets is changed toqnxto match the target nameany(target_os = "nto", target_os = "qnx")I think it's worth noting that QNX Software Development Platform is the build environment that you download and install, and you can use it to create a custom run-time environment. In SDP 7.x the run-time environment was based on QNX Neutrino 7.x, but in SDP 8.0 the run-time environment is based on QNX OS 8.0. I think it was weird to users to see the two different run-time environments in the docs, and referring to the build environment just seems to make more sense anyway because that's what users install, it's where the headers live, and ultimately it's what the toolchain will care about.
The new target names match those reported by
clangrunning on the self-hosted QNX Developer Desktop.Once the compiler knows about the new target names,
libc,backtraceandcc-rscan be updated to match, and then buildinglibstdfor the new targets can be fixed. This rename will cause a bit of churn, but it seemed important to get it changed before anyone tries to finish libstd support for QNX SDP 8.0 (it's currently noted as "in-progress"). It's also Tier 3 so we have fairly broad latitude to do this I think, and aligning with QNX's build of clang just makes sense.With these changes I can run:
The QNX SDP 7.x targets retain their old names, and their
target_os = "nto", target_env = "qnx710"configuration, to avoid breakage.