Author: Reiner Herrmann 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 .