Patchwork Allow decimal floats for mingw-w64

login
register
mail settings
Submitter JonY
Date Sept. 7, 2010, 4:12 p.m.
Message ID <4C866458.50401@users.sourceforge.net>
Download mbox | patch
Permalink /patch/64034/
State New
Headers show

Comments

JonY - Sept. 7, 2010, 4:12 p.m.
On 9/7/2010 23:56, JonY wrote:
> On 9/7/2010 23:57, H.J. Lu wrote:
>> On Tue, Sep 7, 2010 at 8:29 AM, JonY<jon_y@users.sourceforge.net> wrote:
>>> On 9/7/2010 22:06, H.J. Lu wrote:
>>>>
>>>> On Tue, Sep 7, 2010 at 1:51 AM, Kai Tietz<ktietz70@googlemail.com> 
>>>> wrote:
>>>>>
>>>>> 2010/9/3 JonY<jon_y@users.sourceforge.net>:
>>>>>>
>>>>>> On 9/3/2010 08:26, Dave Korn wrote:
>>>>>>>
>>>>>>> On 24/08/2010 16:06, Kai Tietz wrote:
>>>>>>>>
>>>>>>>> 2010/8/24 JonY<jon_y@users.sourceforge.net>:
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Attached patch enables i?86-w64-mingw32 and x86_64-w64-mingw32
>>>>>>>>> decimal
>>>>>>>>> float
>>>>>>>>> support with bid.
>>>>>>>>>
>>>>>>>>> Tested with x86_64-w64-mingw32. Is attached patch OK for trunk?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2010-08-24 Jonathan Yong<jon_y@users.sourceforge.net>
>>>>>>>>>
>>>>>>>>> * configure.ac: Allow w64 targets to use bid decimal floats.
>>>>>>>>> * configure: Regenerated.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> Patch is from my side ok. I added Dave to CC. Maybe he wants 
>>>>>>>> that it
>>>>>>>> gets added for cygwin, too?
>>>>>>>
>>>>>>> I'm currently testing a build that I did with Uros' patch and
>>>>>>> manually
>>>>>>> configuring with '--enable-decimal-float' and it seems to be going
>>>>>>> pretty
>>>>>>> well, so yes please Jon, if you don't mind spinning another respin.
>>>>>>>
>>>>>>
>>>>>> Spinning another respin? I thought --enable-decimal-float was ignored
>>>>>> for cygwin and mingw?
>>>>>>
>>>>>>> BTW, re Ralf's earlier point: for preference please actually /omit/
>>>>>>> the
>>>>>>> diffs of the generated configure files altogether, we only need 
>>>>>>> to see
>>>>>>> the
>>>>>>> change to the .ac file, because autoconf is very deterministic, 
>>>>>>> and the
>>>>>>> actual
>>>>>>> configure file diffs often contain tons of uninformative noise 
>>>>>>> from the
>>>>>>> expansions of all the macros and the changes in error line number
>>>>>>> reporting(*).
>>>>>>>
>>>>>>
>>>>>> Yes, I was wondering about that. New patch attached, this time only
>>>>>> configure.ac and the new m4 file.
>>>>>>
>>>>>
>>>>> Hello,
>>>>>
>>>>> Patch is ok. Thanks for reworking this but I would like that Paolo
>>>>> takes a look on it, too.
>>>>>
>>>>
>>>> Does this patch apply to trunk?
>>>>
>>>>
>>>
>>> Well, its supposed to be for gcc trunk.
>>>
>>> I did make another patch without the autoreconf stuff added, did it get
>>> lost?
>>>
>>
>> Where is it? Have you tried it on today's trunk?
>>
>>
> 
> I seems somebody has already committed a somewhat related patch, I'll 
> need to rework mine.

Looks like most of the changes are in, the only parts needed changing was:
Paolo Bonzini - Sept. 7, 2010, 4:34 p.m.
On 09/07/2010 06:12 PM, JonY wrote:
> Looks like most of the changes are in, the only parts needed changing was:
>
> Index: config/dfp.m4
> ===================================================================
> --- config/dfp.m4       (revision 163959)
> +++ config/dfp.m4       (working copy)
> @@ -20,7 +20,9 @@
>   ],
>   [
>     case $1 in
> -    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux*)
> +    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
> +    i?86*-*-mingw* | x86_64*-*-mingw* |\
> +    i?86*-*-cygwin* )
>         enable_decimal_float=yes
>         ;;
>       *)
>

This looks fine, thanks.  Dave/Kai?

