From a3f52971946049c6e74e156faf2e864daa436a06 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 21 Jan 2024 15:27:38 +0000 Subject: 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. --- scripts/trylink | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 SORT_SECTION="" fi +WARN_COMMON="-Wl,--warn-common" +if ! check_cc "-Wl,--warn-common"; then + echo "Your linker does not support --warn-common" + WARN_COMMON="" +fi + START_GROUP="-Wl,--start-group" END_GROUP="-Wl,--end-group" INFO_OPTS() { - echo "$SORT_COMMON -Wl,-Map,$EXE.map -Wl,--verbose" + echo "$WARN_COMMON -Wl,-Map,$EXE.map -Wl,--verbose" } # gold may not support --sort-common (yet) -- cgit v1.2.3-55-g6feb