https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106328
--- Comment #10 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 10 Aug 2022, marxin at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106328 > > --- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> --- > > Magically only with recent GNU make, otherwise needs proper prefixed > > rules in the lto-wrapper generated makefile which I don't think we do. > > Wait, the cooperation works with older GNU make if a Makefile uses prefixed > (+) > rules. WPA does not email any artificial Makefile for WPA streaming. It's a > Makefile we emit for LTRANS run, e.g.: > > marxin@marxinbox:/dev/shm/objdir> cat /tmp/ccuhgkQs.mk > ./a.ltrans0.ltrans.o: > @g++ '-xlto' '-c' '-fno-openmp' '-fno-openacc' '-fno-pie' > '-fcf-protection=none' '-mtune=generic' '-march=x86-64' '-O2' '-save-temps' > '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a.' > '-dumpbase' './a.ltrans0.ltrans' '-fltrans' '-o' './a.ltrans0.ltrans.o' > './a.ltrans0.o' > ./a.ltrans1.ltrans.o: > @g++ '-xlto' '-c' '-fno-openmp' '-fno-openacc' '-fno-pie' > '-fcf-protection=none' '-mtune=generic' '-march=x86-64' '-O2' '-save-temps' > '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a.' > '-dumpbase' './a.ltrans1.ltrans' '-fltrans' '-o' './a.ltrans1.ltrans.o' > './a.ltrans1.o' > ... > > So what can be miss is jobserver detection on BSD that can fail for some > reason, but it should work fine apart from that. Or do I miss something? Ah, indeed. That still leaves the question whether we execute the WPA stage with the FDs open - I suppose you checked? And whether pex_* "properly" does this for all host OSs (how does make jobserver work on mingw/cygwin?). I wonder because Honza once said he didn't implement jobserver support because it would require more fiddling to get it actually work. And IIRC BSD 'make' is not GNU make but I think gmake is available from the ports repo. The documentation about -flto=jobserver mentions that already.