Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Feb 2022 22:52:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 261668] bsd.port.mk: Correct usage of -fuse-ld=bfd
Message-ID:  <bug-261668-7788@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 261668
           Summary: bsd.port.mk: Correct usage of -fuse-ld=3Dbfd
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: eugen@freebsd.org
                CC: ports-bugs@FreeBSD.org

Created attachment 231512
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D231512&action=
=3Dedit
Correct usage of -fuse-ld=3Dbfd

bsd.ports.mk has this:

if defined(LLD_UNSAFE) && ${/usr/bin/ld:L:tA} =3D=3D /usr/bin/ld.lld
LDFLAGS+=3D      -fuse-ld=3Dbfd
BINARY_ALIAS+=3D ld=3D${LD}
 .  if !defined(USE_BINUTILS)
...

The line with LDFLAGS should be moved just after ".if !defined(USE_BINUTILS=
)"
or else build fails for a software that defines USE_BINUTILS and LLD_UNSAFE=
 for
sake of "-plugin" option of a linker not supported by ld.bfd.

Actual example is the port editors/libreoffice version 7.2.5.2 built with
non-default port option LTO enabled that is broken at the moment due to sev=
eral
issues. One of them is this problem in the bsd.ports.mk that cannot be solv=
ed
within port itself.

Trivial fix is attached.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



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