Просмотр исходного кода

Sort the list of sources to be built and linked

Fix reproducibility issue due to readdir() order by sorting
the list of sources to be built and linked.

[jak@debian.org: Added summary and fixed typo]

Closes: #810509
Mattia Rizzolo лет назад: 10
Родитель
Сommit
831ea74cdd
3 измененных файлов с 6 добавлено и 6 удалено
  1. 2 2
      apt-inst/makefile
  2. 2 2
      apt-pkg/makefile
  3. 2 2
      apt-private/makefile

+ 2 - 2
apt-inst/makefile

@@ -20,7 +20,7 @@ SLIBS=$(PTHREADLIB) -lapt-pkg
 APT_DOMAIN:=libapt-inst$(MAJOR)
 APT_DOMAIN:=libapt-inst$(MAJOR)
 LIBRARYDEPENDS=$(LIB)/libapt-pkg.so
 LIBRARYDEPENDS=$(LIB)/libapt-pkg.so
 
 
-SOURCE = $(wildcard *.cc */*.cc)
-HEADERS = $(addprefix apt-pkg/,$(notdir $(wildcard *.h */*.h)))
+SOURCE = $(sort $(wildcard *.cc */*.cc))
+HEADERS = $(addprefix apt-pkg/,$(notdir $(sort $(wildcard *.h */*.h))))
 
 
 include $(LIBRARY_H)
 include $(LIBRARY_H)

+ 2 - 2
apt-pkg/makefile

@@ -31,7 +31,7 @@ SLIBS+= -llz4
 endif
 endif
 APT_DOMAIN:=libapt-pkg$(LIBAPTPKG_MAJOR)
 APT_DOMAIN:=libapt-pkg$(LIBAPTPKG_MAJOR)
 
 
-SOURCE = $(wildcard *.cc */*.cc)
-HEADERS = $(addprefix apt-pkg/,$(notdir $(wildcard *.h */*.h)))
+SOURCE = $(sort $(wildcard *.cc */*.cc))
+HEADERS = $(addprefix apt-pkg/,$(notdir $(sort $(wildcard *.h */*.h))))
 
 
 include $(LIBRARY_H)
 include $(LIBRARY_H)

+ 2 - 2
apt-private/makefile

@@ -15,7 +15,7 @@ MINOR=0
 SLIBS=$(PTHREADLIB) -lapt-pkg
 SLIBS=$(PTHREADLIB) -lapt-pkg
 CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
 CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
 
 
-SOURCE = $(wildcard *.cc)
-HEADERS = $(addprefix apt-private/,$(wildcard *.h))
+SOURCE = $(sort $(wildcard *.cc))
+HEADERS = $(addprefix apt-private/,$(sort $(wildcard *.h)))
 
 
 include $(LIBRARY_H)
 include $(LIBRARY_H)