diff options
author | Rob Landley <rob@landley.net> | 2024-04-27 13:47:35 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2024-04-27 13:47:35 -0500 |
commit | 1b6d64ffc3f56da9265e442e38dca572de441136 (patch) | |
tree | bfd71431f63725df0c2ba0bb314b01bf77c28821 | |
parent | ddd83be0a4f45bf87904e4dd9d5f7e270be58c35 (diff) | |
download | toybox-1b6d64ffc3f56da9265e442e38dca572de441136.tar.gz |
The "extra" libraries want to go in a magic order when static linking,
and probing them in parallel makes that awkward, so if there are any
pass --start-group and --end-group to the linker so it actually
resolves crosstalk between them.
-rwxr-xr-x | scripts/make.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/make.sh b/scripts/make.sh index 512fdc75..de849f83 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -69,6 +69,8 @@ LIBRARIES=$( echo -l$i & done | sort | xargs ) +# Actually resolve dangling dependencies in extra libraries when static linking +[ -n "$LIBRARIES" ] && LIBRARIES="-Wl,--start-group $LIBRARIES -Wl,--end-group" [ -z "$VERSION" ] && [ -d ".git" ] && [ -n "$(which git 2>/dev/null)" ] && VERSION="$(git describe --tags --abbrev=12 2>/dev/null)" |