From 3c34f0033c80dbe32fe9c09682f8cef94136beaf Mon Sep 17 00:00:00 2001 From: Darrell Harmon Date: Tue, 10 Dec 2019 13:33:49 -0700 Subject: [PATCH] genlink: avoid creating blank linker script if gcc fails When piping to a file, if arm-none-eabi-gcc is not present in the path, a blank linker script is created with genlink. After sourcing a bash script to add GCC to the path, the linker script doesn't get rebuilt due to a fresh timestamp despite failing to generate. --- mk/genlink-rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/genlink-rules.mk b/mk/genlink-rules.mk index 0136c6f8..ebbcd741 100644 --- a/mk/genlink-rules.mk +++ b/mk/genlink-rules.mk @@ -19,4 +19,4 @@ $(LDSCRIPT): $(OPENCM3_DIR)/ld/linker.ld.S $(OPENCM3_DIR)/ld/devices.data @printf " GENLNK $(DEVICE)\n" - $(Q)$(CPP) $(ARCH_FLAGS) $(shell $(OPENCM3_DIR)/scripts/genlink.py $(DEVICES_DATA) $(DEVICE) DEFS) -P -E $< > $@ + $(Q)$(CPP) $(ARCH_FLAGS) $(shell $(OPENCM3_DIR)/scripts/genlink.py $(DEVICES_DATA) $(DEVICE) DEFS) -P -E $< -o $@