mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
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> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
20 lines
600 B
Diff
20 lines
600 B
Diff
The result of $(wildcard *) is random.
|
|
Sort input files to reduce build-compare noise.
|
|
---
|
|
ipxe/src/Makefile.housekeeping | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
Index: ipxe/src/Makefile.housekeeping
|
|
===================================================================
|
|
--- ipxe/src/Makefile.housekeeping
|
|
+++ ipxe/src/Makefile.housekeeping
|
|
@@ -773,7 +773,7 @@ BLIB = $(BIN)/blib.a
|
|
$(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
|
|
$(Q)$(RM) $(BLIB)
|
|
$(QM)$(ECHO) " [AR] $@"
|
|
- $(Q)$(AR) r $@ $(BLIB_OBJS)
|
|
+ $(Q)$(AR) r $@ $(sort $(BLIB_OBJS))
|
|
$(Q)$(RANLIB) $@
|
|
blib : $(BLIB)
|
|
|