From: Olaf Hering Date: Mon, 2 Feb 2015 13:54:12 +0000 (+0100) Subject: [build] Sort objects in blib.a X-Git-Tag: v1.20.1~980 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=335a7ddcd4e2d0faaee6d5b1edf0307dfba3d0e5;p=thirdparty%2Fipxe.git [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 --- diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 1a75d3939..e1cdee695 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)