> 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?
No, the libgnat/g-sercom__mingw.adb is wrong and isn't needed. 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;") The mingw32.h change is kludgy but probably not worse than the current state so probably OK I guess (if some cygwin specialist could confirm that would be great though). > libgcc/ > > 2020-05-02 Mikael Pettersson <mikpeli...@gmail.com> > > PR bootstrap/94918 > > * unwind-generic.h (__SEH__): Prevent windows.h from including > x86intrin.h and emmintrin.h. Same comment here, I'll let someone review this part (and comment on the mingw32.h change at the same time since both are basically similar. > --- gcc-10.1.0-RC-20200430/gcc/ada/mingw32.h.~1~ 2020-04-30 > 22:51:33.000000000 +0200 > +++ gcc-10.1.0-RC-20200430/gcc/ada/mingw32.h 2020-05-02 > 16:36:44.485724702 +0200 > @@ -56,6 +56,7 @@ > /* Note: windows.h on cygwin-64 includes x86intrin.h which uses malloc. > That fails to compile, if malloc is poisoned, i.e. if !IN_RTS. */ > #define _X86INTRIN_H_INCLUDED > +#define _EMMINTRIN_H_INCLUDED > #endif > #include <windows.h> > > --- gcc-10.1.0-RC-20200430/libgcc/unwind-generic.h.~1~ 2020-04-30 > 22:51:36.000000000 +0200 > +++ gcc-10.1.0-RC-20200430/libgcc/unwind-generic.h 2020-05-02 > 16:36:44.485724702 +0200 > @@ -30,6 +30,8 @@ > > #if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) > /* Only for _GCC_specific_handler. */ > +#define _X86INTRIN_H_INCLUDED > +#define _EMMINTRIN_H_INCLUDED > #include <windows.h> > #endif