mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-05-31 00:39:50 +08:00
Fix parallel build race with dep/ directory
Pattern rules that move .d files into dep/ do not depend on the dep directory target, so parallel make can attempt the move before the directory exists. Add dep as an order-only prerequisite to all affected pattern rules. Bug: https://bugs.gentoo.org/880921 Bug: https://bugs.gentoo.org/911647 Bug: https://bugs.gentoo.org/917344 Closes: https://github.com/steveicarus/iverilog/issues/1314 Signed-off-by: Huang Rui <vowstar@gmail.com>
This commit is contained in:
@@ -252,7 +252,7 @@ endif
|
||||
version.exe: $(srcdir)/version.c $(srcdir)/version_base.h version_tag.h
|
||||
$(BUILDCC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o version.exe -I. -I$(srcdir) $(srcdir)/version.c
|
||||
|
||||
%.o: %.cc config.h
|
||||
%.o: %.cc config.h | dep
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
|
||||
mv $*.d dep/$*.d
|
||||
|
||||
|
||||
@@ -104,11 +104,11 @@ dep:
|
||||
vhdlpp@EXEEXT@: $O
|
||||
$(CXX) -o vhdlpp@EXEEXT@ $(LDFLAGS) $O $(LIBS)
|
||||
|
||||
%.o: $(srcdir)/../libmisc/%.cc
|
||||
%.o: $(srcdir)/../libmisc/%.cc | dep
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
|
||||
mv $*.d dep/$*.d
|
||||
|
||||
%.o: %.cc vhdlpp_config.h
|
||||
%.o: %.cc vhdlpp_config.h | dep
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
|
||||
mv $*.d dep/$*.d
|
||||
|
||||
|
||||
@@ -159,11 +159,11 @@ vvp@EXEEXT@: $O main.o
|
||||
endif
|
||||
endif
|
||||
|
||||
%.o: %.cc config.h
|
||||
%.o: %.cc config.h | dep
|
||||
$(CXX) $(CPPFLAGS) -DIVL_SUFFIX='"$(suffix)"' $(MDIR1) $(MDIR2) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
|
||||
mv $*.d dep/$*.d
|
||||
|
||||
%.o: %.c config.h
|
||||
%.o: %.c config.h | dep
|
||||
$(CC) $(CPPFLAGS) $(MDIR1) $(MDIR2) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
|
||||
mv $*.d dep/$*.d
|
||||
|
||||
|
||||
Reference in New Issue
Block a user