Skip to content

Commit f1e7b73

Browse files
reinerhgeneC
authored andcommitted
make: Sort object files for reproducible linking order
Author: Reiner Herrmann <reiner@reiner-h.de> Change be645d7 was not extended to the efi/Makefile previously; this patch addresses this. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
1 parent ce3d03a commit f1e7b73

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

efi/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ include $(MAKEDIR)/efi.mk
1717
# Upstream gnu-efi has old-style function definitions.
1818
CFLAGS += -Wno-strict-prototypes
1919

20-
CORE_CSRC := $(wildcard $(core)/*.c $(core)/*/*.c $(core)/*/*/*.c)
20+
CORE_CSRC := $(sort $(wildcard $(core)/*.c $(core)/*/*.c $(core)/*/*/*.c))
2121
CORE_COBJ := $(subst $(core),$(OBJ)/../core,$(patsubst %.c,%.o,$(CORE_CSRC)))
2222

2323
# We don't want to include any of the networking stack or the thread
2424
# code since it will be implemented completely differently for EFI.
25-
FILTERED_OBJS:= $(subst $(core),$(OBJ)/../core,$(patsubst %.c,%.o, \
25+
FILTERED_OBJS:= $(sort $(subst $(core),$(OBJ)/../core,$(patsubst %.c,%.o, \
2626
$(wildcard $(core)/legacynet/*.c) \
2727
$(wildcard $(core)/fs/pxe/*.c) \
28-
$(wildcard $(core)/thread/*.c)))
28+
$(wildcard $(core)/thread/*.c))))
2929

3030
# Don't include unit tests
3131
FILTERED_OBJS += $(subst $(core),$(OBJ)/../core, \
@@ -44,7 +44,7 @@ CORE_OBJS += $(addprefix $(OBJ)/../core/, \
4444
LIB_OBJS = $(addprefix $(objdir)/com32/lib/,$(CORELIBOBJS)) \
4545
$(LIBEFI)
4646

47-
CSRC = $(wildcard $(SRC)/*.c)
47+
CSRC = $(sort $(wildcard $(SRC)/*.c))
4848
OBJS = $(subst $(SRC)/,,$(filter-out %wrapper.o, $(patsubst %.c,%.o,$(CSRC))))
4949

5050
OBJS += $(objdir)/core/codepage.o $(ARCH)/linux.o

0 commit comments

Comments
 (0)