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

Re: [Xen-devel] [PATCH 3/3] mini-os: sort objects in binary archives



Olaf Hering, le Tue 03 Feb 2015 12:45:37 +0100, a écrit :
> When building stubdom the mini-os 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 stubdom binary
> differs when it was built from identical sources but on different
> build hosts. To help with creating a reproducible binary the elements
> in an archive must simply be sorted before passing them to $(AR).
> 
> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> Cc: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

Provided that the missing parenthesis gets fixed,

Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  extras/mini-os/Makefile          | 4 ++--
>  extras/mini-os/arch/x86/Makefile | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile
> index 6d6537e..fad016c 100644
> --- a/extras/mini-os/Makefile
> +++ b/extras/mini-os/Makefile
> @@ -148,9 +148,9 @@ arch_lib:
>  
>  ifeq ($(CONFIG_LWIP),y)
>  # lwIP library
> -LWC  := $(shell find $(LWIPDIR)/src -type f -name '*.c')
> +LWC  := $(sort $(shell find $(LWIPDIR)/src -type f -name '*.c'))
>  LWC  := $(filter-out %6.c %ip6_addr.c %ethernetif.c, $(LWC))
> -LWO  := $(patsubst %.c,%.o,$(LWC))
> +LWO  := $(patsubst %.c,%.o,$(LWC)
>  LWO  += $(OBJ_DIR)/lwip-arch.o
>  ifeq ($(CONFIG_NETFRONT),y)
>  LWO += $(OBJ_DIR)/lwip-net.o
> diff --git a/extras/mini-os/arch/x86/Makefile 
> b/extras/mini-os/arch/x86/Makefile
> index 1073e36..dc55291 100644
> --- a/extras/mini-os/arch/x86/Makefile
> +++ b/extras/mini-os/arch/x86/Makefile
> @@ -14,7 +14,7 @@ include ../../minios.mk
>  
>  # Sources here are all *.c *.S without $(XEN_TARGET_ARCH).S
>  # This is handled in $(HEAD_ARCH_OBJ)
> -ARCH_SRCS := $(wildcard *.c)
> +ARCH_SRCS := $(sort $(wildcard *.c))
>  
>  # The objects built from the sources.
>  ARCH_OBJS := $(patsubst %.c,$(OBJ_DIR)/%.o,$(ARCH_SRCS))
> 

-- 
Samuel
 > Subject: pb fvwm95-2 comment l'installer le compiler???
 > Merci d'avance
 je te conseille d'être un peu plus précis dans l'exposé de ton pb...
 -+- EJ in guide du linuxien pervers :"Les modéros sont sympas !" -+-

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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