Преглед на файлове

[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 години
родител
ревизия
335a7ddcd4
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1
    1
      src/Makefile.housekeeping

+ 1
- 1
src/Makefile.housekeeping Целия файл

@@ -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
 

Loading…
Отказ
Запис