]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Sort objects in blib.a
authorOlaf Hering <olaf@aepfle.de>
Mon, 2 Feb 2015 13:54:12 +0000 (14:54 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 12 Feb 2015 09:43:02 +0000 (09:43 +0000)
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 <olaf@aepfle.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/Makefile.housekeeping

index 1a75d39399c623390a86ae839469928f507befd2..e1cdee69532586fa097d88d72fa52f9542ce82b8 100644 (file)
@@ -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)