unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [RFC v2 00/20]  RISC-V glibc port for the 32-bit
@ 2019-06-25  0:08 Alistair Francis
  2019-06-25  0:08 ` [RFC v2 01/20] y2038: Introduce internal for glibc struct __timespec64 Alistair Francis
                   ` (21 more replies)
  0 siblings, 22 replies; 107+ messages in thread
From: Alistair Francis @ 2019-06-25  0:08 UTC (permalink / raw)
  To: libc-alpha
  Cc: arnd, adhemerval.zanella, fweimer, palmer, macro, zongbox, zong,
	alistair.francis, alistair23

This patch set contains the glibc port for the 32-bit RISC-V.

This is based on all of the work that Zong Li has done [1].

Unfortunately the Linux ABI has changed since Zong Li's latest
submission. The RISC-V 32-bit (RV32) ABI no longer defines
__ARCH_WANT_TIME32_SYSCALLS which means there are no 32-bit versions of
time_t, off_t or any struct resource or system calls that use them.

To mitigate this I have set the RV32 port to use 64-bit time_t and off_t
(as is done in x86-32) and also changed the syscall imvocation to handle
the missing syscalls.

The first 3 patches are from Lukasz and have been sent upstream before
[2].

The 4th patch is a fixup required ontop of Lukasz's patches.

Patches 5 to 9 are generic ways of handling the missing syscall functions.
Patch 11 changes all RISC-V implementations to use 64-bit time_t and off_t.

I have tested this series by building a buildroot kernel and rootFS
using these glibc patches and an upstream 5.1.12 kernel for RV32. I see
hangs because of patch 8.

Patch 8 (waitid) seems to cause hangs that I haven't debugged yet, it
seems like we aren't handing the wait() functions correctly. Any help
with this would be great.

The last patch is a hack to forcefully rename the remaining system calls
that are causing compiller failures to the 64-bit versions. This is
obviously not the correct way to do this. I would like some feedback on
this series to find the upstream approved way to use the 64-bit
versions then I will extend that to these remaining functions.

The ChangeLog will need to be updated as well, so don't worry too much
about that.

Feedback on this series is very welcome!

1: https://sourceware.org/ml/libc-alpha/2018-07/msg00892.html
2: https://sourceware.org/ml/libc-alpha/2019-05/msg00661.html

RFC v2:
 - Add Lukasz's patches
 - Update the non HACK syscalls after feedback
 - define __ASSUME_TIME64_SYSCALLS and __ASSUME_RLIM64_SYSCALLS
 - Remove lockf64.c
 - Other smaller changes from RFC v1

--END---

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 __COVER__ | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 __COVER__

diff --git a/__COVER__ b/__COVER__
new file mode 100644
index 0000000000..e69de29bb2
-- 
2.22.0



Alistair Francis (7):
  include/time.h: Fix conflicting timespec types on 32-bit
  sysdeps/nanosleep: Use clock_nanosleep_time64 if avaliable
  sysdeps/futex: Use futex_time64 if avaliable
  sysdeps/gettimeofday: Use clock_gettime64 if avaliable
  sysdeps/wait: Use waitid if avaliable
  sysdeps/getrlimit: Use prlimit64 if avaliable
  RISC-V: Use 64-bit time_t and off_t for RV32 and RV64

Lukasz Majewski (3):
  y2038: Introduce internal for glibc struct __timespec64
  y2038: Provide conversion helpers for struct __timespec64
  y2038: linux: Provide __clock_settime64 implementation

