Package: syslinux / 3:6.03+dfsg-14.1+deb9u1

0009-reproducible-build.patch Patch series | download
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Author: Reiner Herrmann <reiner@reiner-h.de>
Description: Sort object files for reproducible linking order

--- a/com32/hdt/Makefile
+++ b/com32/hdt/Makefile
@@ -25,7 +25,7 @@
 MODULES	  = hdt.c32
 TESTFILES =
 
-OBJS	  = $(subst $(SRC)/,,$(patsubst %.c,%.o,$(wildcard $(SRC)/*.c)))
+OBJS	  = $(subst $(SRC)/,,$(patsubst %.c,%.o,$(sort $(wildcard $(SRC)/*.c))))
 VERSION   = $(shell $(SED) -n 's/\#define VERSION \"\(.*\)\"/\1/p' hdt.h)
 CODENAME  = $(shell $(SED) -n 's/\#define CODENAME \"\(.*\)\"/\1/p' hdt.h)
 NODASH_VERSION = $(shell echo $(VERSION) | $(SED) -e 's/-/_/g' | $(SED) -e 's/\./_/g')
--- a/com32/sysdump/Makefile
+++ b/com32/sysdump/Makefile
@@ -27,7 +27,7 @@
 MODULES	  = sysdump.c32
 TESTFILES =
 
-SRCS = $(wildcard $(SRC)/*.c)
+SRCS = $(sort $(wildcard $(SRC)/*.c))
 OBJS = $(subst $(SRC)/,,$(patsubst %.c,%.o,$(SRCS)))
 
 # The DATE is set on the make command line when building binaries for
--- a/efi/Makefile
+++ b/efi/Makefile
@@ -17,15 +17,15 @@
 # Upstream gnu-efi has old-style function definitions.
 CFLAGS += -Wno-strict-prototypes
 
-CORE_CSRC := $(wildcard $(core)/*.c $(core)/*/*.c $(core)/*/*/*.c)
+CORE_CSRC := $(sort $(wildcard $(core)/*.c $(core)/*/*.c $(core)/*/*/*.c))
 CORE_COBJ := $(subst $(core),$(OBJ)/../core/,$(patsubst %.c,%.o,$(CORE_CSRC)))
 
 # We don't want to include any of the networking stack or the thread
 # code since it will be implemented completely differently for EFI.
-FILTERED_OBJS:= $(subst $(core),$(OBJ)/../core/,$(patsubst %.c,%.o, \
+FILTERED_OBJS:= $(sort $(subst $(core),$(OBJ)/../core/,$(patsubst %.c,%.o, \
 	$(wildcard $(core)/legacynet/*.c) \
 	$(wildcard $(core)/fs/pxe/*.c) \
-	$(wildcard $(core)/thread/*.c)))
+	$(wildcard $(core)/thread/*.c))))
 
 # Don't include unit tests
 FILTERED_OBJS += $(subst $(core),$(OBJ)/../core/, \
@@ -44,7 +44,7 @@
 LIB_OBJS = $(addprefix $(objdir)/com32/lib/,$(CORELIBOBJS)) \
 	$(LIBEFI)
 
-CSRC = $(wildcard $(SRC)/*.c)
+CSRC = $(sort $(wildcard $(SRC)/*.c))
 OBJS = $(subst $(SRC)/,,$(filter-out %wrapper.o, $(patsubst %.c,%.o,$(CSRC))))
 
 OBJS += $(objdir)/core/codepage.o $(ARCH)/linux.o