-
Notifications
You must be signed in to change notification settings - Fork 1.2k
netbsd/riscv64.rs: make changes so that this builds again. #4886
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
base: main
Are you sure you want to change the base?
Conversation
At least the rust compiler 1.92.0 cross-builds for this target with this version of the file.
...to something which also passes the upstream automated checks. Pull request submitted at rust-lang/libc#4886
...and let each machine definition implement their own of the latter,
instead of c_uchar which is inconsistent with the C implementation.
This allows us to fix the errors from
$ cd libc-test; cargo test
...
bad `pthread_spin_t` size: rust: 1 != c 4
bad `pthread_spin_t` align: rust: 1 != c 4
bad `__cpu_simple_lock_nv_t` signed: rust: 1 != c 0
size of `pthread_spin_t` is 4 in C and 1 in Rust
* Use the same type names as used by the native libc, to allow more self-tests to succeed * Eliminate use of s! and s_no_extra_traits! * Move type definitions up before their use * Remove un-needed imports, uncovered by libc's "cargo test" * Hardwire _ALIGNBYTES to what't it's in C instead of a dynamic erroneous define. THis now makes all the libc self-tests succeed.
|
Not sure how those two failing CI jobs can be related to my proposed changes... |
|
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. |
…finition. This is already part of pull request rust-lang#4886 which is yet to be applied.
Evidently caused by what I had not done (merged upstream 'main' branch into mine). |
Description
These are changes which appear to be required to get this file to build (and cross-build) again.
Admittedly, some of the additions are based on error messages emitted by the rustc compiler.
Sources
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI