GCC 8 changed behaviour wrt this, and made it consistent for cross compilation cases. While it's a change, it's a more sensible behaviour going forward.
Details
Diff Detail
Event Timeline
This change broke the configure step of Firefox mingw builds.
The build bot won't give me the full details, so I'll need to set up a local repro next week if needed, but my hunch is that we have some test like $CC $CFLAGS conftest.c -o conftest and then check for the existence of conftest.
Is that type of pattern an acceptable casualty of this change?
I presume that's to be expected - it's certainly a pain, but anybody crosscompiling with GCC and updating to 8 or newer is going to be running into the same there as well.
FWIW, the change in GCC that changes this was this one: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=5bc86b599054f494ec0a45e49b82749320eaa9c4;hp=77efd154f33154e819186de79687ea55552139f4
This at least clarifies the situation, because the inconsistency (which show up e.g. in handwritten makefiles) between compiling natively vs crosscompiling has been pretty weird.