Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 <olaf@aepfle.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
olafhering authored and mcb30 committed Feb 12, 2015
1 parent 6fe8f80 commit 335a7dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Makefile.housekeeping
Expand Up @@ -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)

Expand Down

0 comments on commit 335a7dd

Please sign in to comment.