This is the mail archive of the 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]

Re: RISC-V glibc Port v1

On Wed, 14 Jun 2017 13:02:40 PDT (-0700), wrote:
> Palmer Dabbelt <> writes:
>> This port targets Version 2.2 of the RISC-V User ISA, and supports
>> both the RV32I and RV64I base ISAs as well as the M, A, F, D, and C
>> extensions as well as our Linux port which is based on the 1.10
>> supervisor specification.
> I would recommend to delay the addition of the 32-bit port, so that you
> can start with a 64-bit time_t.

Do you have an idea of when there will be a 64-bit time_t clean release?  I'd
be OK holding off on the 32-bit port for a bit, as we don't expect RV32I-based
Linux-compatible systems to be popular.

One sticking point is that the RV32I and RV64I base ISAs are very similar, and
as such share a lot of code.  I'd prefer to avoid removing the rv32 code just
to add it back in later, as that will be a big headache.

Would it be sufficient to just disallow RV32I in our preconfigure with a patch
like this, and then turn RV32I back on when we can support a 64-bit time_t
clean ABI?

diff --git a/sysdeps/riscv/preconfigure b/sysdeps/riscv/preconfigure
index 43e2a4fac0..a15e563a31 100644
--- a/sysdeps/riscv/preconfigure
+++ b/sysdeps/riscv/preconfigure
@@ -3,7 +3,11 @@ flen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_fl
 float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_float_abi_\([^ ]*\) .*/\1/p'`

 case "$xlen" in
-32 | 64)
+	echo "rv32i is not supported, we're waiting for a 64-bit time_t clean ABI" >&2
+	exit 1
+	;;
 	echo "Unable to determine XLEN" >&2

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