瀏覽代碼

[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…
取消
儲存