From patchwork Sun Mar 3 10:41:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Pfau X-Patchwork-Id: 1050848 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-497271-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="T7qWUv2z"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="W0XgRpx0"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44C08q2khRz9s47 for ; Sun, 3 Mar 2019 21:42:12 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version :content-transfer-encoding; q=dns; s=default; b=NEEwTftA4frBmuTs 1xlZNEgr7I66Jx/Xz00ghktVEJm8n8Am8BhiPGLCPQcQSWwxeOF9TpmLdnRjfRpz 7g9ZQgFx/Ikg9kuVRcawpQ4ewgRFhz7fZkZY0EfFVw9SIB2+3uB9Jf2d0MY4/zGA WfCYyUMfWJ4TeBBcfSFOOPCtFGE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version :content-transfer-encoding; s=default; bh=eRL/KrYtPx1MQmmUs3KCL5 /Kdm4=; b=T7qWUv2zgqTLD/POYfxajRZ9YRAKwcIPqdhT3uuiaRMLFU8tIGoXWA YNjCV09ZdZlnjkF9+atd1RrGzE0Xumc4eKuW3k7+0lfolQyCP3ngtwBObDQQ/y0Q GPJOI3Q7G2biJVo2kccBo8RPgGVH3RtqITUnbvU59Aja7PYjJfuKQ= Received: (qmail 75194 invoked by alias); 3 Mar 2019 10:42:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 75185 invoked by uid 89); 3 Mar 2019 10:42:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=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.2 spammy=Hx-languages-length:1394, HX-Received:Sun, HContent-Transfer-Encoding:8bit X-HELO: mail-wm1-f45.google.com Received: from mail-wm1-f45.google.com (HELO mail-wm1-f45.google.com) (209.85.128.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 03 Mar 2019 10:42:03 +0000 Received: by mail-wm1-f45.google.com with SMTP id f65so556856wma.2 for ; Sun, 03 Mar 2019 02:42:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3oMagrKdwMjAzycl+2M2IZUOejTNYm112dCuqzFsRxU=; b=W0XgRpx0OE9884qQ+9A4oH0fKyGyXWluHrXVITOv29b+V7u4mzV7GAQBLvaNgONw7C otENYpaPuNpuzKihaRLUKHNkmV58cc4UrOeTMNGTbwFRpmrjqyekY+4h+M0co5W09eLa nl3iVedeaV0DLxyrtS0bOzzn2+ww+uxLaaMY9D/ghxoZGBs2iKkJQLMPec0JodlX0GKn tsiwGQQXAFmzlZro1rPbUo1pjWKNfo2yCtdzZyH1ftAXn3KQk7qhGV6CJVDPpFj6r5EN Gyu7Ikllqr3K7NalShSJlcApE4eUQV49p+jt/K+v6iCH+m15aQt+1aVX81VsGS431HpH vi2A== Received: from jp-laptop.itiv.kit.edu ([2a00:1398:4:3601:c037:2aff:fea9:73f7]) by smtp.gmail.com with ESMTPSA id d24sm10211938wrb.47.2019.03.03.02.41.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Mar 2019 02:42:00 -0800 (PST) From: Johannes Pfau To: gcc-patches@gcc.gnu.org Subject: [PATCH] [MinGW] Set __USE_MINGW_ACCESS for C++ as well Date: Sun, 3 Mar 2019 11:41:56 +0100 Message-Id: <20190303104156.8765-1-johannespfau@gmail.com> MIME-Version: 1.0 X-IsSubscribed: yes 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