From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.eu.adacore.com (mel.act-europe.fr [IPv6:2a02:2ab8:224:1::a0a:d2]) by sourceware.org (Postfix) with ESMTPS id 87022385802B for ; Sun, 10 Jan 2021 10:57:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 87022385802B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=charlet@eu.adacore.com Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 5F2FB82426; Sun, 10 Jan 2021 11:57:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at eu.adacore.com Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8a7b-_TiKies; Sun, 10 Jan 2021 11:57:00 +0100 (CET) Received: from chelles.localdomain (chelles.act-europe.fr [IPv6:2a02:2ab8:224:1:d6be:d9ff:fef8:4565]) by smtp.eu.adacore.com (Postfix) with ESMTP id 47A6982404; Sun, 10 Jan 2021 11:57:00 +0100 (CET) Received: by chelles.localdomain (Postfix, from userid 525) id 2B2FF1EA007E; Sun, 10 Jan 2021 11:57:00 +0100 (CET) Date: Sun, 10 Jan 2021 11:57:00 +0100 From: Arnaud Charlet To: Mikael Pettersson Cc: GCC Patches Subject: Re: [PATCH v2] fix Ada bootstrap on Cygwin64 (PR bootstrap/94918) Message-ID: <20210110105700.GA22908@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2021 10:57:03 -0000 > 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? Arno > gcc/ada/ > > 2021-01-10 Mikael Pettersson > > PR bootstrap/94918 > * raise-gcc.c: (__SEH__): Prevent windows.h from including > x86intrin.h or emmintrin.h on Cygwin64. > > --- gcc-11-20210103/gcc/ada/raise-gcc.c.~1~ 2021-01-03 > 23:32:14.000000000 +0100 > +++ gcc-11-20210103/gcc/ada/raise-gcc.c 2021-01-10 11:13:07.878685936 +0100 > @@ -79,6 +79,15 @@ typedef char bool; > (SJLJ or DWARF). We need a consistently named interface to import from > a-except, so wrappers are defined here. */ > > +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) && \ > + defined (__CYGWIN__) && !defined (__CYGWIN32__) && !defined (IN_RTS) > +/* Note: windows.h (via unwind-generic.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 > + > #ifndef IN_RTS > /* For gnat1/gnatbind compilation: cannot use unwind.h, as it is for the > target. So mimic configure...