-
Notifications
You must be signed in to change notification settings - Fork 13.7k
fix(std): Fix undefined reference to __my_thread_exit on QNX 8.0 #144354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
58ae39f
to
43fab36
Compare
This seems reasonable to me, pinging the target maintainers to make sure: @flba-eb @jonathanpallant |
In general I think this is fine. Instead of excluding QNX8.0 it could be better to only include QNX 7.0 and 7.1: If the new implementation is more modern than the previous one as @rafaeling suggests, it is likely future versions will keep the new behavior. Hence I suggest to use Currently, only QNX 7.0 and 7.1 are supported by Rust (and stack unwinding probably only in 7.1). |
To incorperate the above feedback, (please squash after) |
Reminder, once the PR becomes ready for a review, use |
This commit adds an empty stub for the function for QNX 8 targets. This symbol is required by the unwinder but is not present, causing a linking failure when building with the standard library. Address review feedback: use whitelist for QNX versions
43fab36
to
17c8667
Compare
This PR was rebased onto a different master 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. |
LGTM but I'll wait for @flba-eb to ack |
It's been a few days, seems like this is a pretty sever bug so let's get the fix in. @bors r+ rollup |
Rollup of 9 pull requests Successful merges: - #143713 (Add a mailmap entry for gnzlbg) - #144275 (implement Sum and Product for Saturating(u*)) - #144354 (fix(std): Fix undefined reference to __my_thread_exit on QNX 8.0) - #145387 (Remove TmpLayout in layout_of_enum) - #145793 (std library: use execinfo library also on NetBSD.) - #145884 (Test `instrument-mcount` codegen) - #145947 (Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml`) - #145972 (fix `core::marker::Destruct` doc) - #145977 (tests: Ignore basic-stepping.rs on riscv64) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #144354 - rafaeling:fix-142726-qnx8-link-fail, r=tgross35 fix(std): Fix undefined reference to __my_thread_exit on QNX 8.0 When cross-compiling for the x86_64/aarch64-unknown-nto-qnx800 target (QNX SDP 8.0), the build fails during the final link stage with the error: ``` error: linking with `qcc` failed: exit status: 1 ... = note: undefined reference to `__my_thread_exit' ``` - **On QNX 7.1**: The __my_thread_exit symbol is defined and exported by the main C library (libc.a/libc.so). The std backtrace code can therefore successfully take its address at compile time. - **On QNX 8.0**: As part of a toolchain modernization, this symbol has been refactored. It is no longer present in any of the standard system libraries (.a or .so). This patch addresses the problem at its source by conditionally compiling the problematic code. Fixes #142726
Already merged. |
When cross-compiling for the x86_64/aarch64-unknown-nto-qnx800 target (QNX SDP 8.0), the build fails during the final link stage with the error:
On QNX 7.1: The __my_thread_exit symbol is defined and exported by the main C library (libc.a/libc.so). The std backtrace code can therefore successfully take its address at compile time.
On QNX 8.0: As part of a toolchain modernization, this symbol has been refactored. It is no longer present in any of the standard system libraries (.a or .so).
This patch addresses the problem at its source by conditionally compiling the problematic code.
Fixes #142726