> On 11 Apr 2025, at 08:34, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote:
>
> Hi Jakub,
>
>> On Wed, Apr 09, 2025 at 02:22:16PM +0200, Rainer Orth wrote:
>>>> Here is what I'm testing as an incremental fix, so far OK on x86_64-darwin
>>>> and powerpcle64 (GLIBC 2.34) .. others in progress. Does it help the
>>>> Solaris cases?
>>>
>>> I'll give it a try. Here's what I have (I believe it's more readable in
>>> some cases), but as I said something's not right yet (probably something
>>> very stupid).
>>
>> Yes, most importantly
>>
>>> #if !defined (HAVE_STRFROMF128)
>>> -# if !USE_QUADMATH
>>> +static int
>>> +strfromf128 (char *s, size_t n, const char *f, long double v)
>>
>> this long double should have been GCOB_FP128.
>
> ugh, I knew it would be something dumb ;-)
>
>> Anyway, I think there should be consistency in what we use, so like
>> libgcobol-fp.h specifies, IEEE quad long double should have highest
>> priority, then _Float128 with *f128 APIs, then libquadmath.
>> And when we decide to use say long double, we shouldn't mix that with
>> strfromf128/strtof128.
>
> Makes perfect sense.
>
>> So, here is an updated patch based on your patch, so far briefly
>> tested on x86_64 with recent glibc (i.e. with the *f128 APIs).
>
> I've successfully bootstrapped that now on both Solaris/amd64 and
> Solaris/sparcv9, with --enable-languages=cobol --enable-libgcobol and a
> bunch of patches (to be posted shortly) that enable cobol and libgcobol
> compilation on Solaris.
>
> Test results are not stellar so far, though:
>
> * amd64-pc-solaris2.11, which uses the libquadmath path:
>
> === cobol Summary for unix ===
>
> # of expected passes 2925
> # of unexpected failures 108
> # of expected failures 6
> # of unresolved testcases 72
>
> According to Iain, Darwin/x86_64 is similar, though.
On x86_64 Darwin 102 fails almost exactly 50/50 PR119377 / PR119524
On aarch64 Darwin 108 fails, I did not yet analyse the additional failing case
on aarch64.
Iain
>
> * sparcv9-sun-solaris2.11, which used the 128-bit long double path:
>
> === cobol Summary for unix ===
>
> # of expected passes 2516
> # of unexpected failures 440
> # of expected failures 6
> # of unresolved testcases 126
>
> I do have a WIP patch to support __float128 on SPARC (which I'd use
> with Iain's initial patch), but that's no longer exercised now that
> 128-bit long double takes precedence.
>
> I haven't even started looking into the failures since my initial goal
> was to get both cobol and libgcobol to compile on Solaris at all. I
> suppose SPARC being the first big-endian and strict-alignment target
> accounts for a considerable part of the failures.
>
> Thanks a lot for following through with this.
>
> Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University