Zong Li (10):
  Documentation for the RISC-V 32-bit port
  RISC-V: Support dynamic loader for the 32-bit
  RISC-V: Add path of library directories for the 32-bit
  RISC-V: The ABI implementation for the 32-bit
  RISC-V: Hard float support for the 32 bit
  RISC-V: Regenerate ULPs of RISC-V
  RISC-V: Add ABI lists
  RISC-V: Build Infastructure for the 32-bit
  RISC-V: Fix llrint and llround missing exceptions on RV32
  Add RISC-V 32-bit target to build-many-glibcs.py

 ChangeLog                                     |  115 +
 NEWS                                          |    6 +
 README                                        |    1 +
 include/time.h                                |  119 +
 nptl/thrd_sleep.c                             |   19 +-
 scripts/build-many-glibcs.py                  |   15 +
 sysdeps/riscv/bits/wordsize.h                 |    4 +-
 sysdeps/riscv/nofpu/libm-test-ulps            |   16 +-
 sysdeps/riscv/nptl/bits/pthreadtypes-arch.h   |   25 +-
 sysdeps/riscv/preconfigure                    |    6 +-
 sysdeps/riscv/rv32/Implies-after              |    1 +
 .../riscv/rv32/fix-fp-int-convert-overflow.h  |   38 +
 sysdeps/riscv/rv32/rvd/Implies                |    3 +
 sysdeps/riscv/rv32/rvd/s_lrint.c              |   31 +
 sysdeps/riscv/rv32/rvd/s_lround.c             |   31 +
 sysdeps/riscv/rv32/rvf/Implies                |    1 +
 sysdeps/riscv/rv32/rvf/s_lrintf.c             |   31 +
 sysdeps/riscv/rv32/rvf/s_lroundf.c            |   31 +
 sysdeps/riscv/{rv64 => }/rvd/libm-test-ulps   |   56 +-
 .../riscv/{rv64 => }/rvd/libm-test-ulps-name  |    0
 sysdeps/riscv/sfp-machine.h                   |   27 +-
 sysdeps/riscv/sys/asm.h                       |    5 +-
 sysdeps/unix/sysv/linux/clock_settime.c       |   37 +-
 sysdeps/unix/sysv/linux/getrlimit.c           |    9 +
 sysdeps/unix/sysv/linux/gettimeofday.c        |   28 +
 sysdeps/unix/sysv/linux/lowlevellock-futex.h  |   28 +-
 sysdeps/unix/sysv/linux/nanosleep.c           |   12 +
 sysdeps/unix/sysv/linux/nanosleep_nocancel.c  |   11 +
 sysdeps/unix/sysv/linux/riscv/Makefile        |    4 +-
 .../unix/sysv/linux/riscv/bits/environments.h |   85 +
 sysdeps/unix/sysv/linux/riscv/bits/time64.h   |   36 +
 sysdeps/unix/sysv/linux/riscv/bits/timesize.h |   22 +
 .../unix/sysv/linux/riscv/bits/typesizes.h    |   89 +
 sysdeps/unix/sysv/linux/riscv/configure       |   39 +
 sysdeps/unix/sysv/linux/riscv/configure.ac    |    8 +
 sysdeps/unix/sysv/linux/riscv/dl-cache.h      |   17 +-
 sysdeps/unix/sysv/linux/riscv/ldconfig.h      |    2 +-
 sysdeps/unix/sysv/linux/riscv/rv32/Implies    |    3 +
 .../unix/sysv/linux/riscv/rv32/c++-types.data |   67 +
 .../sysv/linux/riscv/rv32/jmp_buf-macros.h    |   53 +
 sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist |    9 +
 .../linux/riscv/rv32/libBrokenLocale.abilist  |    1 +
 .../unix/sysv/linux/riscv/rv32/libanl.abilist |    4 +
 .../unix/sysv/linux/riscv/rv32/libc.abilist   | 2101 +++++++++++++++++
 .../sysv/linux/riscv/rv32/libcrypt.abilist    |    2 +
 .../unix/sysv/linux/riscv/rv32/libdl.abilist  |    9 +
 .../unix/sysv/linux/riscv/rv32/libm.abilist   | 1021 ++++++++
 .../sysv/linux/riscv/rv32/libpthread.abilist  |  235 ++
 .../sysv/linux/riscv/rv32/libresolv.abilist   |   79 +
 .../unix/sysv/linux/riscv/rv32/librt.abilist  |   35 +
 .../linux/riscv/rv32/libthread_db.abilist     |   40 +
 .../sysv/linux/riscv/rv32/libutil.abilist     |    6 +
 sysdeps/unix/sysv/linux/riscv/shlib-versions  |   10 +-
 sysdeps/unix/sysv/linux/wait.c                |   21 +-
 sysdeps/unix/sysv/linux/waitpid.c             |   54 +
 sysdeps/unix/sysv/linux/waitpid_nocancel.c    |   53 +
 56 files changed, 4745 insertions(+), 66 deletions(-)
 create mode 100644 sysdeps/riscv/rv32/Implies-after
 create mode 100644 sysdeps/riscv/rv32/fix-fp-int-convert-overflow.h
 create mode 100644 sysdeps/riscv/rv32/rvd/Implies
 create mode 100644 sysdeps/riscv/rv32/rvd/s_lrint.c
 create mode 100644 sysdeps/riscv/rv32/rvd/s_lround.c
 create mode 100644 sysdeps/riscv/rv32/rvf/Implies
 create mode 100644 sysdeps/riscv/rv32/rvf/s_lrintf.c
 create mode 100644 sysdeps/riscv/rv32/rvf/s_lroundf.c
 rename sysdeps/riscv/{rv64 => }/rvd/libm-test-ulps (98%)
 rename sysdeps/riscv/{rv64 => }/rvd/libm-test-ulps-name (100%)
 create mode 100644 sysdeps/unix/sysv/linux/riscv/bits/environments.h
 create mode 100644 sysdeps/unix/sysv/linux/riscv/bits/time64.h
 create mode 100644 sysdeps/unix/sysv/linux/riscv/bits/timesize.h
 create mode 100644 sysdeps/unix/sysv/linux/riscv/bits/typesizes.h
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/Implies
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/c++-types.data
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/jmp_buf-macros.h
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libBrokenLocale.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libanl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libcrypt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libdl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libm.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libresolv.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/librt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libthread_db.abilist
 create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libutil.abilist

-- 
2.22.0


^ permalink raw reply	[flat|nested] 107+ messages in thread

end of thread, other threads:[~2019-07-26 13:08 UTC | newest]

Thread overview: 107+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25  0:08 [RFC v2 00/20] RISC-V glibc port for the 32-bit Alistair Francis
2019-06-25  0:08 ` [RFC v2 01/20] y2038: Introduce internal for glibc struct __timespec64 Alistair Francis
2019-06-25  0:08 ` [RFC v2 02/20] y2038: Provide conversion helpers for " Alistair Francis
2019-06-25  0:08 ` [RFC v2 03/20] y2038: linux: Provide __clock_settime64 implementation Alistair Francis
2019-06-25 11:05   ` Arnd Bergmann
2019-06-25 15:51     ` Lukasz Majewski
2019-06-25 16:39       ` Arnd Bergmann
2019-06-26  9:07         ` Lukasz Majewski
2019-06-26 12:36           ` Arnd Bergmann
2019-06-26 15:03             ` Lukasz Majewski
2019-06-26 15:11               ` Florian Weimer
2019-06-26 22:49                 ` Lukasz Majewski
2019-06-27  7:14                   ` Florian Weimer
2019-06-27  7:36                     ` Lukasz Majewski
2019-06-26 18:58               ` Arnd Bergmann
2019-06-26 22:55                 ` Lukasz Majewski
2019-06-27  7:45                   ` Arnd Bergmann
2019-06-27 10:35                     ` Lukasz Majewski
2019-06-27 13:32                       ` Arnd Bergmann
2019-06-27 14:07                         ` Lukasz Majewski
2019-06-27 14:57                           ` Arnd Bergmann
2019-06-27 15:23                             ` Lukasz Majewski
2019-06-27 15:45                               ` Arnd Bergmann
2019-06-27 16:16                                 ` Lukasz Majewski
2019-06-27 21:25                                   ` Arnd Bergmann
2019-06-27 22:08                                     ` Lukasz Majewski
2019-07-04  0:04                                       ` Alistair Francis
2019-07-04  8:13                                         ` Lukasz Majewski
2019-07-08  9:32                                           ` Lukasz Majewski
2019-06-27 20:08                           ` Alistair Francis
2019-06-27 21:02                             ` Lukasz Majewski
2019-07-08 10:49         ` Joseph Myers
2019-06-25  0:08 ` [RFC v2 04/20] include/time.h: Fix conflicting timespec types on 32-bit Alistair Francis
2019-06-25 11:17   ` Arnd Bergmann
2019-06-25 22:20     ` Alistair Francis
2019-06-25  0:08 ` [RFC v2 05/20] sysdeps/nanosleep: Use clock_nanosleep_time64 if avaliable Alistair Francis
2019-06-25  8:24   ` Andreas Schwab
2019-06-25  8:59   ` Arnd Bergmann
2019-06-26 18:20     ` Alistair Francis
2019-06-25  0:09 ` [RFC v2 06/20] sysdeps/futex: Use futex_time64 " Alistair Francis
2019-06-25 11:14   ` Florian Weimer
2019-06-25 11:26     ` Andreas Schwab
2019-06-25 11:41       ` Arnd Bergmann
2019-06-25 12:06         ` Florian Weimer
2019-06-25 13:32           ` Arnd Bergmann
2019-06-25  0:09 ` [RFC v2 07/20] sysdeps/gettimeofday: Use clock_gettime64 " Alistair Francis
2019-06-27 13:14   ` Adhemerval Zanella
2019-07-03 23:49     ` Alistair Francis
2019-07-24 20:22   ` Joseph Myers
2019-07-24 23:00     ` Alistair Francis
2019-07-25 12:57       ` Arnd Bergmann
2019-07-25 17:03         ` Paul Eggert
2019-07-25 17:21           ` Zack Weinberg
2019-07-25 18:53             ` Arnd Bergmann
2019-07-26 13:01               ` Florian Weimer
2019-07-26 13:08                 ` Zack Weinberg
2019-07-25 21:23       ` Joseph Myers
2019-06-25  0:09 ` [RFC v2 08/20] sysdeps/wait: Use waitid " Alistair Francis
2019-06-25  8:16   ` Andreas Schwab
2019-06-25 10:55   ` Zack Weinberg
2019-06-25 11:06     ` Florian Weimer
2019-06-25 12:00       ` Arnd Bergmann
2019-06-25 12:10         ` Florian Weimer
2019-06-25 13:29           ` Arnd Bergmann
2019-06-25 13:39             ` Arnd Bergmann
2019-06-25 13:47               ` Florian Weimer
2019-06-25 14:04                 ` Arnd Bergmann
2019-06-25 14:08                   ` Florian Weimer
2019-06-25 14:21                     ` Arnd Bergmann
2019-06-25 14:29                       ` Florian Weimer
2019-06-26 14:37                         ` Arnd Bergmann
2019-06-26 15:48                           ` Florian Weimer
2019-06-26 16:28                             ` Andreas Schwab
2019-07-08 12:09                               ` Florian Weimer
2019-07-08 12:34                                 ` Andreas Schwab
2019-07-08 12:36                                   ` Florian Weimer
2019-07-09 22:57                                     ` Alistair Francis
2019-07-10  7:33                                       ` Andreas Schwab
2019-07-10 17:47                                         ` Alistair Francis
2019-07-25 15:49                                     ` Joseph Myers
2019-06-26 21:08                             ` Arnd Bergmann
2019-06-27  7:33                               ` Florian Weimer
2019-06-27  8:25                                 ` Andreas Schwab
2019-06-27 10:21                                 ` Arnd Bergmann
2019-06-27 11:12                                   ` Florian Weimer
2019-06-27 15:24                                     ` Arnd Bergmann
2019-07-03 23:50                                       ` Alistair Francis
2019-06-25 23:51         ` Alistair Francis
2019-06-25  0:09 ` [RFC v2 09/20] sysdeps/getrlimit: Use prlimit64 " Alistair Francis
2019-06-25 11:11   ` Florian Weimer
2019-06-25 20:45     ` Alistair Francis
2019-06-25 21:10       ` Florian Weimer
2019-06-25 23:38         ` Alistair Francis
2019-06-25  0:09 ` [RFC v2 10/20] Documentation for the RISC-V 32-bit port Alistair Francis
2019-06-25  0:09 ` [RFC v2 11/20] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64 Alistair Francis
2019-06-25  0:09 ` [RFC v2 12/20] RISC-V: Support dynamic loader for the 32-bit Alistair Francis
2019-06-25  0:09 ` [RFC v2 13/20] RISC-V: Add path of library directories " Alistair Francis
2019-06-25  0:09 ` [RFC v2 14/20] RISC-V: The ABI implementation " Alistair Francis
2019-06-25  0:09 ` [RFC v2 15/20] RISC-V: Hard float support for the 32 bit Alistair Francis
2019-06-25  0:09 ` [RFC v2 16/20] RISC-V: Regenerate ULPs of RISC-V Alistair Francis
2019-06-25  0:09 ` [RFC v2 17/20] RISC-V: Add ABI lists Alistair Francis
2019-06-25  0:09 ` [RFC v2 18/20] RISC-V: Build Infastructure for the 32-bit Alistair Francis
2019-06-25  0:09 ` [RFC v2 19/20] RISC-V: Fix llrint and llround missing exceptions on RV32 Alistair Francis
2019-06-25  0:09 ` [RFC v2 20/20] Add RISC-V 32-bit target to build-many-glibcs.py Alistair Francis
2019-06-25 11:15 ` [RFC v2 00/20] RISC-V glibc port for the 32-bit Florian Weimer
2019-06-25 12:07   ` Arnd Bergmann
2019-07-04  8:47 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).