Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
791d71f to
3201966
Compare
|
This PR depends on a newer version of the |
This comment has been minimized.
This comment has been minimized.
You need |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
The commit I need - rust-lang/libc@9934c04 is not yet tagged/released. Or rather there is a |
This comment has been minimized.
This comment has been minimized.
3201966 to
5adcafb
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ah - I see now that it appears in |
This comment has been minimized.
This comment has been minimized.
5adcafb to
caab9c9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
caab9c9 to
3749f50
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3b71a89 to
a2c73d7
Compare
This comment has been minimized.
This comment has been minimized.
|
Hi @joboet I'm taking over this PR from @androm3da. I believe all your comments on the PR have been addressed and I've resolved the merge conflicts with main. Kindly let me know if more changes are needed. I've built and tested this for hexagon-unknown-qurt. |
This comment has been minimized.
This comment has been minimized.
43e9f43 to
84f3301
Compare
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
| // NOTE: this is not guaranteed to run, for example when Rust code is called externally. | ||
| pub unsafe fn init(argc: isize, argv: *const *const u8, _sigpipe: u8) { | ||
| stack_overflow::init(); | ||
| unsafe { crate::sys::args::init(argc, argv) }; |
There was a problem hiding this comment.
This is a noop and can be removed...
| unsafe { crate::sys::args::init(argc, argv) }; |
| #[cfg(target_os = "qurt")] | ||
| pub unsafe fn init(_argc: isize, _argv: *const *const u8) { | ||
| // QuRT goes through the unix PAL's `init`, but has no args to record. | ||
| } | ||
|
|
There was a problem hiding this comment.
... rendering this unnecessary.
| #[cfg(target_os = "qurt")] | |
| pub unsafe fn init(_argc: isize, _argv: *const *const u8) { | |
| // QuRT goes through the unix PAL's `init`, but has no args to record. | |
| } |
| // SAFETY: must be called only once during runtime initialization. | ||
| // NOTE: this is not guaranteed to run, for example when Rust code is called externally. | ||
| pub unsafe fn init(argc: isize, argv: *const *const u8, _sigpipe: u8) { | ||
| stack_overflow::init(); |
There was a problem hiding this comment.
And this, too, is redundant.
| #[path = "../unix/stack_overflow.rs"] | ||
| pub mod stack_overflow; |
There was a problem hiding this comment.
| #[path = "../unix/stack_overflow.rs"] | |
| pub mod stack_overflow; |
There was a problem hiding this comment.
I decided not to remove this since qurt still reuses some of unix's thread code and removing this will cause an error on this line. I did, however, update the stale path.
| #[path = "../unix/thread_parking.rs"] | ||
| pub mod thread_parking; |
There was a problem hiding this comment.
This is only relevant for NetBSD.
| #[path = "../unix/thread_parking.rs"] | |
| pub mod thread_parking; |
There was a problem hiding this comment.
Since there is now a dedicated PAL module, the changes here can be undone.
|
|
||
| cfg_select! { | ||
| unix => { | ||
| any(unix, target_os = "qurt") => { |
There was a problem hiding this comment.
This seems fishy – the QuRT module will not be used if this conditional is present.
There was a problem hiding this comment.
You are right, the QuRT PAL module was not being selected.
Fixed this and removed all (now-pointless) QuRT opt-ins from pal/unix/mod.rs
QuRT is not a unix target, but provides POSIX-compatible threading, file I/O and synchronization. Drop the unix family from the target spec and instead opt into the unix PAL, selecting the unix implementation of each subsystem where QuRT's POSIX layer is sufficient. This follows the pattern used by other unix-adjacent targets. Process spawning, networking and pipes remain unsupported.
Update documentation with details about how to leverage qurt, now that there's some level of libstd support
The SDK's `libc_eh.a` unwinder does not define `_Unwind_GetIPInfo`, which `eh_personality` needs on every frame, so unwinding cannot work as it stands: the linker stub the docs previously recommended aborts on the first frame. Set `panic_strategy = Abort` and keep the target out of the personality and `libunwind` arms, as Hermit and UEFI do; `panic_unwind` already falls through to its aborting implementation. The `_Unwind_*` linker stubs are no longer needed, so drop them from the documented link flags.
QuRT is not a unix target, but provides POSIX-compatible threading, file I/O and synchronization. Drop the unix family from the target spec and instead opt into the unix PAL, selecting the unix implementation of each subsystem where QuRT has sufficient POSIX compatibility. Process spawning, networking and pipes remain unsupported.
84f3301 to
831243f
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. |
|
@rustbot ready |
View all comments
QuRT is not a unix target but provides POSIX-compatible threading, file I/O, and synchronization APIs. This implementation does not declare unix as a target family. Instead, it explicitly opts into the unix PAL and selects unix-based implementations for individual subsystems where QuRT's POSIX layer is sufficient.
Supported: alloc, threading, mutex, condvar, rwlock, once, thread parking, TLS, file system, file descriptors, stdio, I/O slices, I/O errors, is_terminal, env, paths, time, exit, personality/unwinding, backtrace
Stubbed; returns Err: process spawning, networking, pipes, hostname
Stubbed; returns empty: command-line args
Stubbed; panics: random
Platform modules: