Enable clone3() syscall on SPARC which was added in Linux v7.0#4980
Enable clone3() syscall on SPARC which was added in Linux v7.0#4980glaubitz wants to merge 1 commit into
Conversation
9cf0194 to
b44535f
Compare
This comment has been minimized.
This comment has been minimized.
|
Deleting the comments in src/ is fine, but we of course can't unskip the tests until things pass. Could you just update that comment to mention the kernel version? Also, do you have a link to the relevant source? |
Ah, I wasn't aware that the tests are run against the kernel headers. So, I guess I will wait with the PR until the build environment for the CI is recent enough. I don't think it makes much sense to just remove the comments for now.
The commit to add clone3() for SPARC is this one: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/sparc?id=2153b2e8917b73e9e7fae8963f03b8e60bd8f5ff It requires an additional fix to land first: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/sparc?id=e38eba3b77878ada327a572a41596a3b0b44e522 |
|
In that case, @rustbot blocked Should be able to update once https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md bumps the kernel version, or probably once the 26.04 images are out. |
|
Linux kernel v7.0 was released last week, so we might be able to merge this once Rust's CI has been updated to use the latest Linux kernel sources. |
This comment has been minimized.
This comment has been minimized.
b44535f to
c9b00b2
Compare
This comment has been minimized.
This comment has been minimized.
|
This should work after #5177 |
|
@rustbot author I think if you rebase, the tests should pass |
|
Reminder, once the PR becomes ready for a review, use |
Starting with version 7.0, the Linux kernel gained support for clone3() on SPARC. Thus, it can be enabled in libc now.
c9b00b2 to
a96142a
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. |
Rebased and force-pushed. |
|
Not sure why it fails on the CI, it works for me locally on a sparc64-linux host: (sid_sparc64-dchroot)glaubitz@stadler:~/libc$ uname -a
Linux stadler 7.1.0-rc1+ #2 SMP Sun May 3 07:56:50 UTC 2026 sparc64 GNU/Linux
(sid_sparc64-dchroot)glaubitz@stadler:~/libc$ git branch
master
* sparc-clone3-enable
(sid_sparc64-dchroot)glaubitz@stadler:~/libc$ cargo build
Compiling libc v1.0.0-alpha.3 (/home/glaubitz/libc)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.08s
(sid_sparc64-dchroot)glaubitz@stadler:~/libc$ cargo test
Compiling libc v1.0.0-alpha.3 (/home/glaubitz/libc)
Finished `test` profile [unoptimized + debuginfo] target(s) in 10.53s
Running unittests src/lib.rs (target/debug/deps/libc-c55ff6801c333c33)
running 6 tests
test macros::tests::c_enum_basic ... ok
test macros::tests::c_enum_multiple_set_value ... ok
test macros::tests::c_enum_set_value ... ok
test macros::tests::c_enum_repr ... ok
test macros::tests::c_enum_vis ... ok
test macros::tests::test_offset_of ... ok
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/const_fn.rs (target/debug/deps/const_fn-43ca8a932c87d555)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests libc
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
(sid_sparc64-dchroot)glaubitz@stadler:~/libc$ |
clone3() has been added for SPARC in Linux v7.0, thus enable it.