From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 218ED3858406; Wed, 10 Aug 2022 12:51:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 218ED3858406 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/106328] Build doesn't respect -j N flag Date: Wed, 10 Aug 2022 12:51:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 11.3.0 X-Bugzilla-Keywords: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2022 12:51:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106328 --- Comment #10 from 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=3D106328 >=20 > --- Comment #9 from Martin Li=C5=A1ka --- > > Magically only with recent GNU make, otherwise needs proper prefixed > > rules in the lto-wrapper generated makefile which I don't think we do. >=20 > Wait, the cooperation works with older GNU make if a Makefile uses prefix= ed (+) > rules. WPA does not email any artificial Makefile for WPA streaming. It's= a > Makefile we emit for LTRANS run, e.g.: >=20 > marxin@marxinbox:/dev/shm/objdir> cat /tmp/ccuhgkQs.mk > ./a.ltrans0.ltrans.o: > @g++ '-xlto' '-c' '-fno-openmp' '-fno-openacc' '-fno-pie' > '-fcf-protection=3Dnone' '-mtune=3Dgeneric' '-march=3Dx86-64' '-O2' '-sav= e-temps' > '-v' '-shared-libgcc' '-mtune=3Dgeneric' '-march=3Dx86-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=3Dnone' '-mtune=3Dgeneric' '-march=3Dx86-64' '-O2' '-sav= e-temps' > '-v' '-shared-libgcc' '-mtune=3Dgeneric' '-march=3Dx86-64' '-dumpdir' 'a.' > '-dumpbase' './a.ltrans1.ltrans' '-fltrans' '-o' './a.ltrans1.ltrans.o' > './a.ltrans1.o' > ... >=20 > 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=3Djobserver mentions that already.=