diff options
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r-- | Mk/bsd.port.mk | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 75f19e58d60e..52f80436b0c9 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1737,6 +1737,20 @@ PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PKG_ORIGIN} .include "${PORTSDIR}/Mk/bsd.gcc.mk" .endif +_TEST_LD=/usr/bin/ld +.if defined(LLD_UNSAFE) && ${_TEST_LD:tA} == "/usr/bin/ld.lld" +LDFLAGS+= -fuse-ld=bfd +. if !defined(USE_BINUTILS) +. if exists(/usr/bin/ld.bfd) +LD= /usr/bin/ld.bfd +CONFIGURE_ENV+= LD=${LD} +MAKE_ENV+= LD=${LD} +. else +USE_BINUTILS= yes +. endif +. endif +.endif + .if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS) BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils BINUTILS?= ADDR2LINE AR AS CPPFILT GPROF LD NM OBJCOPY OBJDUMP RANLIB \ |