Message ID | 381d1ef50e78d85ef07761f6041fec544d430b01.1597243100.git.alistair.francis@wdc.com |
---|---|
State | New |
Headers | show |
Series | glibc port for 32-bit RISC-V (RV32) | expand |
On Wed, 12 Aug 2020, Alistair Francis wrote: > diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h > index fbc2436691..292484b303 100644 > --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h > +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h > @@ -22,6 +22,29 @@ > #include <sysdeps/unix/sysv/linux/generic/sysdep.h> > #include <tls.h> > > +#if __WORDSIZE == 32 > + > +/* Workarounds for generic code needing to handle 64-bit time_t. */ > + > +/* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c. */ > +#define __NR_clock_getres __NR_clock_getres_time64 > +/* Fix sysdeps/nptl/lowlevellock-futex.h. */ > +#define __NR_futex __NR_futex_time64 > +/* Fix sysdeps/unix/sysv/linux/pause.c. */ > +#define __NR_ppoll __NR_ppoll_time64 > +/* Fix sysdeps/unix/sysv/linux/select.c. */ > +#define __NR_pselect6 __NR_pselect6_time64 > +/* Fix sysdeps/unix/sysv/linux/recvmmsg.c. */ > +#define __NR_recvmmsg __NR_recvmmsg_time64 > +/* Fix sysdeps/unix/sysv/linux/sigtimedwait.c. */ > +#define __NR_rt_sigtimedwait __NR_rt_sigtimedwait_time64 > +/* Fix sysdeps/unix/sysv/linux/semtimedop.c. */ > +#define __NR_semtimedop __NR_semtimedop_time64 > +/* Hack sysdeps/unix/sysv/linux/generic/utimes.c. */ > +#define __NR_utimensat __NR_utimensat_time64 > + > +#endif /* __WORDSIZE == 32 */ > + > #undef SYS_ify > #define SYS_ify(syscall_name) __NR_##syscall_name Please keep the redefinition at the top so that it is more prominent to the reader. IOW insert the new part below it. Otherwise OK. Maciej
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index fbc2436691..292484b303 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -22,6 +22,29 @@ #include <sysdeps/unix/sysv/linux/generic/sysdep.h> #include <tls.h> +#if __WORDSIZE == 32 + +/* Workarounds for generic code needing to handle 64-bit time_t. */ + +/* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c. */ +#define __NR_clock_getres __NR_clock_getres_time64 +/* Fix sysdeps/nptl/lowlevellock-futex.h. */ +#define __NR_futex __NR_futex_time64 +/* Fix sysdeps/unix/sysv/linux/pause.c. */ +#define __NR_ppoll __NR_ppoll_time64 +/* Fix sysdeps/unix/sysv/linux/select.c. */ +#define __NR_pselect6 __NR_pselect6_time64 +/* Fix sysdeps/unix/sysv/linux/recvmmsg.c. */ +#define __NR_recvmmsg __NR_recvmmsg_time64 +/* Fix sysdeps/unix/sysv/linux/sigtimedwait.c. */ +#define __NR_rt_sigtimedwait __NR_rt_sigtimedwait_time64 +/* Fix sysdeps/unix/sysv/linux/semtimedop.c. */ +#define __NR_semtimedop __NR_semtimedop_time64 +/* Hack sysdeps/unix/sysv/linux/generic/utimes.c. */ +#define __NR_utimensat __NR_utimensat_time64 + +#endif /* __WORDSIZE == 32 */ + #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name