Repository navigation
Add QNX (target_os = "qnx") support to use_file backend - #878
Closed
csinnott-work wants to merge 1 commit into
Closed
csinnott-work wants to merge 1 commit into
csinnott-work wants to merge 1 commit into
Conversation
QNX systems support a custom target triple `x86_64-pc-qnx` where target_os is "qnx" (distinct from the existing "nto" used by the standard `x86_64-pc-nto-qnx8.0.0` triple). Both "nto" and "qnx" refer to QNX operating systems and use the same APIs: /dev/urandom for randomness and libc::__get_errno_ptr for errno. Changes: - backends.rs: add target_os = "qnx" to the use_file backend cfg block - utils/get_errno.rs: add target_os = "qnx" to the __get_errno_ptr branch - Cargo.toml: add target_os = "qnx" to the use_file libc dependency cfg
Member
|
See #325. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
QNX systems can be targeted with a custom Rust triple
x86_64-pc-qnxwheretarget_osis"qnx". This is distinct from the existing"nto"target os used by the standardx86_64-pc-nto-qnx8.0.0triple, but refers to the same OS family.Without this change, compiling any crate that depends on
getrandomfor theqnxtarget fails with:because neither the
use_filebackend nor theget_errnoutility module recognizetarget_os = "qnx".Changes
src/backends.rs: addtarget_os = "qnx"alongside"nto"in theuse_filebackend cfg blocksrc/utils/get_errno.rs: addtarget_os = "qnx"to the__get_errno_ptrbranch (same function used by QNX/NTO)Cargo.toml: addtarget_os = "qnx"to theuse_filelibc dependency cfg conditionAll three changes mirror the existing
"nto"entries, as both target os values refer to QNX and use the same system APIs.Testing
Built and validated
jiter 0.19.0andpydantic-core 2.50.4(both pyo3-based Rust extensions) forx86_64-pc-qnxusing QNX SDP 8.0. The resulting.sofiles run correctly on QNX 8.0.0.