This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: glibc for 32-bit kernel without __ARCH_WANT_TIME32_SYSCALLS
- From: Alistair Francis <alistair23 at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 21 Jun 2019 10:01:13 -0700
- Subject: Re: glibc for 32-bit kernel without __ARCH_WANT_TIME32_SYSCALLS
- References: <CAKmqyKOK2x=+_AVn48Suxbm66DMc3+DYPEEQQUgRr0k86C-AOg@mail.gmail.com> <87r27nz3hh.fsf@oldenburg2.str.redhat.com>
On Fri, Jun 21, 2019 at 2:34 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Alistair Francis:
>
> > Linux 5.1 has removed the __ARCH_WANT_TIME32_SYSCALLS define for the
> > RISC-V 32-bit port. This means that glibc (with the latest 32-bit
> > RISC-V port submission) fails to build as there are a lot of missing
> > syscalls, __NR_futex is the first one I see.
> >
> > I looked at adjusting the syscalls to use the new 64-bit versions
> > (such as __NR_futex64) but this seems to be a large job with a lot of
> > manual changes. Is there a better way that I should be doing this?
> > Have any other 32-bit architectures removed
> > __ARCH_WANT_TIME32_SYSCALLS or are in the process of removing
> > __ARCH_WANT_TIME32_SYSCALLS?
>
> Maybe look at the x86-64 x32 port? It may make sense to align with that
> and pretend that the time-related system calls are always 64-bit on the
> 32-bit RISC-V port.
Thanks! That does help.
I'm still stuck with handling the syscalls though. For example there
is no __NR_clock_gettime syscall for 32-bit RISC-V, although glibc
relies on it.
I can't see a clean way to use clock_gettime64 on RV32.
Alistair
>
> Thanks,
> Florian