aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-01-21 15:27:38 +0000
committerRon Yorston <rmy@pobox.com>2024-01-21 15:27:38 +0000
commita3f52971946049c6e74e156faf2e864daa436a06 (patch)
treebb1af20594d927e64602cf0de541a14a1b643e54
parentdf8b9d4cbaab10fc096385abde826709b6072b5f (diff)
downloadbusybox-w32-a3f52971946049c6e74e156faf2e864daa436a06.tar.gz
busybox-w32-a3f52971946049c6e74e156faf2e864daa436a06.tar.bz2
busybox-w32-a3f52971946049c6e74e156faf2e864daa436a06.zip
build system: actually detect lack of --warn-common
Commit 992387539 (build system: more clang/llvm tweaks) falsely claimed that the lack of the --warn-common linker option was being detected. It wasn't, but it is now.
-rwxr-xr-xscripts/trylink8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/trylink b/scripts/trylink
index 776fd484a..2456252a3 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -93,10 +93,16 @@ if ! check_cc "-Wl,--sort-section,alignment"; then
93 SORT_SECTION="" 93 SORT_SECTION=""
94fi 94fi
95 95
96WARN_COMMON="-Wl,--warn-common"
97if ! check_cc "-Wl,--warn-common"; then
98 echo "Your linker does not support --warn-common"
99 WARN_COMMON=""
100fi
101
96START_GROUP="-Wl,--start-group" 102START_GROUP="-Wl,--start-group"
97END_GROUP="-Wl,--end-group" 103END_GROUP="-Wl,--end-group"
98INFO_OPTS() { 104INFO_OPTS() {
99 echo "$SORT_COMMON -Wl,-Map,$EXE.map -Wl,--verbose" 105 echo "$WARN_COMMON -Wl,-Map,$EXE.map -Wl,--verbose"
100} 106}
101 107
102# gold may not support --sort-common (yet) 108# gold may not support --sort-common (yet)