On Sun, Jan 10, 2021 at 11:57 AM Arnaud Charlet wrote: > > > This fixes a compilation error preventing bootstrap with Ada on > > x86_64-pc-cygwin. See PR bootstrap/94918 for details. > > > > Compared to the initial patch sent in May 2020, this v2 patch places > > the fix in Ada's raise-gcc.c instead of the shared unwind-generic.h, > > which should hopefully simplify getting it applied. > > Not sure why. Applying it there looks incomplete and kludgy, don't you > agree? Ok, then here's v3 which places the fix in unwind-generic.h. The fix matches what Ada's mingw32.h does. Tested by bootstrapping this and the preliminary workaround for PR98590 on x86_64-pc-cygwin. Ok for master and branches? libgcc/ 2021-01-10 Mikael Pettersson PR bootstrap/94918 * unwind-generic.h (__SEH__): Prevent windows.h from including x86intrin.h or emmintrin.h on Cygwin64. --- gcc-11-20210103/libgcc/unwind-generic.h.~1~ 2021-01-03 23:32:20.000000000 +0100 +++ gcc-11-20210103/libgcc/unwind-generic.h 2021-01-09 14:51:16.262378715 +0100 @@ -30,6 +30,12 @@ #if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) /* Only for _GCC_specific_handler. */ +#if defined (__CYGWIN__) && !defined (__CYGWIN32__) && !defined (IN_RTS) +/* 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 #endif