mk: sort libraries in dependency lists

In order to achieve reproducible builds, always use the same
order when listing object files to build dependencies lists.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
This commit is contained in:
Luca Boccassi 2017-10-12 14:15:53 +01:00 committed by Thomas Monjalon
parent 62bc760dea
commit ffe2fe3a95
3 changed files with 6 additions and 6 deletions

View File

@ -290,8 +290,8 @@ LDLIBS_NAMES += $(patsubst -Wl$(comma)-l%,lib%.a,$(filter -Wl$(comma)-l%,$(LDLIB
# list of found libraries files (useful for deps). If not found, the
# library is silently ignored and dep won't be checked
LDLIBS_FILES := $(wildcard $(foreach dir,$(LDLIBS_PATH),\
$(addprefix $(dir)/,$(LDLIBS_NAMES))))
LDLIBS_FILES := $(sort $(wildcard $(foreach dir,$(LDLIBS_PATH),\
$(addprefix $(dir)/,$(LDLIBS_NAMES)))))
#
# Compile executable file if needed

View File

@ -69,9 +69,9 @@ O_TO_EXE_DO = @set -e; \
-include .$(HOSTAPP).cmd
# list of .a files that are linked to this application
LDLIBS_FILES := $(wildcard \
LDLIBS_FILES := $(sort $(wildcard \
$(addprefix $(RTE_OUTPUT)/lib/, \
$(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS)))))
$(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS))))))
#
# Compile executable file if needed

View File

@ -85,8 +85,8 @@ LDLIBS_NAMES += $(patsubst -Wl$(comma)-l%,lib%.a,$(filter -Wl$(comma)-l%,$(LDLIB
# list of found libraries files (useful for deps). If not found, the
# library is silently ignored and dep won't be checked
LDLIBS_FILES := $(wildcard $(foreach dir,$(LDLIBS_PATH),\
$(addprefix $(dir)/,$(LDLIBS_NAMES))))
LDLIBS_FILES := $(sort $(wildcard $(foreach dir,$(LDLIBS_PATH),\
$(addprefix $(dir)/,$(LDLIBS_NAMES)))))
#
# Archive objects in .so file if needed