summaryrefslogtreecommitdiff
path: root/rescue
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-04-17 18:25:30 +0200
committerDimitry Andric <dim@FreeBSD.org>2023-04-17 18:26:27 +0200
commit458f4722bf974c7fa7961952fcaee146f5a97708 (patch)
tree38629d4699f9bc65adbef03499dbed9a7ae07fa8 /rescue
parent67ecab6f50ff29e9bda340be1e9d2acc963c9a2b (diff)
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
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 2360bf83b781..1f4db1d06b15 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