diff options
author | Allen Webb <allenwebb@google.com> | 2019-10-14 12:58:42 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-15 01:04:42 +0000 |
commit | 4e573dde4722eea04c1840278e6bb257d16ef14b (patch) | |
tree | ac8f3e24d5e4b127d8e55ad2b60a4dc51a9deb73 | |
parent | f6544e75c31e7885888d55a2fd3d804789408ab7 (diff) | |
download | chrome-ec-4e573dde4722eea04c1840278e6bb257d16ef14b.tar.gz |
Fix race condition in spiflashfw.
BRANCH=None
BUG=chromium:1011870
TEST=make -j buildall
Change-Id: Ifa0241cf9ea02ecf989fc7257f37c24efb17c3a7
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1860720
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | Makefile.rules | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Makefile.rules b/Makefile.rules index f04fa4a15c..d40b265be1 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -589,26 +589,29 @@ $(out)/TAGS: $(out)/cscope.files $(out)/tags: $(out)/cscope.files $(call quiet,ctags,CTAGS ) +.PHONY: npx-monitor-dir +npx-monitor-dir: + $(Q)mkdir -p ${out}/chip/npcx/spiflashfw + # TODO: optional make rules for PROJECT_EXTRA -$(npcx-monitor-fw-bin): +$(npcx-monitor-fw-bin):$(npcx-monitor-fw).c npx-monitor-dir $(if $(V),,@echo ' EXTBIN ' $(subst $(out)/,,$@) ; ) - $(Q)mkdir -p $(@D) - $(Q)$(CC) $(CFLAGS) -MMD -MF $(out)/$(npcx-lfw).d -c $(npcx-monitor-fw).c \ + $(Q)$(CC) $(CFLAGS) -MMD -MF $(out)/$(npcx-lfw).d -c $< \ -o $(out)/$(npcx-monitor-fw).o $(Q)$(CC) $(out)/$(npcx-monitor-fw).o $(LDFLAGS) \ -o $(out)/$(npcx-monitor-fw).elf -Wl,-T,$(npcx-monitor-fw).ld \ -Wl,-Map,$(out)/$(npcx-monitor-fw).map $(Q)$(OBJCOPY) -O binary $(out)/$(npcx-monitor-fw).elf $@ -$(out)/$(npcx-monitor-hdr)_ro.o:$(npcx-monitor-hdr).c - $(Q)$(CC) $(CFLAGS) -DSECTION_IS_RO=$(EMPTY) -MMD -c $(npcx-monitor-hdr).c -o $@ +$(out)/$(npcx-monitor-hdr)_ro.o:$(npcx-monitor-hdr).c npx-monitor-dir + $(Q)$(CC) $(CFLAGS) -DSECTION_IS_RO=$(EMPTY) -MMD -c $< -o $@ $(npcx-monitor-hdr-ro-bin):$(out)/$(npcx-monitor-hdr)_ro.o $(if $(V),,@echo ' EXTBIN ' $(subst $(out)/,,$@) ; ) $(Q)$(OBJCOPY) -O binary $< $@ -$(out)/$(npcx-monitor-hdr)_rw.o:$(npcx-monitor-hdr).c - $(Q)$(CC) $(CFLAGS) -MMD -c $(npcx-monitor-hdr).c -o $@ +$(out)/$(npcx-monitor-hdr)_rw.o:$(npcx-monitor-hdr).c npx-monitor-dir + $(Q)$(CC) $(CFLAGS) -MMD -c $< -o $@ $(npcx-monitor-hdr-rw-bin):$(out)/$(npcx-monitor-hdr)_rw.o $(if $(V),,@echo ' EXTBIN ' $(subst $(out)/,,$@) ; ) |