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