]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
build: work around bash issue
authorJan Beulich <jbeulich@suse.com>
Fri, 7 Aug 2020 11:12:00 +0000 (13:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 7 Aug 2020 11:12:00 +0000 (13:12 +0200)
Older bash (observed with 3.2.57(2)) fails to honor "set -e" for certain
built-in commands ("while" here), despite the command's status correctly
being non-zero. The subsequent objcopy invocation now being separated by
a semicolon results in no failure. Insert an explicit "exit" (replacing
; by && ought to be another possible workaround).

Fixes: e321576f4047 ("xen/build: start using if_changed")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/Rules.mk

index ebfd40caff63da4eb2a68a601ab012b6dad0330b..62e9fabe7ad8f4432baabd681835303488ba624e 100644 (file)
@@ -193,7 +193,7 @@ define cmd_obj_init_o
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
             exit $$(expr $$idx + 1);; \
         esac; \
-    done; \
+    done || exit $$?; \
     $(OBJCOPY) $(foreach s,$(SPECIAL_DATA_SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@
 endef