Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Aug 2017 17:27:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 221808] archivers/lua51-zlib: port passes $LDFLAGS to direct linker invocation, not compiler driver
Message-ID:  <bug-221808-13-PxMPLkcwEd@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-221808-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-221808-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221808

--- Comment #2 from Ed Maste <emaste@freebsd.org> ---
(In reply to Sir l33tname from comment #1)
Thanks for the patch - I will review and test it here.

For the majority of ports that invoke the compiler driver (${CC}) to link t=
he
easiest way to test with lld is to add -fuse-ld=3Dlld to LDFLAGS. For ports=
 that
invoke the linker directly (as this one appears to) setting LD=3Dld.lld in =
the
environment is probably sufficient.

You can also make /usr/bin/ld a link to one of ld.bfd and ld.lld to select =
the
default linker. In -current /usr/bin/ld is a hard link to ld.bfd by default=
, or
a symlink to ld.lld if WITH_LLD_IS_LD is set.

You can verify that lld was used for linking by checking the .comment secti=
on.
lld inserts a "Linker: ' comment with a version string. For example:

nuc% readelf --string-dump=3D.comment /bin/ls

String dump of section '.comment':
  [     1]  $FreeBSD$
  [     b]  FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (ba=
sed
on LLVM 4.0.0)
  [    5d]  FreeBSD clang version 5.0.0 (trunk 306956) (based on LLVM 5.0.0=
svn)
  [    a1]  Linker: LLD 5.0.0 (FreeBSD 311606)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221808-13-PxMPLkcwEd>