Skip to content
Permalink
Browse files Browse the repository at this point in the history
Sort list of files to allow reproducible building
$(wildcard ...) returns files in non-deterministic order.
As the list of object files is used while linking, the resulting
binary is also varying with differing order.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>
  • Loading branch information
reinerh committed Nov 3, 2016
1 parent 8591a57 commit 04cda93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -22,12 +22,12 @@ LDFLAGS = -L. $(shell getconf LFS_LDFLAGS)
LDLIBS = $(shell getconf LFS_LIBS) -lyrmcds $(LIBTCMALLOC) -latomic -lpthread
CLDOC := LD_LIBRARY_PATH=$(shell llvm-config --libdir 2>/dev/null) cldoc

HEADERS = $(wildcard src/*.hpp src/*/*.hpp cybozu/*.hpp)
SOURCES = $(wildcard src/*.cpp src/*/*.cpp cybozu/*.cpp)
HEADERS = $(sort $(wildcard src/*.hpp src/*/*.hpp cybozu/*.hpp))
SOURCES = $(sort $(wildcard src/*.cpp src/*/*.cpp cybozu/*.cpp))
OBJECTS = $(patsubst %.cpp,%.o,$(SOURCES))

EXE = yrmcdsd
TESTS = $(patsubst %.cpp,%,$(wildcard test/*.cpp))
TESTS = $(patsubst %.cpp,%,$(sort $(wildcard test/*.cpp)))
LIB = libyrmcds.a
LIB_OBJECTS = $(filter-out src/main.o,$(OBJECTS))
PACKAGES = build-essential libgoogle-perftools-dev python-pip
Expand Down

0 comments on commit 04cda93

Please sign in to comment.