[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] etherboot: [build] sort objects in blib.a



commit cb8366d34ef5021af761ca1977d9cb305ba8fabd
Author:     Olaf Hering <olaf@xxxxxxxxx>
AuthorDate: Tue Feb 3 12:45:36 2015 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Feb 24 16:19:19 2015 +0000

    etherboot: [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@xxxxxxxxx>
    Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 .../firmware/etherboot/patches/build-compare.patch |   19 +++++++++++++++++++
 tools/firmware/etherboot/patches/series            |    1 +
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/tools/firmware/etherboot/patches/build-compare.patch 
b/tools/firmware/etherboot/patches/build-compare.patch
new file mode 100644
index 0000000..d41f68b
--- /dev/null
+++ b/tools/firmware/etherboot/patches/build-compare.patch
@@ -0,0 +1,19 @@
+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)
+ 
diff --git a/tools/firmware/etherboot/patches/series 
b/tools/firmware/etherboot/patches/series
index 5bd7df8..7512c14 100644
--- a/tools/firmware/etherboot/patches/series
+++ b/tools/firmware/etherboot/patches/series
@@ -2,3 +2,4 @@ boot_prompt_option.patch
 build_fix_1.patch
 build_fix_2.patch
 build_fix_3.patch
+build-compare.patch
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.