|
Message-Id: <e792658a-fbaa-48bd-8704-7f9d2ec5a4ef@www.fastmail.com> Date: Fri, 04 Sep 2020 01:48:19 -0400 From: "Stefan O'Rear" <sorear@...tmail.com> To: musl@...ts.openwall.com Subject: riscv32 v2 Changes since v1: Fixed ptrace support by passing through high bits of WSTOPSIG. WEXITSTATUS is still masked (required by POSIX); WTERMSIG is also masked because bits 8-15 have nowhere to go. Added SYS_futex as an alias of SYS_futex_time64. Changed conditionals in patch 2. __wait4 is significantly reorganized and now uses a conditionally defined wrapper in src/internal/syscall.h. Duplication reduced in statx-using patches. Arnd Bergmann's comment about identical fcntl.h files has NOT been addressed. Rich Felker's suggestion (on IRC) to use a 0-instruction __get_tp was NOT implemented after discovering that it generates dramatically worse code on clang and cannot easily be conditionalized. Bug reports to come. Patches other than 2, 6, 7, 10 are unchanged. Testing: Smoke tested on riscv32, replacing the musl libc.so in an OpenEmbedded-generated VM with a dynamically linked systemd and verified boot. Smoke testing on i386 and x86_64 by replacing libc.so in an Alpine chroot and running build tools. libc-test was run on all three architectures. The errors on riscv32 are as follows: FAIL src/api/main.exe [status 1] FAIL src/functional/fcntl-static.exe [status 1] FAIL src/functional/fcntl.exe [status 1] FAIL src/functional/ipc_msg-static.exe [status 1] FAIL src/functional/ipc_msg.exe [status 1] FAIL src/functional/ipc_sem-static.exe [status 1] FAIL src/functional/ipc_sem.exe [status 1] FAIL src/functional/ipc_shm-static.exe [status 1] FAIL src/functional/ipc_shm.exe [status 1] FAIL src/functional/strptime-static.exe [status 1] FAIL src/functional/strptime.exe [status 1] FAIL src/math/fma.exe [status 1] FAIL src/math/fmaf.exe [status 1] FAIL src/math/powf.exe [status 1] FAIL src/regression/malloc-brk-fail-static.exe [status 1] FAIL src/regression/malloc-brk-fail.exe [status 1] FAIL src/regression/pthread_atfork-errno-clobber-static.exe [status 1] FAIL src/regression/pthread_atfork-errno-clobber.exe [status 1] The fcntl and sysvipc errors do not correspond to any error in x86_64 and potentially require investigation, although they could be kernel configuration issues. x86_64 has a different but overlapping set of math errors; qemu is known to not give bit-exact results for RISC-V floating point. The malloc, pthread, and src/api/main.exe failures match failures on x86_64. The test results are identical between master and my branch on x86_64. On i386, I saw a utime.exe and utime-static.exe error but have not managed to reproduce them. I was not able to run LTP on musl on any of the three architectures following the instructions in its README. make autotools && ./configure && make all -j16 eventually results in: confstr01.c:51:3: error: '_CS_XBS5_ILP32_OFF32_CFLAGS' undeclared here (not in a function) A cloneable repository with the present version is: git clone https://github.com/sorear/riscv-musl -b rv32_submit_v2 Download attachment "0001-Remove-ARMSUBARCH-relic-from-configure.patch" of type "application/octet-stream" (721 bytes) Download attachment "0002-time64-Don-t-make-aliases-to-nonexistent-syscalls.patch" of type "application/octet-stream" (1920 bytes) Download attachment "0003-time64-Only-getrlimit-setrlimit-if-they-exist.patch" of type "application/octet-stream" (1949 bytes) Download attachment "0004-time64-Only-gettimeofday-settimeofday-if-exist.patch" of type "application/octet-stream" (1328 bytes) Download attachment "0005-Add-src-internal-statx.h.patch" of type "application/octet-stream" (2418 bytes) Download attachment "0006-Only-call-fstatat-if-defined.patch" of type "application/octet-stream" (5779 bytes) Download attachment "0007-Emulate-wait4-using-waitid.patch" of type "application/octet-stream" (5480 bytes) Download attachment "0008-riscv-Fall-back-to-syscall-__riscv_flush_icache.patch" of type "application/octet-stream" (822 bytes) Download attachment "0009-riscv32-Target-and-subtarget-detection.patch" of type "application/octet-stream" (1090 bytes) Download attachment "0010-riscv32-add-arch-headers.patch" of type "application/octet-stream" (23648 bytes) Download attachment "0011-riscv32-Add-fenv-and-math.patch" of type "application/octet-stream" (7215 bytes) Download attachment "0012-riscv32-Add-dlsym.patch" of type "application/octet-stream" (610 bytes) Download attachment "0013-riscv32-Add-jmp_buf-and-sigreturn.patch" of type "application/octet-stream" (3481 bytes) Download attachment "0014-riscv32-Add-thread-support.patch" of type "application/octet-stream" (2837 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.