Paolo
Kai Tietz - Sept. 7, 2010, 5:25 p.m.
2010/9/7 Paolo Bonzini <bonzini@gnu.org>:
> On 09/07/2010 06:12 PM, JonY wrote:
>>
>> Looks like most of the changes are in, the only parts needed changing was:
>>
>> Index: config/dfp.m4
>> ===================================================================
>> --- config/dfp.m4       (revision 163959)
>> +++ config/dfp.m4       (working copy)
>> @@ -20,7 +20,9 @@
>>  ],
>>  [
>>    case $1 in
>> -    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* |
>> s390*-*-linux*)
>> +    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* |
>> s390*-*-linux* | \
>> +    i?86*-*-mingw* | x86_64*-*-mingw* |\
>> +    i?86*-*-cygwin* )
>>        enable_decimal_float=yes
>>        ;;
>>      *)
>>
>
> This looks fine, thanks.  Dave/Kai?
>
> Paolo
>

Yes, this is ok by me. Paolo, will you commit it, or should I do?

Thanks,
Kai
Paolo Bonzini - Sept. 8, 2010, 8:06 a.m.
On 09/07/2010 07:25 PM, Kai Tietz wrote:
> 2010/9/7 Paolo Bonzini<bonzini@gnu.org>:
>> On 09/07/2010 06:12 PM, JonY wrote:
>>>
>>> Looks like most of the changes are in, the only parts needed changing was:
>>>
>>> Index: config/dfp.m4
>>> ===================================================================
>>> --- config/dfp.m4       (revision 163959)
>>> +++ config/dfp.m4       (working copy)
>>> @@ -20,7 +20,9 @@
>>>   ],
>>>   [
>>>     case $1 in
>>> -    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* |
>>> s390*-*-linux*)
>>> +    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* |
>>> s390*-*-linux* | \
>>> +    i?86*-*-mingw* | x86_64*-*-mingw* |\
>>> +    i?86*-*-cygwin* )
>>>         enable_decimal_float=yes
>>>         ;;
>>>       *)
>>>
>>
>> This looks fine, thanks.  Dave/Kai?
>>
>> Paolo
>>
>
> Yes, this is ok by me. Paolo, will you commit it, or should I do?

Please do it for both gcc and src.

Paolo
Dave Korn - Sept. 9, 2010, 8:08 p.m.
On 07/09/2010 18:25, Kai Tietz wrote:
> 2010/9/7 Paolo Bonzini <bonzini@gnu>:
>> On 09/07/2010 06:12 PM, JonY wrote:
>>> Looks like most of the changes are in, the only parts needed changing was:
>>>
>>> Index: config/dfp.m4
>>> ===================================================================
>>> --- config/dfp.m4       (revision 163959)
>>> +++ config/dfp.m4       (working copy)
>>> @@ -20,7 +20,9 @@
>>>  ],
>>>  [
>>>    case $1 in
>>> -    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* |
>>> s390*-*-linux*)
>>> +    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* |
>>> s390*-*-linux* | \
>>> +    i?86*-*-mingw* | x86_64*-*-mingw* |\
>>> +    i?86*-*-cygwin* )
>>>        enable_decimal_float=yes
>>>        ;;
>>>      *)
>>>
>> This looks fine, thanks.  Dave/Kai?
>>
>> Paolo
>>
> 
> Yes, this is ok by me. 

  Me too, in principle.  The final piece of the puzzle AFAICT is that we still
need to enable libbid in libgcc by adding the t-dfprules make frag. I'm
testing the attached patch on Cygwin; I've attached an untested (but hopefully
correct) equivalent for MinGW.

  I can't apply this for Cygwin yet because it needs fenv.h support to build,
but MinGW should be OK (someone had still better test it though, I'm not set
up for testing on MinGW right now).

  (I've got a patch to contribute fenv support to Cygwin that's about 90%
done, and I'll apply the Cygwin patch once that's been sent upstream and
incorporated.)

  Until this is done, there will still be regressions in the testsuite owing
to link failures, but that's not a reason not to start enabling DFP by
default; the compiler side of it all works even if the libc side isn't
complete at the Cygwin end.

    cheers,
      DaveK
