From: Eric Botcazou Date: Mon, 4 May 2020 21:32:39 +0000 (+0200) Subject: Fix Ada bootstrap on Cygwin64 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc7e4de998cd2a31eb7c834fd427e7f16a99d60a;p=gcc.git Fix Ada bootstrap on Cygwin64 This fixes two compilation errors preventing bootstrap with Ada on x86_64-pc-cygwin. 2020-05-04 Mikael Pettersson PR bootstrap/94918 * mingw32.h: Prevent windows.h from including emmintrin.h on Cygw64. * s-oscons-tmplt.c (Serial_Port_Descriptor): Use System.Win32.HANDLE also on Cygwin. --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5349fd96a8f..eacc976e14b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2020-05-04 Mikael Pettersson + + PR bootstrap/94918 + * mingw32.h: Prevent windows.h from including emmintrin.h on Cygwin64. + * s-oscons-tmplt.c (Serial_Port_Descriptor): Use System.Win32.HANDLE + also on Cygwin. + 2020-03-11 Richard Wai * gcc-interface/decl.c (gnat_to_gnu_entity): Also test Is_Public on diff --git a/gcc/ada/mingw32.h b/gcc/ada/mingw32.h index fe6464fd601..3dbf7974a67 100644 --- a/gcc/ada/mingw32.h +++ b/gcc/ada/mingw32.h @@ -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 diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index 4c3ecc60572..2a1be803b41 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -261,7 +261,7 @@ main (void) { TXT("-- This is the version for " TARGET) TXT("") TXT("with Interfaces.C;") -#if defined (__MINGW32__) +#if defined (__MINGW32__) || defined (__CYGWIN__) # define TARGET_OS "Windows" # define Serial_Port_Descriptor "System.Win32.HANDLE" TXT("with System.Win32;")