When linking with -flto=auto, lto-wrapper tries to parallelize the LTO step by creating a temporary .mk file and running it with the first make it can find on the PATH. Since mingw-lite doesn't bundle make.exe itself, this might end up running an incompatible Make that might cause the build to fail with an issue like
$ gcc -flto=auto empty_main.c
C:/path/to/mingw32_486-msvcrt_win98-15/bin/../lib/gcc/i686-w64-mingw32/15/../../../..//bin/ld.exe: cannot find C:\Windows\Temp\ccqFjR3S.ltrans0.ltrans.o: No such file or directory
The easy solution of just copying mingw32-make.exe to make.exe in the archives might create other problems because users might expect the regular make to behave in a non-MinGW way. Patching lto-wrapper to explicitly call mingw32-make instead of make is probably the better fix; the temporary .mk files use backslashed Windows paths and therefore already expect the MinGW Make behavior:
C:\Windows\Temp\cceuoulK.ltrans0.ltrans.o:
@g++ '-xlto' '-c' '-fno-openmp' '-fno-openacc' '-fno-pie' '-fcf-protection=none' '-mtune=generic' '-march=i486' '-static-libgcc' '-mtune=generic' '-march=i486' '-dumpdir' 'a.' '-dumpbase' './a.ltrans0.ltrans' '-fltrans' '-o' 'C:\Windows\Temp\cceuoulK.ltrans0.ltrans.o' 'C:\Windows\Temp\cceuoulK.ltrans0.o' -truncate 'C:\Windows\Temp\cceuoulK.ltrans0.o'
.PHONY: all
all: \
C:\Windows\Temp\cceuoulK.ltrans0.ltrans.o
When linking with
-flto=auto, lto-wrapper tries to parallelize the LTO step by creating a temporary .mk file and running it with the firstmakeit can find on the PATH. Since mingw-lite doesn't bundlemake.exeitself, this might end up running an incompatible Make that might cause the build to fail with an issue likeThe easy solution of just copying
mingw32-make.exetomake.exein the archives might create other problems because users might expect the regularmaketo behave in a non-MinGW way. Patching lto-wrapper to explicitly callmingw32-makeinstead ofmakeis probably the better fix; the temporary .mk files use backslashed Windows paths and therefore already expect the MinGW Make behavior: