https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105506

--- 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
commit:

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=4a5e71f2348adcc49939804889d9f1a64d97005a

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=gcc.git;a=commitdiff;h=ab18659afc054434cef4d4757a3519f1100adc52
- but I tested the commit above with this one cherrypicked on top.)

Reply via email to