Browse Source

[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>
tags/v1.20.1
Olaf Hering 9 years ago
parent
commit
335a7ddcd4
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/Makefile.housekeeping

+ 1
- 1
src/Makefile.housekeeping View File

1012
 $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
1012
 $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
1013
 	$(Q)$(RM) $(BLIB)
1013
 	$(Q)$(RM) $(BLIB)
1014
 	$(QM)$(ECHO) "  [AR] $@"
1014
 	$(QM)$(ECHO) "  [AR] $@"
1015
-	$(Q)$(AR) r $@ $(BLIB_OBJS)
1015
+	$(Q)$(AR) r $@ $(sort $(BLIB_OBJS))
1016
 	$(Q)$(RANLIB) $@
1016
 	$(Q)$(RANLIB) $@
1017
 blib : $(BLIB)
1017
 blib : $(BLIB)
1018
 
1018
 

Loading…
Cancel
Save