This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.

RISC-V glibc Port v3

From: Palmer Dabbelt <palmer at dabbelt dot com>

To: libc-alpha at sourceware dot org

Cc: patches at groups dot riscv dot org

Date: Tue, 26 Dec 2017 22:05:15 -0800

Subject: RISC-V glibc Port v3

Authentication-results: sourceware.org; auth=none

It's been about a week since the last patch set, and while there's a bit more work to do I wanted to get something out so everyone is one the same page. The major milestone here is that we now pass build-many-glibcs.py -- or at least we did a few hours ago, but I've rebased recently so some trouble may have snuck in (I'm running another build now, but it'll take hours). We still need to get things running natively to see the test suite results, but I think I've responded to all the feedback from v2 patch set aside from the what's listed below. Sorry if I've missed anything, feel free to just poke the v2 email so it ends up back in my inbox. Thanks to everyone for all the help! There are a few things I still need to do: * I need to go through and sanitize the floating-point routines, which I had to refactor as a result of the new FP aliasing mechanism. * Our test suite results are very bad, but I believe this is because we're running on QEMU's user-mode emulation which is known to be both buggy and incomplete. I'm bringing up userspace again to produce a more reasonable test suite run, which will hopefully have a much cleaner run. * I need to generate the ulps files, what exist are just placeholders. * I need to add a soft-fp directory, which should be very quick to do but all my build machines are tied up running build-many-glibcs.py * I don't yet understand the API we should have for __riscv_flush_icache, there's an email thread about this on the v2 patch set. * We only have 4 of our 6 supported configurations in build-many-glibcs.py, I'll add the remaining two as build time permits. Here's a summary of the changes since the previous patch set: * We now have 4 ABI/ISA pairs in build-many-glibcs.py, which is clean (with the newest linux headers, see the patch for details). * Support for ilp32f and lp64f have been removed. * Support for systems without the A extension has been removed. * There are now ABI lists. * Many whitespace fixes to meet glibc's standards. * Included C and ASM files from other ports have been copied into ours. * with_fp_cond is now set, but I don't have a soft-fp directory yet. * We no longer maintain a -mno-plt list in our port, that existed to work around a linker bug and is now defunct. * A handful of header files (mostly ucontext.h) have been cleaned up to be namespace clean. And here's a log of all the other summaries: [v1] A (very brief, as it's been 6 months) summary of the changes since the v1 patch set includes: * Many copyright cleanups. * We're using the generic versions of a handful of functions and headers, including ieee754.h, mathdef.h mathinline.h, fabs{,f}, and fe{disable,enable,get}except. * Removal of lots of head code, including pthread_lock, atomic_fast. * A handful of ABI fixes to match our upstreamed Linux port, including sigcontext, instruction-cache flushing, and some syscall sanitization. * We've changed to use libm_alias_{float,double}, like upstream * Compiler builtins are used for atomics where possible. * We now mandate the A extension in Linux, support for non-A systems has been removed from glibc. [PATCH v3 01/19] Avoid race conditions when rebuilding librt.so [PATCH v3 02/19] Allow make-link-multidir to make subdirectories [PATCH v3 03/19] Add linux-4.15 VDSO hash for RISC-V [PATCH v3 04/19] Skeleton documentation for the RISC-V port [PATCH v3 05/19] Add RISC-V dynamic relocations to elf.h [PATCH v3 06/19] Add RISC-V entries to config.h.in [PATCH v3 07/19] RISC-V: Build Infastructure [PATCH v3 08/19] RISC-V: ABI Implementation [PATCH v3 09/19] RISC-V: Startup and Dynamic Loading Code [PATCH v3 10/19] RISC-V: Thread-Local Storage Support [PATCH v3 11/19] RISC-V: Generic <math.h> and soft-fp Routines [PATCH v3 12/19] RISC-V: RV32F Support [PATCH v3 13/19] RISC-V: RV32D, RV64F, and RV64D Support [PATCH v3 14/19] RISC-V: Atomic and Locking Routines [PATCH v3 15/19] RISC-V: Linux Syscall Interface [PATCH v3 16/19] RISC-V: Linux ABI [PATCH v3 17/19] RISC-V: Linux Startup and Dynamic Loading Code [PATCH v3 18/19] RISC-V: Add ABI Lists [PATCH v3 19/19] Add RISC-V to build-many-glibcs.py