Skip to content

Commit

Permalink
make: Sort object files for reproducible linking order
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
reinerh authored and geneC committed Nov 4, 2017
1 parent ce3d03a commit f1e7b73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions efi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ include $(MAKEDIR)/efi.mk
# 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, \
Expand All @@ -44,7 +44,7 @@ CORE_OBJS += $(addprefix $(OBJ)/../core/, \
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
Expand Down

0 comments on commit f1e7b73

Please sign in to comment.