linux: fix unusable riscv32 GNU syscall numbers - #5455
Open
xjtu-ctgg wants to merge 1 commit into
Open
Conversation
RISC-V 32-bit only provides time64 variants for these syscalls. Use the time64 syscall numbers and remove the generic names that refer to unavailable time32 syscalls. Sources: https://github.com/torvalds/linux/blob/v7.1/arch/riscv/kernel/Makefile.syscalls https://github.com/torvalds/linux/blob/v7.1/include/uapi/asm-generic/unistd.h#L269 https://github.com/bminor/glibc/blob/glibc-2.42/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h#L64-L68 Closes rust-lang#5379
This comment has been minimized.
This comment has been minimized.
xjtu-ctgg
force-pushed
the
fix-riscv32-gnu-time64-syscalls-5379
branch
from
August 31, 2026 16:31
f2e3ed9 to
6d8d553
Compare
This comment has been minimized.
This comment has been minimized.
tgross35
requested changes
Aug 31, 2026
Comment on lines
+758
to
+777
|
|
||
| // Plain syscalls aliased to their time64 variants | ||
| pub const SYS_clock_gettime: c_long = SYS_clock_gettime64; | ||
| pub const SYS_clock_settime: c_long = SYS_clock_settime64; | ||
| pub const SYS_clock_adjtime: c_long = SYS_clock_adjtime64; | ||
| pub const SYS_clock_getres: c_long = SYS_clock_getres_time64; | ||
| pub const SYS_clock_nanosleep: c_long = SYS_clock_nanosleep_time64; | ||
| pub const SYS_timer_gettime: c_long = SYS_timer_gettime64; | ||
| pub const SYS_timer_settime: c_long = SYS_timer_settime64; | ||
| pub const SYS_timerfd_gettime: c_long = SYS_timerfd_gettime64; | ||
| pub const SYS_timerfd_settime: c_long = SYS_timerfd_settime64; | ||
| pub const SYS_utimensat: c_long = SYS_utimensat_time64; | ||
| pub const SYS_pselect6: c_long = SYS_pselect6_time64; | ||
| pub const SYS_ppoll: c_long = SYS_ppoll_time64; | ||
| pub const SYS_recvmmsg: c_long = SYS_recvmmsg_time64; | ||
| pub const SYS_mq_timedsend: c_long = SYS_mq_timedsend_time64; | ||
| pub const SYS_mq_timedreceive: c_long = SYS_mq_timedreceive_time64; | ||
| pub const SYS_rt_sigtimedwait: c_long = SYS_rt_sigtimedwait_time64; | ||
| pub const SYS_futex: c_long = SYS_futex_time64; | ||
| pub const SYS_sched_rr_get_interval: c_long = SYS_sched_rr_get_interval_time64; |
Member
There was a problem hiding this comment.
Could you preserve the existing ordering?
Author
There was a problem hiding this comment.
Thanks, updated. The generic names are now removed rather than aliased, and the *_time64 constants stay in their original positions. I also rebased onto the latest main. (^^;
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
xjtu-ctgg
force-pushed
the
fix-riscv32-gnu-time64-syscalls-5379
branch
from
September 1, 2026 01:41
6d8d553 to
4fe2850
Compare
Collaborator
|
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. |
Author
|
@rustbot ready |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix the syscall definitions for
riscv32gc-unknown-linux-gnu.RISC-V 32-bit does not provide the old time32 syscall implementations. This updates the GNU riscv32 module to use the corresponding time64 syscall numbers and removes the generic names that refer to unavailable time32 syscalls.
Closes #5379
Sources
Tests
cargo +nightly-2026-08-23 test --workspacepython3 ci/verify-build.py --toolchain nightly-2026-08-23 --only riscv32gc-unknown-linux-gnucargo +nightly-2026-08-23 fmt --checkgit diff --check