From f43f2f5ef9db94c2a565adc913aca02c52459d42 Mon Sep 17 00:00:00 2001 From: Stephen Cprek Date: Thu, 21 Aug 2014 17:10:32 -0500 Subject: Fix intermittent hb make error Change-Id: I606aad6d577307fe090a81bbd8d933a5050086a3 Backport: release-fips820 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/12934 Reviewed-by: Brian H. Horton Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III --- src/build/mkrules/images.rules.mk | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.1