lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sort input files (issue 347770043 by address@hidden)


From: bmwiedemann
Subject: Re: sort input files (issue 347770043 by address@hidden)
Date: Fri, 18 May 2018 06:41:44 -0700

Reviewers: dak,

Message:
On 2018/05/18 13:32:26, dak wrote:
src-wildcard actually uses the wildcard function of Make.  The
documentation of
it does not mention sorting in any manner.  However, since it is
modelled after
shell globs, it would seem weird for it not to sort.  So the question
is whether
this should rather be addressed in Make

See also https://savannah.gnu.org/bugs/index.php?52076 on that topic.

somewhat related: python globs are also surprisingly not sorted
http://bugs.python.org/issue30461

Description:
sort input files

to have reproducible link order
so that the lilypond binary always contains its functions in the same
order.

When building packages (e.g. for openSUSE Linux)
(random) filesystem order of input files
influences ordering of functions in the output,
thus without the patch, builds (in disposable VMs) would differ.

See https://reproducible-builds.org/ for why this matters.

There exists a patch for GNU make to make all wildcard globs sorted
again, but they claim the spec does not guarantee any stable order so it
is not yet merged:
https://savannah.gnu.org/bugs/index.php?52076

Please review this at https://codereview.appspot.com/347770043/

Affected files (+1, -1 lines):
  M stepmake/stepmake/c++-vars.make


Index: stepmake/stepmake/c++-vars.make
diff --git a/stepmake/stepmake/c++-vars.make b/stepmake/stepmake/c++-vars.make index 923377ddc4ef55a757c2c92e6455e77b9c39c487..0b644ef213a02def97cbddd1ada3fb137da102f1 100644
--- a/stepmake/stepmake/c++-vars.make
+++ b/stepmake/stepmake/c++-vars.make
@@ -11,7 +11,7 @@ ALL_CXXFLAGS = $(CXXFLAGS) $(ALL_CXXPPFLAGS) $($(PACKAGE)_CXXFLAGS) $(CONFIG_CXX

 TCC_FILES := $(call src-wildcard,*.tcc)
 HH_FILES := $(call src-wildcard,*.hh)
-CC_FILES := $(call src-wildcard,*.cc)
+CC_FILES := $(sort $(call src-wildcard,*.cc))
 INL_FILES := $(call src-wildcard,*.icc)
 YY_FILES := $(call src-wildcard,*.yy)
 LL_FILES := $(call src-wildcard,*.ll)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]