aboutsummaryrefslogtreecommitdiff
path: root/rescue
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-04-17 16:25:30 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-04-29 07:22:43 +0000
commit405cd10f3739d00e48d9dce1f63bbc54ec3245d2 (patch)
treee5bd215c43efd904f054976d6853e3fc462c430b /rescue
parentb8cca0cdc0c1efe6282028de47ae7f56dc4fa6b1 (diff)
downloadsrc-405cd10f3739d00e48d9dce1f63bbc54ec3245d2.tar.gz
src-405cd10f3739d00e48d9dce1f63bbc54ec3245d2.zip
Suppress lld 16 errors about multiply defined symbols in rescue
lld >= 16 became more strict about multiply defined symbols. Since there are many of those in crunchgen'd programs, turn off the check when linking the rescue binary. MFC after: 1 week (cherry picked from commit 458f4722bf974c7fa7961952fcaee146f5a97708)
Diffstat (limited to 'rescue')
-rw-r--r--rescue/rescue/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile
index 9830bc5bed5c..ff438f2ed1b6 100644
--- a/rescue/rescue/Makefile
+++ b/rescue/rescue/Makefile
@@ -13,6 +13,12 @@ MK_PIE= no
NO_SHARED= yes
CRUNCH_BUILDOPTS+= MK_PIE=no NO_SHARED=yes
+# lld >= 16 became more strict about multiply defined symbols. Since there are
+# many of those in crunchgen'd programs, turn off the check.
+.if ${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 160000
+LDFLAGS+= -Wl,--allow-multiple-definition
+.endif
+
PROG= rescue
BINDIR?=/rescue