From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35724 invoked by alias); 17 Mar 2019 12:29:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 34890 invoked by uid 89); 17 Mar 2019 12:29:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*M:googlemail, msvc, behaves, MSVC X-HELO: mail-wm1-f65.google.com Received: from mail-wm1-f65.google.com (HELO mail-wm1-f65.google.com) (209.85.128.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 17 Mar 2019 12:29:35 +0000 Received: by mail-wm1-f65.google.com with SMTP id t124so9970613wma.4 for ; Sun, 17 Mar 2019 05:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=ULr3FsqhYVGBVc8yWyCLzEI3u6GqVtFAdAakT6RdtMI=; b=MelcMI5Jm6+Kg0DaER4I7J39oCTIqlsLvYjl2tobV520YCRH2y0nOaa2R0Q0CNvulK 0tXiLvQuHnOeyMYBlHHvD6/ypjOxz2H/sY/uipKjNQZr61ZprGrnNzStGEXZYAXjl4oa OmUKSy2L+WKFX35Ua0UJRqejTTvnq3hs1x2k8srpFRxK00YyHuIITHmIRTX+v0AtsX8p em3s4yIBXIFxRXEHa+5KyvPybQAjFgrRpoCGLLZmCcNDq1h1ZYaZpEckj5p1BEyCiCIv rXmRNLUwJpsaGA9Dp4aAC37B2TaQL1V4T2QFxzk5WGk8V1JX2bPb3rbJ1hV/s//zgl4b 06Pg== Return-Path: Received: from [192.168.4.158] ([91.137.122.112]) by smtp.googlemail.com with ESMTPSA id y192sm3789126wmc.6.2019.03.17.05.29.32 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sun, 17 Mar 2019 05:29:32 -0700 (PDT) From: Johannes Pfau Subject: Ping [PATCH] [MinGW] Set __USE_MINGW_ACCESS for C++ as well To: gcc-patches@gcc.gnu.org References: <20190303104156.8765-1-johannespfau@gmail.com> Cc: 10walls@gmail.com Message-ID: <1f1789b4-24eb-f43a-5b7b-6c6743d554df@googlemail.com> Date: Sun, 17 Mar 2019 12:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20190303104156.8765-1-johannespfau@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00816.txt.bz2 Am 03.03.19 um 11:41 schrieb Johannes Pfau: > We set __USE_MINGW_ACCESS for windows hosts to use MinGWs wrapper > for the access function. The wrapper ensures that access behaves > in the expected way (e.g. for special files, such as nul). > However, we now compile most sources with the C++ compiler and > the __USE_MINGW_ACCESS in CFLAGS is not used there. This causes > GCCs build against newer msvcrt versions with incompatible > access implementations to fail. This patch adds the flag to the > CXXFLAGS for all bootstrap stages. Bootstrapped on > x86_64-mingw64-seh. > > config/ChangeLog: > > 2019-03-02 Johannes Pfau > > * mh-mingw: Also set __USE_MINGW_ACCESS flag for C++ code. > > --- > config/mh-mingw | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/config/mh-mingw b/config/mh-mingw > index bc1d27477d0..a795096f038 100644 > --- a/config/mh-mingw > +++ b/config/mh-mingw > @@ -2,6 +2,11 @@ > # Vista (see PR33281 for details). > BOOT_CFLAGS += -D__USE_MINGW_ACCESS -Wno-pedantic-ms-format > CFLAGS += -D__USE_MINGW_ACCESS > +STAGE1_CXXFLAGS += -D__USE_MINGW_ACCESS > +STAGE2_CXXFLAGS += -D__USE_MINGW_ACCESS > +STAGE3_CXXFLAGS += -D__USE_MINGW_ACCESS > +STAGE4_CXXFLAGS += -D__USE_MINGW_ACCESS > + > # Increase stack limit to a figure based on the Linux default, with 4MB added > # as GCC turns out to need that much more to pass all the limits-* tests. > LDFLAGS += -Wl,--stack,12582912 Ping. Would be great to get this into GCC as https://github.com/niXman/mingw-builds/ now has a --with-default-msvcrt= which simplifies building MinGW for a specific MSVC version a lot, but at least the bootstrap builds are currently blocked by this issue. Best regards, Johannes