[PATCH 3/5] rpdfs-progs: rename utask asm extraction file to dodge save-temps race
Auke Kok <[email protected]> Tue, 5 May 2026 10:53:03 -0700
| Newsgroups | dev.linux.lists.rpdfs-devel |
|---|---|
| Message-ID | <[email protected]> |
CFLAGS includes -save-temps, so compiling utask/utask.o produces utask/utask.s as a side effect. This collides under make -j with the explicit rule that generates the same file to grep UTASK_ASM defines from. Use a separate filename for the extraction. Signed-off-by: Auke Kok <[email protected]> --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5f687f4..d8acf3f 100644 --- a/Makefile +++ b/Makefile @@ -70,12 +70,13 @@ $(OBJ_S): %.o: %.S utask/utask_defs.h utask/utask_gen_defs.h gcc -c $< -o $*.o # specifically output compiled assembly so we can extract defines -utask/utask.s: utask/utask.c - gcc -I. -S -o ./utask/utask.s ./utask/utask.c +# and use a separate filename to avoid racing with -save-temps +utask/utask_asm.s: utask/utask.c + gcc -I. -S -o $@ $< # extract defines from complied asm so we can include it from asm source -utask/utask_gen_defs.h: utask/utask.s - grep '#define.*\<UTASK_ASM' utask/utask.s > utask/utask_gen_defs.h +utask/utask_gen_defs.h: utask/utask_asm.s + grep '#define.*\<UTASK_ASM' $< > $@ $(PADCHECK): %.o.padcheck: %.h gcc $(CFLAGS) -Wpadded -c $< -o $@ @@ -93,6 +94,6 @@ $(LIB): $(LIB_OBJ) clean: @rm -f $(BIN) $(OBJ) $(OBJ_S) $(DEP) $(PADCHECK) $(GEN_BIN) \ $(foreach d,$(DIR),$(wildcard $(d)/*.[is])) \ - utask/utask_gen_defs.h \ + utask/utask_asm.s utask/utask_gen_defs.h \ .sparse.gcc-defines.h .sparse.output -- 2.54.0