[PATCH v3 15/19] RISC-V: Build Infastructure for 32-bit
Alistair Francis
alistair23@gmail.com
Mon Aug 10 15:45:03 GMT 2020
On Tue, Jul 14, 2020 at 4:55 PM Maciej W. Rozycki via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> Hi Alistair,
>
> The heading uses odd capitalisation and wording, how about:
>
> RISC-V: Build infastructure for 32-bit port
>
> ?
>
> On Sun, 12 Jul 2020, Alistair Francis via Libc-alpha wrote:
>
> > This patch lays out the top-level orginazition of the RISC-V 32-bit port. It
> > contains all the Implies files as well as various other fragments of
> > build infastructure for the RISC-V 32-bit port.
>
> How about:
>
> This patch lays out the top-level organization of the RISC-V 32-bit port.
> It provides all the Implies files as well as various other fragments of
> the build infastructure.
Fixed.
>
> ? [Oh, I can see where it all has been copied and pasted from.]
>
> > diff --git a/sysdeps/unix/sysv/linux/riscv/Makefile b/sysdeps/unix/sysv/linux/riscv/Makefile
> > index 301b082398..6c11f7fd9a 100644
> > --- a/sysdeps/unix/sysv/linux/riscv/Makefile
> > +++ b/sysdeps/unix/sysv/linux/riscv/Makefile
> > @@ -7,11 +7,13 @@ ifeq ($(subdir),stdlib)
> > gen-as-const-headers += ucontext_i.sym
> > endif
> >
> > -abi-variants := lp64 lp64d
> > +abi-variants := ilp32 ilp32d lp64 lp64d
> >
> > ifeq (,$(filter $(default-abi),$(abi-variants)))
> > $(error Unknown ABI $(default-abi), must be one of $(abi-variants))
> > endif
> >
> > +abi-ilp32-condition := !defined __LP64__ && defined __riscv_float_abi_soft
> > +abi-ilp32d-condition := !defined __LP64__ && defined __riscv_float_abi_double
> > abi-lp64-condition := defined __LP64__ && defined __riscv_float_abi_soft
> > abi-lp64d-condition := defined __LP64__ && defined __riscv_float_abi_double
>
> I feel like these all ought to use __WORDSIZE so as to be consistent,
> also with the majority of other ports, and inclusive for RV32 rather than
> exclusive. That if FAOD:
>
> abi-ilp32-condition := __WORDSIZE == 32 && defined __riscv_float_abi_soft
> abi-ilp32d-condition := __WORDSIZE == 32 && defined __riscv_float_abi_double
> abi-lp64-condition := __WORDSIZE == 64 && defined __riscv_float_abi_soft
> abi-lp64d-condition := __WORDSIZE == 64 && defined __riscv_float_abi_double
>
> This way the ABI condition is tied to a property that we can reasonably
> expect is not going to ever change and won't have to be adjusted if we add
> support for say RV128 sometime. Let me know if you disagree.
Fixed
Alistair
>
> Otherwise OK.
>
> Maciej
More information about the Libc-alpha
mailing list