diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build/mkrules/images.rules.mk | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/build/mkrules/images.rules.mk b/src/build/mkrules/images.rules.mk index d21dc8551..d486baa4d 100644 --- a/src/build/mkrules/images.rules.mk +++ b/src/build/mkrules/images.rules.mk @@ -45,21 +45,20 @@ $$(IMGDIR)/$(1).elf: $$(addprefix $$(OBJDIR)/, $$($(1)_OBJECTS)) \ endef $(foreach img,$(IMGS),$(eval $(call ELF_template,$(img)))) +# Wrap code in bash call $(IMGDIR)/%.bin: $(IMGDIR)/%.elf \ $(wildcard $(IMGDIR)/*.so) $(addprefix $(IMGDIR)/, $($*_DATA_MODULES)) \ $(CUSTOM_LINKER_EXE) $(C2) " LINKER $(notdir $@)" - $(eval TMPFILE = $(shell mktemp)) - $(C1)$(CUSTOM_LINKER) $@ $< \ - $(addprefix $(IMGDIR)/lib, $(addsuffix .so, $($*_MODULES))) \ + $(C1)bash -c 'set -o pipefail && $(CUSTOM_LINKER) $@ $< \ + $(addprefix $(IMGDIR)/lib, $(addsuffix .so, $($*_MODULES))) \ $(if $($*_EXTENDED_MODULES), \ --extended=0x40000 $(IMGDIR)/$*_extended.bin \ $(addprefix $(IMGDIR)/lib, \ $(addsuffix .so, $($*_EXTENDED_MODULES))) \ ) \ - $(addprefix $(IMGDIR)/, $($*_DATA_MODULES)) > $(TMPFILE) && \ - bzip2 -zc > $(IMGDIR)/.$*.lnkout.bz2 < $(TMPFILE) - rm $(TMPFILE) + $(addprefix $(IMGDIR)/, $($*_DATA_MODULES)) \ + | bzip2 -zc > $(IMGDIR)/.$*.lnkout.bz2' $(C1)$(ROOTPATH)/src/build/tools/addimgid $@ $< $(IMGDIR)/%.list.bz2 $(IMGDIR)/%.syms: $(IMGDIR)/%.bin |