From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 2A0F63858D37 for ; Mon, 22 May 2023 20:08:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A0F63858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nexgo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1q1BpQ-0002fC-TI for gcc@gcc.gnu.org; Mon, 22 May 2023 22:08:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc@gcc.gnu.org From: Achim Gratz Subject: Re: gcc-12.3 cannot build gcc-ada on Cygwin Date: Mon, 22 May 2023 22:08:19 +0200 Organization: Linux Private Site Message-ID: <874jo49ljg.fsf@Rainer.invalid> References: <87wn11iqwf.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cancel-Lock: sha1:HmcSGwXuFvq+8CzTTimYD60kQT4= X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: LIU Hao via Gcc writes: > 在 2023-05-22 00:35, Achim Gratz 写道: >> The error probably is in part a result of using g++ for the compilation, >> but other than that I don't really have an idea what goes on here or how >> to fix it. > > This looks like https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108300. Apparently yes. Thanks for pointing that out. > It's because GCC defines `abort` as a macro; and the Windows header > 'msxml.h', which is included indirectly by 'accctrl.h' (within Ada and > GCC JIT), has a member function with that same name. > > Previously, mingw-w64 had a distinct 'msxml.h' which did `push_macro` > and `pop_macro`, but it's now imported from wine for additional > functionality, while the wine header does not have those pragmas and > is causing trouble. GCC should not have defined macros which match > standard functions like that (see Comment 9 on the PR above). Sadly > nobody has refactored it so far. > > A temporary fix for this issue is to add `-DCOM_NO_WINDOWS_H` in > `CPPFLAGS` when building GCC. I've backported the patch _and_ defined both WIN32_LEAN_AND_MEAN and COM_NO_WINDOWS_H (of which I find no reference anywhere in the sources, so it's probably doing something in the Windows headers?) and the build has been working through stage 3. The Cygwin build probably shouldn't pull in Windows headers at all, but checking that is for another time. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada