This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 01/15] RISC-V: Build Infastructure
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Palmer Dabbelt <palmer at dabbelt dot com>
- Cc: <libc-alpha at sourceware dot org>, Andrew Waterman <andrew at sifive dot com>, Darius Rad <darius at bluespec dot com>, <dj at redhat dot com>
- Date: Wed, 20 Dec 2017 16:21:55 +0000
- Subject: Re: [PATCH v2 01/15] RISC-V: Build Infastructure
- Authentication-results: sourceware.org; auth=none
- References: <20171220072022.26909-1-palmer@dabbelt.com> <20171220072022.26909-2-palmer@dabbelt.com>
On Tue, 19 Dec 2017, Palmer Dabbelt wrote:
> diff --git a/sysdeps/riscv/Makefile b/sysdeps/riscv/Makefile
> new file mode 100644
> index 000000000000..64060531a1d5
> --- /dev/null
> +++ b/sysdeps/riscv/Makefile
> @@ -0,0 +1,49 @@
> +ifneq ($(all-rtld-routines),)
> +CFLAGS-rtld.c += -mno-plt
My previous comments from
<https://sourceware.org/ml/libc-alpha/2017-06/msg00645.html> still apply:
this is too fragile (people won't think when making an
architecture-independent change about whether it needs a RISC-V-specific
change here) and completely lacking the required detailed explanatory
comment of what the issue is and the logic for determining what files need
this option (but really the logic should be implemented to avoid an
architecture-specific list of architecture-independent files being needed
at all).
> diff --git a/sysdeps/riscv/Versions b/sysdeps/riscv/Versions
> new file mode 100644
> index 000000000000..aafa348a2395
> --- /dev/null
> +++ b/sysdeps/riscv/Versions
> @@ -0,0 +1,4 @@
> +libc {
> + GLIBC_2.27 {
> + }
> +}
You shouldn't need this file at all when there aren't any versions to
include in it.
> diff --git a/sysdeps/riscv/preconfigure b/sysdeps/riscv/preconfigure
Does your soft-float lack support for exceptions and rounding modes? If
so, I'd expect a setting of with_fp_cond, and a corresponding nofpu
directory or directories with Implies files pointing to ieee754/soft-fp
(arranged so that always comes before the other ieee754/ directories in
the sysdeps directory ordering). That's needed to get the soft-fp
versions of fmaf/fma/fmal used instead of the default ones relying on
exceptions and rounding modes, so its absence should show up as test
failures for soft-float configurations. In future it will also similarly
be needed to get soft-fp versions of TS 18661-1 narrowing functions used.
Remark: it makes sense for ieee754/dbl-64/wordsize-64 to be used (before
ieee754/dbl-64 in the sysdeps directory ordering) in configurations with
64-bit registers (but that's just an optimization so you may wish to defer
it).
> +abi-ilp32-options := -D__SIZEOF_INT__=4
abi-* options variables are no longer used with the current bits/syscall.h
generation mechanism, so you should remove all settings of such variables
from the patch.
> diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/Makefile b/sysdeps/unix/sysv/linux/riscv/rv64/Makefile
> new file mode 100644
> index 000000000000..cb60d740476d
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/riscv/rv64/Makefile
> @@ -0,0 +1,4 @@
> +ifeq ($(subdir),socket)
> +CFLAGS-recv.c += -fexceptions
> +CFLAGS-send.c += -fexceptions
> +endif
I wonder if this should be made generic for all Linux ports (and removed
from the mips64 Makefile as well as here).
--
Joseph S. Myers
joseph@codesourcery.com