mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH 00/14] riscv32 support
@ 2020-09-03 11:22 Stefan O'Rear
  2020-09-03 11:22 ` [musl] [PATCH 01/14] Remove ARMSUBARCH relic from configure Stefan O'Rear
                   ` (13 more replies)
  0 siblings, 14 replies; 31+ messages in thread
From: Stefan O'Rear @ 2020-09-03 11:22 UTC (permalink / raw)
  To: musl; +Cc: Stefan O'Rear

Several changes to support architectures without time32 syscalls, and
then a riscv32 port (created by copying the riscv64 files and changing
as necessary).

Cleanup in configure is related only insofar as I spent time determining
what it did while researching musl's ARCH/SUBARCH system, and removing
the relic will slightly speed up future ports.

I don't have a great handle on how musl handles files (what should they
be called, where should they be, whether include guards should be used
and whether headers should include everything they depend on) and would
particularly welcome feedback on that.  Likewise I don't have a good
model of the musl whitespace and paren style.

Requires Linux 5.4 for full functionality due to using waitid(P_PGID,0)
to emulate waitpid(0); earlier kernels may be supported on a best-effort
basis.

Testing so far has consisted of building openembedded with TCLIBC=musl
and the patch added to the musl recipe, booting the resulting images,
and running the strace build system in the VM.  This includes systemd
with the openembedded musl compatibilty patches.  strace does not work
(it prints a spurious SIGTRAP message and then the tracee runs
untraced).  Further testing and debugging will continue.

Testing on non-riscv32 architectures also remains to be done.

Stefan O'Rear (14):
  Remove ARMSUBARCH relic from configure
  time64: Don't make aliases to nonexistent syscalls
  time64: Only getrlimit/setrlimit if they exist
  time64: Only gettimeofday/settimeofday if exist
  Add src/internal/statx.h
  Only call fstatat if defined
  Emulate wait4 using waitid
  riscv: Fall back to syscall __riscv_flush_icache
  riscv32: Target and subtarget detection
  riscv32: add arch headers
  riscv32: Add fenv and math
  riscv32: Add dlsym
  riscv32: Add jmp_buf and sigreturn
  riscv32: Add thread support

 arch/riscv32/atomic_arch.h             |  21 ++
 arch/riscv32/bits/alltypes.h.in        |  18 ++
 arch/riscv32/bits/fcntl.h              |  38 ++++
 arch/riscv32/bits/fenv.h               |  17 ++
 arch/riscv32/bits/float.h              |  16 ++
 arch/riscv32/bits/posix.h              |   2 +
 arch/riscv32/bits/setjmp.h             |   1 +
 arch/riscv32/bits/signal.h             | 118 ++++++++++
 arch/riscv32/bits/stat.h               |  18 ++
 arch/riscv32/bits/stdint.h             |  20 ++
 arch/riscv32/bits/syscall.h.in         | 284 +++++++++++++++++++++++++
 arch/riscv32/bits/user.h               |   5 +
 arch/riscv32/crt_arch.h                |  19 ++
 arch/riscv32/kstat.h                   |   0
 arch/riscv32/pthread_arch.h            |  13 ++
 arch/riscv32/reloc.h                   |  22 ++
 arch/riscv32/syscall_arch.h            |  78 +++++++
 configure                              |   8 +-
 src/fenv/riscv32/fenv-sf.c             |   3 +
 src/fenv/riscv32/fenv.S                |  56 +++++
 src/internal/statx.h                   |  28 +++
 src/internal/syscall.h                 |   2 +
 src/internal/wait4_waitid.h            |   1 +
 src/ldso/riscv32/dlsym.s               |   6 +
 src/linux/__wait4_waitid.c             |  52 +++++
 src/linux/cache.c                      |   1 +
 src/linux/wait4.c                      |   5 +
 src/math/riscv32/copysign.c            |  15 ++
 src/math/riscv32/copysignf.c           |  15 ++
 src/math/riscv32/fabs.c                |  15 ++
 src/math/riscv32/fabsf.c               |  15 ++
 src/math/riscv32/fma.c                 |  15 ++
 src/math/riscv32/fmaf.c                |  15 ++
 src/math/riscv32/fmax.c                |  15 ++
 src/math/riscv32/fmaxf.c               |  15 ++
 src/math/riscv32/fmin.c                |  15 ++
 src/math/riscv32/fminf.c               |  15 ++
 src/math/riscv32/sqrt.c                |  15 ++
 src/math/riscv32/sqrtf.c               |  15 ++
 src/misc/getrlimit.c                   |   6 +-
 src/misc/setrlimit.c                   |   6 +-
 src/process/waitpid.c                  |   6 +
 src/setjmp/riscv32/longjmp.S           |  42 ++++
 src/setjmp/riscv32/setjmp.S            |  41 ++++
 src/signal/riscv32/restore.s           |   8 +
 src/signal/riscv32/sigsetjmp.s         |  23 ++
 src/stat/fchmodat.c                    |  22 +-
 src/stat/fstatat.c                     |  34 +--
 src/stdio/pclose.c                     |   6 +
 src/stdio/tempnam.c                    |   7 +
 src/stdio/tmpnam.c                     |   7 +
 src/thread/riscv32/__set_thread_area.s |   6 +
 src/thread/riscv32/__unmapself.s       |   7 +
 src/thread/riscv32/clone.s             |  34 +++
 src/thread/riscv32/syscall_cp.s        |  29 +++
 src/time/__map_file.c                  |  13 +-
 src/time/clock_gettime.c               |   4 +
 src/unistd/faccessat.c                 |   6 +-
 58 files changed, 1302 insertions(+), 37 deletions(-)
 create mode 100644 arch/riscv32/atomic_arch.h
 create mode 100644 arch/riscv32/bits/alltypes.h.in
 create mode 100644 arch/riscv32/bits/fcntl.h
 create mode 100644 arch/riscv32/bits/fenv.h
 create mode 100644 arch/riscv32/bits/float.h
 create mode 100644 arch/riscv32/bits/posix.h
 create mode 100644 arch/riscv32/bits/setjmp.h
 create mode 100644 arch/riscv32/bits/signal.h
 create mode 100644 arch/riscv32/bits/stat.h
 create mode 100644 arch/riscv32/bits/stdint.h
 create mode 100644 arch/riscv32/bits/syscall.h.in
 create mode 100644 arch/riscv32/bits/user.h
 create mode 100644 arch/riscv32/crt_arch.h
 create mode 100644 arch/riscv32/kstat.h
 create mode 100644 arch/riscv32/pthread_arch.h
 create mode 100644 arch/riscv32/reloc.h
 create mode 100644 arch/riscv32/syscall_arch.h
 create mode 100644 src/fenv/riscv32/fenv-sf.c
 create mode 100644 src/fenv/riscv32/fenv.S
 create mode 100644 src/internal/statx.h
 create mode 100644 src/internal/wait4_waitid.h
 create mode 100644 src/ldso/riscv32/dlsym.s
 create mode 100644 src/linux/__wait4_waitid.c
 create mode 100644 src/math/riscv32/copysign.c
 create mode 100644 src/math/riscv32/copysignf.c
 create mode 100644 src/math/riscv32/fabs.c
 create mode 100644 src/math/riscv32/fabsf.c
 create mode 100644 src/math/riscv32/fma.c
 create mode 100644 src/math/riscv32/fmaf.c
 create mode 100644 src/math/riscv32/fmax.c
 create mode 100644 src/math/riscv32/fmaxf.c
 create mode 100644 src/math/riscv32/fmin.c
 create mode 100644 src/math/riscv32/fminf.c
 create mode 100644 src/math/riscv32/sqrt.c
 create mode 100644 src/math/riscv32/sqrtf.c
 create mode 100644 src/setjmp/riscv32/longjmp.S
 create mode 100644 src/setjmp/riscv32/setjmp.S
 create mode 100644 src/signal/riscv32/restore.s
 create mode 100644 src/signal/riscv32/sigsetjmp.s
 create mode 100644 src/thread/riscv32/__set_thread_area.s
 create mode 100644 src/thread/riscv32/__unmapself.s
 create mode 100644 src/thread/riscv32/clone.s
 create mode 100644 src/thread/riscv32/syscall_cp.s

