From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F2CC385840C; Mon, 6 Jun 2022 11:07:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F2CC385840C From: "martin at martin dot st" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105506] Error building GCC 12.1.0 against MinGW-w64: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory Date: Mon, 06 Jun 2022 11:07:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: martin at martin dot st X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2022 11:07:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105506 --- Comment #8 from Martin Storsj=C3=B6 --- (In reply to Brecht Sanders from comment #7) > So I guess the question that remains is: Where is -D__USE_MINGW_ACCES > missing in the configuration of GCC 12? >=20 > It would seem to me the answer lies in code added since GCC 11 that conta= ins > access()/X_OK. I bisected, and it seems like a build system adjustment makes it lose the f= lags that are added in config/mh-mingw (where they are added to CFLAGS, CXXFLAGS= and a bunch of other *_CXXFLAGS). The built GCC reproduces the issue since this commit: https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommitdiff;h=3D4a5e71f2348adcc4993= 9804889d9f1a64d97005a Unfortunately, the build system changes here are slightly complex, so it's = not entirely obvious to me where the flags that are added to CFLAGS/CXXFLAGS are lost. (Due to other commits around it, cross compiling GCC from linux to windows fails entirely, until a couple commits later though - https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommitdiff;h=3Dab18659afc054434cef= 4d4757a3519f1100adc52 - but I tested the commit above with this one cherrypicked on top.)=