Re: [PATCH] Add VxWorks fixincludes hack, kernel math.h FP_ constants

2022-01-10 Thread Olivier Hainque via Gcc-patches
Hi Rasmus,

> On 17 Dec 2021, at 21:47, Olivier Hainque  wrote:
> 
>>> Don't you also need to add an fpclassify() macro? There's a
>> 
>> We have a separate "fix" for a set of such functions indeed.

> I probably can merge the two, actually. I'll do that.

We have had pretty good results with the attached patch,
which adds definitions of a few classification macros allowing
the "checking for ISO C99 support in  for C++98"
bit to pass.

Hope this would work for you as well,

Cheers,

Olivier

2021-01-10  Olivier Hainque  

* inclhack.def (vxworks_math_h_fp_c99): New hack.
* tests/base/math.h: Update.
* fixincl.x: Regenerate.



0001-Add-VxWorks-fixincludes-hack-C99-FP-classification.patch
Description: Binary data






Re: [PATCH] Add VxWorks fixincludes hack, kernel math.h FP_ constants

2021-12-17 Thread Olivier Hainque via Gcc-patches



> On 17 Dec 2021, at 20:16, Olivier Hainque  wrote:
> 
>> Don't you also need to add an fpclassify() macro? There's a
>> 
>> checking for ISO C99 support in  for C++98
>> 
>> which checks whether math.h supplies (among others) fpclassify().
> 
> We have a separate "fix" for a set of such functions indeed.

I probably can merge the two, actually. I'll do that.

>> We've patched our math.h to supply those constants as well as an
>> fpclassify() macro. So I suppose the 'bypass = "FP_INFINITE"' would mean
>> that this fixinclude would just be skipped for our case(?).
> 
> That's my understanding, yes.



Re: [PATCH] Add VxWorks fixincludes hack, kernel math.h FP_ constants

2021-12-17 Thread Olivier Hainque via Gcc-patches
Hi again Rasmus,

> On 17 Dec 2021, at 14:03, Rasmus Villemoes  wrote:
> 
> On 17/12/2021 13.10, Olivier Hainque wrote:
>> Hello,
>> 
>> The attached patch adds a fixincludes add for VxWorks
>> to add missing FP_ constant definition to math.h, intended
>> for old versions of the kernel math.h header.
> 
> Don't you also need to add an fpclassify() macro? There's a
> 
> checking for ISO C99 support in  for C++98
> 
> which checks whether math.h supplies (among others) fpclassify().

We have a separate "fix" for a set of such functions indeed.

> We've patched our math.h to supply those constants as well as an
> fpclassify() macro. So I suppose the 'bypass = "FP_INFINITE"' would mean
> that this fixinclude would just be skipped for our case(?).

That's my understanding, yes.



Re: [PATCH] Add VxWorks fixincludes hack, kernel math.h FP_ constants

2021-12-17 Thread Rasmus Villemoes via Gcc-patches
On 17/12/2021 13.10, Olivier Hainque wrote:
> Hello,
> 
> The attached patch adds a fixincludes add for VxWorks
> to add missing FP_ constant definition to math.h, intended
> for old versions of the kernel math.h header.

Don't you also need to add an fpclassify() macro? There's a

checking for ISO C99 support in  for C++98

which checks whether math.h supplies (among others) fpclassify().

We've patched our math.h to supply those constants as well as an
fpclassify() macro. So I suppose the 'bypass = "FP_INFINITE"' would mean
that this fixinclude would just be skipped for our case(?).

Rasmus


[PATCH] Add VxWorks fixincludes hack, kernel math.h FP_ constants

2021-12-17 Thread Olivier Hainque via Gcc-patches
Hello,

The attached patch adds a fixincludes add for VxWorks
to add missing FP_ constant definition to math.h, intended
for old versions of the kernel math.h header.

As the other patches in the series, this helps libstdc++
build failures for old versions of VxWorks, 6.9 in particular
for which we were able to get a successful complete build
after this.

Also bootstrapped and regression tested ok for x86_64-linux,
just in case.

Ok to commit?

Thanks in advance,

With Kind Regards,

Olivier

2021-12-16  Olivier Hainque  

fixincludes/
* inclhack.def (vxworks_math_h_FP_macros): New hack.
* tests/base/math.h: Update expected results.
* fixinc.x: Regenerate.



0003-Add-VxWorks-fixincludes-hack-kernel-math.h-FP_-const.patch
Description: Binary data