-- 
2.25.4


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

end of thread, other threads:[~2020-09-04  1:48 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 11:22 [musl] [PATCH 00/14] riscv32 support Stefan O'Rear
2020-09-03 11:22 ` [musl] [PATCH 01/14] Remove ARMSUBARCH relic from configure Stefan O'Rear
2020-09-03 11:22 ` [musl] [PATCH 02/14] time64: Don't make aliases to nonexistent syscalls Stefan O'Rear
2020-09-03 15:56   ` Rich Felker
2020-09-03 19:36     ` Stefan O'Rear
2020-09-03 21:17       ` Rich Felker
2020-09-03 11:22 ` [musl] [PATCH 03/14] time64: Only getrlimit/setrlimit if they exist Stefan O'Rear
2020-09-03 11:22 ` [musl] [PATCH 04/14] time64: Only gettimeofday/settimeofday if exist Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 05/14] Add src/internal/statx.h Stefan O'Rear
2020-09-03 15:39   ` Arnd Bergmann
2020-09-03 15:51     ` Rich Felker
2020-09-03 18:08       ` Arnd Bergmann
2020-09-03 11:23 ` [musl] [PATCH 06/14] Only call fstatat if defined Stefan O'Rear
2020-09-03 16:05   ` Rich Felker
2020-09-04  1:47     ` Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 07/14] Emulate wait4 using waitid Stefan O'Rear
2020-09-03 14:56   ` Stefan O'Rear
2020-09-03 15:36     ` Arnd Bergmann
2020-09-03 15:40       ` Stefan O'Rear
2020-09-03 18:08         ` Arnd Bergmann
2020-09-03 15:49   ` Rich Felker
2020-09-03 16:25     ` Stefan O'Rear
2020-09-03 16:38       ` Rich Felker
2020-09-03 11:23 ` [musl] [PATCH 08/14] riscv: Fall back to syscall __riscv_flush_icache Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 09/14] riscv32: Target and subtarget detection Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 10/14] riscv32: add arch headers Stefan O'Rear
2020-09-03 15:49   ` Arnd Bergmann
2020-09-03 11:23 ` [musl] [PATCH 11/14] riscv32: Add fenv and math Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 12/14] riscv32: Add dlsym Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 13/14] riscv32: Add jmp_buf and sigreturn Stefan O'Rear
2020-09-03 11:23 ` [musl] [PATCH 14/14] riscv32: Add thread support Stefan O'Rear

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).