[PATCH] Mark linker Makefile rules for job server build
Paolo Bonzini
bonzini@gnu.org
Tue Oct 5 10:41:00 GMT 2010
On 10/04/2010 07:42 PM, Ralf Wildenhues wrote:
> Hello,
>
> * Andi Kleen wrote on Mon, Oct 04, 2010 at 03:11:39PM CEST:
>> -fwhopr=jobserver requires telling GNU make that the linker (= lto)
>> rules support job server, so that the necessary jobserver
>> information is passed through.
>>
>> Add + to all the executable targets that run LTO for this purpose.
>
> FWIW, this will break 'make -n'. I sent a feature request for GNU make:
> <http://thread.gmane.org/gmane.comp.gnu.make.bugs/5015>
>
> With GNU make-specific code, we could probably work around it. I'm
> thinking of something along these lines:
>
> jobserv := $(shell dry=no; for f in $(MAKEFLAGS); do \
> case $$f in \
> (*=*|--*);; \
Any reason to check for *=*? Even -W or -I do not appear there. I
always thought this would do:
ifeq (n,$(findstring n, $(filter-out --%, $(MAKEFLAGS))))
$(warning dry-run)
else
$(warning not dry-run)
endif
(BTW, adding --no-print-directory to $(MAKEFLAGS) broke GNU make's own
example of using findstring to test MAKEFLAGS...).
Paolo
More information about the Gcc-patches
mailing list