https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460
--- Comment #11 from Costas Argyris <costas.argyris at gmail dot com> --- As I said before, I think adding the "-o" flag to $(COMPILER) -c $< -o $@ is a good and harmless change, but, as per your own report, it didn't solve your issues because you still got that mysterious line: utf8-mingw32.o: In function `WinMainCRTStartup': which doesn't make sense to me. This makes me suspect that the problem is something else and not the abscence of "-o". These object files have nothing to do with such main functions that are associated with executables. So unless you come up with gcc-specific reproduction steps for me to investigate, you have to figure out why this object file even has a WinMainCRTStartup function after adding the "-o" flag. I also noticed you are using gcc 7.3 as the cross-compiler. Would it be possible to use a more recent version, just to see if that makes a difference?