Re: LDBL_EQ_DBL Multilib Issues

Joel Sherrill <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAF9ehCWH5oRAM+fhLhg+p+5f12UbHwYbf23LrC5F8A9+kyaMOA@mail.gmail.com>
On Tue, Sep 26, 2023 at 5:40 PM Jeff Johnston <[email protected]> wrote:

> Have you thought about adding a special case in sys/config.h which
> when it has the appropriate conditions (platform plus compiler flag) will
> define/redefine _LDBL_EQ_DBL?
>
> It gets included as part of _ansi.h and after newlib.h.
>

Thanks! You are confirming it needs to be decided at build time and giving
me the location to move it to.

I will try to get a patch out as soon as I can.

Thanks.

--joel

>
> -- Jeff J.
>
>
> On Tue, Sep 26, 2023 at 10:43 AM Joel Sherrill <[email protected]> wrote:
>
>> Hi
>>
>> I wondered when we reorganized LDBL_EQ_DBL logic if there wouldn't be a
>> multilib edge case. Chris encountered it.
>>
>> Attached is a simple test program based on the autoconf probe in
>> configure.ac that can be preprocessed with different CPU/ABI flags. The
>> following shows that the default on m68k is not the same as for the 5282.
>>
>> $ m68k-rtems6-gcc -O2 -E ldbl.c | less
>>
>> $ m68k-rtems6-gcc -O2 -E -mcpu=5282 ldbl.c | less
>>
>> Turns out the default flags end up with LDBL_EQ_DBL isn't defined but it
>> should be for -mcpu=5282 builds.
>>
>> I don't know any mechanism to add header file variants in newlib by
>> multilib, so I we need to consider moving this to a dynamic check.
>>
>> Any thoughts on where to move this?
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.