[Top][All Lists]

[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,

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 on that topic.

somewhat related: python globs are also surprisingly not sorted

sort input files

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

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 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:

Please review this at

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

 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]