소스 검색

[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…
취소
저장