re: CVS commit: src/external/gpl3/gcc/dist/libobjc

2019-10-16 Thread matthew green
> >> > Module Name: src
> >> > Committed By:christos
> >> > Date:Wed Oct 16 15:01:56 UTC 2019
> >> > 
> >> > Modified Files:
> >> >  src/external/gpl3/gcc/dist/libobjc: encoding.c
> >> > 
> >> > Log Message:
> >> > prevent DFmode re-definition.
> >> 
> >> i'm not a fan of this one.  i'd like to figure out
> >> what is really happening here..
> >> 
> >> i've been using the same hack, but i didn't want to
> >> commit it because i don't understand it.
> >> 
> >> 
> >> .mrg.
> >
> >I'd like to note that upstream adopted the same choice.
> >https://gcc.gnu.org/viewcvs/gcc?view=revision=269429
> 
> That's what we'll keep then :-)

works for me.  thanks!


Re: CVS commit: src/external/gpl3/gcc/dist/libobjc

2019-10-16 Thread Christos Zoulas
In article <20191016220250.ga23...@homeworld.netbsd.org>,
  wrote:
>On Thu, Oct 17, 2019 at 07:08:45AM +1100, matthew green wrote:
>> "Christos Zoulas" writes:
>> > Module Name:   src
>> > Committed By:  christos
>> > Date:  Wed Oct 16 15:01:56 UTC 2019
>> > 
>> > Modified Files:
>> >src/external/gpl3/gcc/dist/libobjc: encoding.c
>> > 
>> > Log Message:
>> > prevent DFmode re-definition.
>> 
>> i'm not a fan of this one.  i'd like to figure out
>> what is really happening here..
>> 
>> i've been using the same hack, but i didn't want to
>> commit it because i don't understand it.
>> 
>> 
>> .mrg.
>
>I'd like to note that upstream adopted the same choice.
>https://gcc.gnu.org/viewcvs/gcc?view=revision=269429

That's what we'll keep then :-)

christos




Re: CVS commit: src/external/gpl3/gcc/dist/libobjc

2019-10-16 Thread maya
On Thu, Oct 17, 2019 at 07:08:45AM +1100, matthew green wrote:
> "Christos Zoulas" writes:
> > Module Name:src
> > Committed By:   christos
> > Date:   Wed Oct 16 15:01:56 UTC 2019
> > 
> > Modified Files:
> > src/external/gpl3/gcc/dist/libobjc: encoding.c
> > 
> > Log Message:
> > prevent DFmode re-definition.
> 
> i'm not a fan of this one.  i'd like to figure out
> what is really happening here..
> 
> i've been using the same hack, but i didn't want to
> commit it because i don't understand it.
> 
> 
> .mrg.

I'd like to note that upstream adopted the same choice.
https://gcc.gnu.org/viewcvs/gcc?view=revision=269429


Re: CVS commit: src/external/gpl3/gcc/dist/libobjc

2019-10-16 Thread Christos Zoulas
In article <9715.1571256...@splode.eterna.com.au>,
matthew green   wrote:
>"Christos Zoulas" writes:
>> Module Name: src
>> Committed By:christos
>> Date:Wed Oct 16 15:01:56 UTC 2019
>> 
>> Modified Files:
>>  src/external/gpl3/gcc/dist/libobjc: encoding.c
>> 
>> Log Message:
>> prevent DFmode re-definition.
>
>i'm not a fan of this one.  i'd like to figure out
>what is really happening here..
>
>i've been using the same hack, but i didn't want to
>commit it because i don't understand it.

I've looked into it:
The definition comes from:

src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/insn-modes.h:317
#ifdef USE_ENUM_MODES
#define DFmode E_DFmode
#else
#define DFmode (scalar_float_mode ((scalar_float_mode::from_int) E_DFmode))
#endif

These defines are new in gcc8. The older gcc does not have E_DFmode,
and just uses the DFmode enum (which has now been renamed E_DFmode).

So the encoding.c has been changed to use the new E_DFmode in one place:


--- /usr/src/external/gpl3/gcc.old//dist/libobjc/encoding.c 2019-10-16 
17:44:57.910551512 -0400
+++ /usr/src/external/gpl3/gcc//dist/libobjc/encoding.c 2019-10-16 
17:45:05.111849735 -0400
@@ -1,5 +1,5 @@
 /* Encoding of types for Objective C.
-   Copyright (C) 1993-2017 Free Software Foundation, Inc.
+   Copyright (C) 1993-2018 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup
Bitfield support by Ovidiu Predescu
 
@@ -162,7 +162,7 @@
   case UNION_TYPE:
return MAX (MAX (comp, spec), objc_alignof_type (_stp) * __CHAR_BIT__);
break;
-  case DFmode:
+  case E_DFmode:
   case _C_LNG_LNG:
   case _C_ULNG_LNG:
return MAX (MAX (comp, spec), 64);

The only other place DFmode is used is:

/*  FIXME: while this file has no business including tm.h, this
definitely has no business defining this macro but it
is only way around without really rewritting this file,
should look after the branch of 3.4 to fix this.   */
#define rs6000_special_round_type_align(STRUCT, COMPUTED, SPECIFIED)\
  ({ const char *_fields = TYPE_FIELDS (STRUCT);\
  ((_fields != 0\
&& TYPE_MODE (strip_array_types (TREE_TYPE (_fields))) == DFmode)   \
   ? MAX (MAX (COMPUTED, SPECIFIED), 64)\
   : MAX (COMPUTED, SPECIFIED));})

So think that the right fix is to change the second DFmode to E_DFmode and
then delete the re-definition.

christos





re: CVS commit: src/external/gpl3/gcc/dist/libobjc

2019-10-16 Thread matthew green
"Christos Zoulas" writes:
> Module Name:  src
> Committed By: christos
> Date: Wed Oct 16 15:01:56 UTC 2019
> 
> Modified Files:
>   src/external/gpl3/gcc/dist/libobjc: encoding.c
> 
> Log Message:
> prevent DFmode re-definition.

i'm not a fan of this one.  i'd like to figure out
what is really happening here..

i've been using the same hack, but i didn't want to
commit it because i don't understand it.


.mrg.


CVS commit: src/external/gpl3/gcc/dist/libobjc

2019-10-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 16 15:01:56 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libobjc: encoding.c

Log Message:
prevent DFmode re-definition.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/dist/libobjc/encoding.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/libobjc/encoding.c
diff -u src/external/gpl3/gcc/dist/libobjc/encoding.c:1.10 src/external/gpl3/gcc/dist/libobjc/encoding.c:1.11
--- src/external/gpl3/gcc/dist/libobjc/encoding.c:1.10	Tue Oct  1 06:38:22 2019
+++ src/external/gpl3/gcc/dist/libobjc/encoding.c	Wed Oct 16 11:01:56 2019
@@ -81,6 +81,7 @@ see the files COPYING3 and COPYING.RUNTI
 #define DECL_MODE(TYPE) *(TYPE)
 #define TYPE_MODE(TYPE) *(TYPE)
 
+#undef DFmode
 #define DFmode  _C_DBL
 
 #define strip_array_types(TYPE)  ({const char *_field = (TYPE); \



CVS commit: src/external/gpl3/gcc/dist/libobjc

2019-10-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 16 15:01:56 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/libobjc: encoding.c

Log Message:
prevent DFmode re-definition.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/dist/libobjc/encoding.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.