This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patches] Re: [PATCH v3 07/19] RISC-V: Build Infastructure
On 01/05/2018 08:44 AM, Joseph Myers wrote:
> On Thu, 4 Jan 2018, Darius Rad wrote:
>
>>> You don't need such long and redundant conditions. I'd expect something
>>> simpler like on other architectures (e.g. !defined __LP64__ && defined
>>> __riscv_float_abi_soft in this case - in general, just checking one macro
>>> for the ILP32/LP64 distinction, one for the floating-point ABI).
>>>
>>
>> I'll remove the extraneous checks for the floating point ABI. However,
>> I think the other checks are necessary, as __LP64__/__ILP32__ are not
>> defined by gcc when -mabi is used. That might be a gcc bug, but that
>
> __LP64__ is defined in architecture-independent code (cppbuiltin.c), so
> should be fully suitable for this. (__ILP32__ is indeed an
> architecture-specific macro on only some architectures.)
>
Indeed, my mistake. __ILP32__ is not present, but __LP64__ is defined
when appropriate. So I'll use __LP64__ and !__LP64__, which are
sufficient to differentiate the currently supported ABIs (along with
soft/double float).