Kai Tietz - Sept. 9, 2010, 8:20 p.m.
2010/9/9 Dave Korn <dave.korn.cygwin@gmail.com>:
> On 07/09/2010 18:25, Kai Tietz wrote:
>> 2010/9/7 Paolo Bonzini <bonzini@gnu>:
>>> On 09/07/2010 06:12 PM, JonY wrote:
>>>> Looks like most of the changes are in, the only parts needed changing was:
>>>>
>>>> Index: config/dfp.m4
>>>> ===================================================================
>>>> --- config/dfp.m4       (revision 163959)
>>>> +++ config/dfp.m4       (working copy)
>>>> @@ -20,7 +20,9 @@
>>>>  ],
>>>>  [
>>>>    case $1 in
>>>> -    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* |
>>>> s390*-*-linux*)
>>>> +    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* |
>>>> s390*-*-linux* | \
>>>> +    i?86*-*-mingw* | x86_64*-*-mingw* |\
>>>> +    i?86*-*-cygwin* )
>>>>        enable_decimal_float=yes
>>>>        ;;
>>>>      *)
>>>>
>>> This looks fine, thanks.  Dave/Kai?
>>>
>>> Paolo
>>>
>>
>> Yes, this is ok by me.
>
>  Me too, in principle.  The final piece of the puzzle AFAICT is that we still
> need to enable libbid in libgcc by adding the t-dfprules make frag. I'm
> testing the attached patch on Cygwin; I've attached an untested (but hopefully
> correct) equivalent for MinGW.
>
>  I can't apply this for Cygwin yet because it needs fenv.h support to build,
> but MinGW should be OK (someone had still better test it though, I'm not set
> up for testing on MinGW right now).
>
>  (I've got a patch to contribute fenv support to Cygwin that's about 90%
> done, and I'll apply the Cygwin patch once that's been sent upstream and
> incorporated.)
>
>  Until this is done, there will still be regressions in the testsuite owing
> to link failures, but that's not a reason not to start enabling DFP by
> default; the compiler side of it all works even if the libc side isn't
> complete at the Cygwin end.
>
>    cheers,
>      DaveK
>
>

Yeah, I found the same issue about the original patch. I was just
bootstrapping mingw's 32-bit and 64-bit version (for the latter I
found some fallout by the .cfi enabling for windows targets together
with HWINT=64-bit).

When my tests are through, I am fine with this additional
configuration patch. If you prefer I can remove i?86*-*-cygwin* for
dfp.m4, so you won't have failures here.

Cheers,
Kai
Dave Korn - Sept. 9, 2010, 9:11 p.m.
On 09/09/2010 21:20, Kai Tietz wrote:

> When my tests are through, I am fine with this additional
> configuration patch. If you prefer I can remove i?86*-*-cygwin* for
> dfp.m4, so you won't have failures here.

  Nah, as long as I don't add the libgcc configuration before Cygwin supports
fenv.h, the build won't break; people just won't be able to fully use the dfp
support yet.  But since the compiler side will work, and they could always in
theory supply their own libbid routines to link against, I think it's OK to
have it enabled.  The support will be in Cygwin before 4.6.0 gets released.

    cheers,
      DaveK
Kai Tietz - Sept. 10, 2010, 11:41 a.m.
2010/9/9 Dave Korn <dave.korn.cygwin@gmail.com>:
> On 09/09/2010 21:20, Kai Tietz wrote:
>
>> When my tests are through, I am fine with this additional
>> configuration patch. If you prefer I can remove i?86*-*-cygwin* for
>> dfp.m4, so you won't have failures here.
>
>  Nah, as long as I don't add the libgcc configuration before Cygwin supports
> fenv.h, the build won't break; people just won't be able to fully use the dfp
> support yet.  But since the compiler side will work, and they could always in
> theory supply their own libbid routines to link against, I think it's OK to
> have it enabled.  The support will be in Cygwin before 4.6.0 gets released.
>
>    cheers,
>      DaveK
>
>

So committed after bootstrap test for x86_64-w64-mingw32 and i686-w64-mingw32.

ChangeLog config

2010-09-10  Jonathan Yong  <jon_y@users.sourceforge.net>

	* dfp.m4: Enable decimal float for i?86 cygwin
	and mingw, and for x86_64 mingw.

ChangeLog libgcc

2010-09-10  Kai Tietz  <kai.tietz@onevision.com>

       * configure: Regenerated.

ChangeLog libdecnumber

2010-09-10  Kai Tietz  <kai.tietz@onevision.com>

       * configure: Regenerated.


ChangeLog gcc

2010-09-10  Kai Tietz  <kai.tietz@onevision.com>

	* configure: Regenerated.
	* config.gcc: Add for x86_64 and i?86 mingw t-dfprule.

At revision 164167.

Regards,
Kai

PS: Yes, fenv.h isn't an issue for mingw as we provide it already.

Patch

Index: config/dfp.m4
===================================================================
--- config/dfp.m4       (revision 163959)
+++ config/dfp.m4       (working copy)
@@ -20,7 +20,9 @@ 
 ],
 [
   case $1 in
-    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux*)
+    powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
+    i?86*-*-mingw* | x86_64*-*-mingw* |\
+    i?86*-*-cygwin* )
       enable_decimal_float=yes
       ;;
     *)