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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RISC-V glibc port, v6


This v6 patch set is largely the same as the v5 patch set I submitted
yesterday, but with the following changes:

* We're now more explicit about the targets we support, which are
  rv64imac/lp64, rv64imafdc/lp64, and rv64imafdc/lp64d (rv64gc is an alias for
  rv64imafdc, and while I've tried to be consistent in the commits I might have
  confused them a handful of times on the mailing list in conversation).
* All mentions of the rv32i-based port have been removed, including removing
  all the rv32 folders.
* The ABI lists are listed as rv64 specific, we'll be targeting glibc-2.28 for
  rv32 support.
* build-many-glibcs.py now builds three non-multilib GCCs for RISC-V, each of
  which builds one of the supported targets.
* Our crti.S has been merged into sysdeps/init_array.
* The soft float test support macros has been fixed.
* The check for RVC has been removed, which I forgot about some how.
* sysdep-cancel.h has been removed as it's obselete.
* Some whitespace changes.

This patch set passed build-many-glibcs.py (with the small diff to update to
the latest Linux headers listed in the patch notes, as 4.15 hasn't been
released yet, and a small ldd-rewrite.sed change).  This port has good test
suite results for the test suites that have completed so far -- there might be
a touch of noise here, but none of the changes made since the test suite was
run should produce any different results post-compilation.  The
rv64imafdc/lp64d results aren't in from this patch set today, but they were
good yesterday and should only be slightly better (the sysvipc test results
have been fixed by improving the test environment).  Quoting Darius

    RV64IMAC/LP64 results:
    
    Summary of test results:
         26 FAIL
       5551 PASS
          4 UNRESOLVED
         18 UNSUPPORTED
         18 XFAIL
    
    Test output [1].
    
    Includes ~9 expected cross test failures, ~5 timed out that should pass
    with a longer timeout.  There are 3 failures due to rounding mode
    issues, tests that should be ignored due to soft float but are not.  I
    will investigate more tomorrow.
    
    [1] http://bluespec.com/tmp/glibc-check-lp64.tar.xz
    
    Also, these results do not include fixes for 4-5 tests which I am
    currently running on RV64GC/LP64D.
    
    RV64GC/LP64D results:
    
    Summary of test results:
         15 FAIL
       5563 PASS
          4 UNRESOLVED
         17 UNSUPPORTED
         18 XFAIL
    
    With 3 timed out.  Running again tonight with longer timeout.   Test
    output [1].
    
    [1] http://bluespec.com/tmp/glibc-check.tar.xz

There are a few small outstanding questions that I have:

* Should our sysdeps/init_array/crti.S specify a section type?  I think it
  probably should, there's more details in patch 1.
* Is our add_system_dir() sane?  I'm not sure about this one, there's an
  outstanding email thread about it.
* Our soft float target needs the ulps test files to be generated.
* Is our ldd-rewrite.sed correct?  I think it's OK

Thanks, again, to everyone who has helped out!



Here's the list of changes from our previous patches:

[v5] A short log of the changes since our v4 includes

* A proper implementation of lroundf on rv64.
* Moving back to a nofpu directory, which got eaten by a previous patch set.
* Support for dl-cache.
* Many comment and whitespace fixes.
* Better documentation of __riscv_flush_icache, along with some namespace
  cleanups.
* We now call the exit system call instead of _exit after a thread terminates.
* Correct handling of S1 and S2 in ucontext-related code.
* Correct SP handling when arguments are on the stack in ucontext-related code.
* Correctly saving sigmask on setcontext.
* We now test for floating-point exceptions.

[v4] A highlight of the changes since our v3 includes:

* Some ABI list cleanups, to match a few changes between when we last rebased
  and now.
* ucontext.h namespace fixes.
* Copyright year has been updated to 2018, and "contributed by" lines have been
  removed.
* int in specified in all places were optional.
* The floating-point support no longer uses ABI types, but uses explicit bit
  widths.
* Some floating point test macros have been defined to inform the test suite
  how our ISA operates.
* We now examine the ELF flags.
* I've added ChangeLog entries for all the commits except those that just add
  new files.

[v3] 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.

[v2] 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 v6 01/16] sysdeps/init_array: Add PREINIT_FUNCTION to crti.S
[PATCH v6 02/16] Skeleton documentation for the RISC-V port
[PATCH v6 03/16] Add RISC-V entries to config.h.in
[PATCH v6 04/16] Add documentation for __riscv_flush_icache
[PATCH v6 05/16] RISC-V: ABI Implementation
[PATCH v6 06/16] RISC-V: Startup and Dynamic Loading Code
[PATCH v6 07/16] RISC-V: Thread-Local Storage Support
[PATCH v6 08/16] RISC-V: Generic <math.h> and soft-fp Routines
[PATCH v6 09/16] RISC-V: Hard Float Support
[PATCH v6 10/16] RISC-V: Atomic and Locking Routines
[PATCH v6 11/16] RISC-V: Linux Syscall Interface
[PATCH v6 12/16] RISC-V: Linux ABI
[PATCH v6 13/16] RISC-V: Linux Startup and Dynamic Loading Code
[PATCH v6 14/16] RISC-V: Add ABI Lists
[PATCH v6 15/16] RISC-V: Build Infastructure
[PATCH v6 16/16] Add RISC-V to build-many-glibcs.py


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]