Bläddra i källkod

[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 år sedan
förälder
incheckning
335a7ddcd4
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      src/Makefile.housekeeping

+ 1
- 1
src/Makefile.housekeeping Visa fil

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

Laddar…
Avbryt
Spara