[Bug target/105506] Error building GCC 12.1.0 against MinGW-w64: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory

martin at martin dot st gcc-bugzilla@gcc.gnu.org
Mon Jun 6 11:07:29 GMT 2022


--- Comment #8 from Martin Storsjö <martin at martin dot st> ---
(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?
> It would seem to me the answer lies in code added since GCC 11 that contains
> access()/X_OK.

I bisected, and it seems like a build system adjustment makes it lose the flags
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


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

(Due to other commits around it, cross compiling GCC from linux to windows
fails entirely, until a couple commits later though -
- but I tested the commit above with this one cherrypicked on top.)

More information about the Gcc-bugs mailing list