-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Improved std support for ps vita target #111819
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
These commits modify compiler targets. |
r? @Amanieu |
Found some issues related to incorrect bindings for vita in libc, converting this to a draft until I resolve it all. |
Fixed vita libc definitions This fixes definitions that were incorrect in my initial PR (#3209). As with the previous one, this relies on open-source newlib implementation and doesn't use Sony internal API's or expose Sony internal data structures. This fixes: - fs API that uses `dirent` and stat - sockets - pthreads A couple of explanations - Unfortunately `dirent` in vita newlib is not very POSIX'y, before `d_name` it has a field with an internal data structure, which is of no use for std (no inodes, no file type inside), so I've just stubbed it as an `__offset`. Also, Vita doesn't expose inodes - `dirent` doesn't have it at all, and in `stat` it is always `0`. I am not sure what would be the best approach here. Maybe I should move the POSIX `dirent` to `generic.rs` and reexpose it in all targets, and redefine it in `vita/mod.rs`? - All pthread types on Vita are pointers, and the backing data structure is allocated by corresponding init functions, so their sizeof's are all 4. I also changed `pthread_attr_t` and `pthread_rwlockattr_t` to reflect their sizes and not be constant. May be in relation to rust-lang/rust#95496 it would be better to move existing thread definitions to generic, and for vita specifically make them pointer types instead of byte arrays. The fixes in std will be in rust-lang/rust#111819
This comment has been minimized.
This comment has been minimized.
Waiting for libc to be released, then I'll bump the version and undraft the pr. |
This comment has been minimized.
This comment has been minimized.
You need to submit a PR to libc to bump the version number if you need a new release. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Update crate version to 0.2.145 #3255 is a prerequisite for rust-lang/rust#111819
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
@bors r+ |
Improved std support for ps vita target Fixed a couple of things in std support for ps vita via Vita SDK newlib oss implementation: - Added missing hardware features to target spec - Compile in thumb by default (newlib is also compiled in thumb) - Fixed fs calls. Vita newlib has a not-very-posix dirent. Also vita does not expose inodes, it's stubbed as 0 in stat, and I'm stubbing it here for dirent (because vita newlibs's dirent doesn't even have that field) - Enabled signal handlers for panic unwinding - Dropped static link requirement from the platform support md. Also, rearranged sections to better stick with the template.
this probably caused a CI failure on musl on the rollup: #112336 (comment) |
Seems to be related to libc upgrade and rust-lang/libc#2935 Unix definition of |
Looks like rust-lang/libc#3264. |
There is a PR in libc to fix this: rust-lang/libc#3265 Once it is merged, submit another PR to libc to update the version number (feel free to r? me). |
Failed to set assignee to
|
Bumped libc version, an issue that caused CI failure on musl should be fixed. |
@bors r+ |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
Finished benchmarking commit (b3dd578): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 647.65s -> 647.662s (0.00%) |
Fixed a couple of things in std support for ps vita via Vita SDK newlib oss implementation: