0025-reproducible-build.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff --git a/core/Makefile b/core/Makefile
  2. index 50ff35af..f1af71b7 100644
  3. --- a/core/Makefile
  4. +++ b/core/Makefile
  5. @@ -112,7 +112,7 @@ CFLAGS += -D__SYSLINUX_CORE__ -D__FIRMWARE_$(FIRMWARE)__ \
  6. # official release. Otherwise, substitute a hex string that is pretty much
  7. # guaranteed to be unique to be unique from build to build.
  8. ifndef HEXDATE
  9. -HEXDATE := $(shell $(PERL) $(SRC)/../now.pl $(SRCS))
  10. +HEXDATE := $(shell printf '0x%x\n' $(git log -1 --format=%ct)) # make the build more predictable
  11. endif
  12. ifndef DATE
  13. DATE := $(shell sh $(SRC)/../gen-id.sh $(VERSION) $(HEXDATE))
  14. diff --git a/mk/lib.mk b/mk/lib.mk
  15. index f3fb07c7..bece24a0 100644
  16. --- a/mk/lib.mk
  17. +++ b/mk/lib.mk
  18. @@ -58,8 +58,8 @@ CFLAGS += -mregparm=3 -DREGPARM=3
  19. endif
  20. ARCH_MATH_OBJS = \
  21. - $(patsubst $(com32)/lib/%.c,%.o,$(wildcard $(com32)/lib/$(ARCH)/math/*.c)) \
  22. - $(patsubst $(com32)/lib/%.S,%.o,$(wildcard $(com32)/lib/$(ARCH)/math/*.S))
  23. + $(patsubst $(com32)/lib/%.c,%.o,$(sort $(wildcard $(com32)/lib/$(ARCH)/math/*.c))) \
  24. + $(patsubst $(com32)/lib/%.S,%.o,$(sort $(wildcard $(com32)/lib/$(ARCH)/math/*.S)))
  25. VPATH = $(SRC)
  26. LIBOTHER_OBJS = \
  27. @@ -130,8 +130,8 @@ LIBENTRY_OBJS = \
  28. exit.o
  29. LIBGCC_OBJS = \
  30. - $(patsubst $(com32)/lib/%.c,%.o,$(wildcard $(com32)/lib/$(ARCH)/libgcc/*.c)) \
  31. - $(patsubst $(com32)/lib/%.S,%.o,$(wildcard $(com32)/lib/$(ARCH)/libgcc/*.S))
  32. + $(patsubst $(com32)/lib/%.c,%.o,$(sort $(wildcard $(com32)/lib/$(ARCH)/libgcc/*.c))) \
  33. + $(patsubst $(com32)/lib/%.S,%.o,$(sort $(wildcard $(com32)/lib/$(ARCH)/libgcc/*.S)))
  34. LIBCONSOLE_OBJS = \
  35. \