diff options
author | Ron Yorston <rmy@pobox.com> | 2024-01-21 15:27:38 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-01-21 15:27:38 +0000 |
commit | a3f52971946049c6e74e156faf2e864daa436a06 (patch) | |
tree | bb1af20594d927e64602cf0de541a14a1b643e54 | |
parent | df8b9d4cbaab10fc096385abde826709b6072b5f (diff) | |
download | busybox-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-x | scripts/trylink | 8 |
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="" |
94 | fi | 94 | fi |
95 | 95 | ||
96 | WARN_COMMON="-Wl,--warn-common" | ||
97 | if ! check_cc "-Wl,--warn-common"; then | ||
98 | echo "Your linker does not support --warn-common" | ||
99 | WARN_COMMON="" | ||
100 | fi | ||
101 | |||
96 | START_GROUP="-Wl,--start-group" | 102 | START_GROUP="-Wl,--start-group" |
97 | END_GROUP="-Wl,--end-group" | 103 | END_GROUP="-Wl,--end-group" |
98 | INFO_OPTS() { | 104 | INFO_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) |