From 335a7ddcd4e2d0faaee6d5b1edf0307dfba3d0e5 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 2 Feb 2015 14:54:12 +0100 Subject: [build] Sort objects in blib.a When building hvmloader for Xen tools the iPXE objects are also linked into the binary. Unfortunately the linker will place them in the order found in the archive. Since this order is random the resulting hvmloader binary differs when it was built from identical sources but on different build hosts. To help with creating a reproducible binary the elements in blib.a must simply be sorted before passing them to $(AR). Signed-off-by: Olaf Hering Signed-off-by: Michael Brown --- src/Makefile.housekeeping | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Makefile.housekeeping') diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 1a75d393..e1cdee69 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -1012,7 +1012,7 @@ BLIB = $(BIN)/blib.a $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS) $(Q)$(RM) $(BLIB) $(QM)$(ECHO) " [AR] $@" - $(Q)$(AR) r $@ $(BLIB_OBJS) + $(Q)$(AR) r $@ $(sort $(BLIB_OBJS)) $(Q)$(RANLIB) $@ blib : $(BLIB) -- cgit v1.2.3-55-g7522