On Thu, Nov 03, Olaf Hering wrote:

> On Thu, Feb 12, Michael Brown wrote:
> 
> > On 12/02/15 13:44, Olaf Hering wrote:
> > > In the spirit of 335a7ddcd4e2d0faaee6d5b1edf0307dfba3d0e5 ("[build] Sort
> > > objects in blib.a") to get reproducible binaries from the very same
> > > source on different build hosts, the last missing piece to reach that
> > > goal is this code in src/Makefile.housekeeping:


This variant works for me.

--- a/roms/ipxe/src/Makefile.housekeeping
+++ b/roms/ipxe/src/Makefile.housekeeping
@@ -1074,7 +1074,9 @@ blib : $(BLIB)
 # Command to generate build ID.  Must be unique for each $(BIN)/%.tmp,
 # even within the same build run.
 #
-BUILD_ID_CMD   := perl -e 'printf "0x%08x", int ( rand ( 0xffffffff ) );'
+BUILD_ID_DIR    := .build_ids
+VERYCLEANUP     += $(BUILD_ID_DIR)
+BUILD_ID_CMD    := bash -c 'declare -i i=1 ; mkdir -p $(BUILD_ID_DIR) ; cd 
$(BUILD_ID_DIR) ; until mkdir "$${i}" 2>/dev/null ; do : $$(( i++ )) ; done ; 
printf "0x%08x" "$${i}" '
 
 # Build timestamp
 #

It might now work with 'make -j', but that can be solved by
'find  \( -name "*.rom" -o -name "*.tmp" \) -delete ; make'


Let me know how you want to sort this out.

Olaf

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

Reply via email to