Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Apr 2023 07:36:44 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 405cd10f3739 - stable/13 - Suppress lld 16 errors about multiply defined symbols in rescue
Message-ID:  <202304290736.33T7aiTX064087@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=405cd10f3739d00e48d9dce1f63bbc54ec3245d2

commit 405cd10f3739d00e48d9dce1f63bbc54ec3245d2
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-04-17 16:25:30 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-04-29 07:22:43 +0000

    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)
---
 rescue/rescue/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304290736.33T7aiTX064087>