From 2ff57f5559a2ef1f7c7e1c1d508b9420b8508c6b Mon Sep 17 00:00:00 2001 From: mch <32224+hamsolodev@users.noreply.github.com> Date: Sat, 21 Nov 2026 09:35:09 +1100 Subject: [PATCH] build: sort the source list, so the link order is the same everywhere The candidate sources come from seven find calls, unsorted, and the objects are linked in that order. find returns the directory order, which depends on how the checkout was made, so two checkouts of one commit built binaries with the same symbols in a different order and a different hash: a fresh clone and a cp -a copy of it were enough. Sorting the list bytewise makes the link order a function of the sources alone. --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 27f78b3..72d3416 100755 --- a/build.sh +++ b/build.sh @@ -160,7 +160,7 @@ candidates=() while IFS= read -r _f; do [ -n "$_f" ] && candidates+=("$_f") done </dev/null # The radio driver layer sits a level deeper than the sweep above reaches, # and is the whole reason RadioLib is here: this is MeshCore's own driver. @@ -171,7 +171,7 @@ $( find "$radiolib/protocols/PhysicalLayer" -name '*.cpp' 2>/dev/null find "$radiolib/utils" -name '*.cpp' 2>/dev/null find "$src" -maxdepth 1 -name '*.cpp' 2>/dev/null -) +} | LC_ALL=C sort) CANDIDATES skipped=()