> > If there is an issue, it would be in "s-oscons-tmplt.c" which is supposed
> > to define Serial_Port_Descriptor as:
> >
> >    subtype Serial_Port_Descriptor is System.Win32.HANDLE;
> >
> > See:
> >
> > #if defined (__MINGW32__) || defined (__CYGWIN__)
> > # define TARGET_OS "Windows"
> > # define Serial_Port_Descriptor "System.Win32.HANDLE"
> > TXT("with System.Win32;")
> 
> Thanks, the "|| defined(__CYGWIN__)" is missing so
> Serial_Port_Descriptor becomes "int" on Cygwin, triggering the error.
> Revised patch below, re-tested on Cygwin64.

OK, this part (s-oscons-tmplt.c) is actually already pending on our side and
will be merged soon now that we're in stage 1, so we're good on that front.

For the rest of the patch (mingw32.h and unwind-generic.h), I'll let a cygwin
specialist comment/approve, it's OK with me on principle.

> This fixes three compilation errors preventing bootstrap of gcc-10/11
> with Ada on x86_64-pc-cygwin.  See PR bootstrap/94918 for details.
> 
> Tested by bootstrapping on x86_64-pc-cygwin, and since it touches code
> shared with mingw, also by building a cross to x86_64-w64-mingw32.
> 
> Ok for master and gcc-10 branch?
> 
> (I don't have commit rights, so I will need assistance with that.)
> 
> (The patch is also attached, since gmail _will_ corrupt this text.)
> 
> gcc/ada/
> 
> 2020-05-03  Mikael Pettersson  <mikpeli...@gmail.com>
> 
>         PR bootstrap/94918
> 
>         * mingw32.h: Prevent windows.h from including emmintrin.h on Cygwin64.
>         * s-oscons-tmplt.c (Serial_Port_Descriptor): Define as
>         System.Win32.HANDLE also on Cygwin.
> 
> libgcc/
> 
> 2020-05-03  Mikael Pettersson  <mikpeli...@gmail.com>
> 
>         PR bootstrap/94918
> 
>         * unwind-generic.h (__SEH__): Prevent windows.h from including
>         x86intrin.h and emmintrin.h.

Reply via email to