Page MenuHomeFreeBSD

Use BINARY_ALIAS to make LLD_UNSAFE more widely applicable
ClosedPublic

Authored by emaste on Mar 28 2018, 1:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 11:04 AM
Unknown Object (File)
Thu, Nov 7, 5:30 PM
Unknown Object (File)
Wed, Nov 6, 8:34 PM
Unknown Object (File)
Tue, Nov 5, 8:30 AM
Unknown Object (File)
Thu, Oct 31, 4:27 PM
Unknown Object (File)
Sun, Oct 20, 3:11 PM
Unknown Object (File)
Fri, Oct 18, 3:45 AM
Unknown Object (File)
Thu, Oct 17, 12:13 PM
Subscribers

Details

Summary

Some ports do not honour $LD or -fuse-ld=bfd in $CFLAGS, but do invoke ld via $PATH. Automatically set BINARY_ALIAS+=ld=ld.bfd when LLD_UNSAFE is active to use ld.bfd for these ports.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

These ports currently have BINARY_ALIAS=ld=ld.bfd and should be able to use just LLD_UNSAFE with this change:

devel/pdcurses
devel/libds
lang/myrddin
irc/evangeline
sysutils/installwatch

I tested the first two and they built successfully.

Mmmm, should not this be in the .if exists(/usr/bin/ld.bfd) block? Or does USE_BINUTILS also installs a ld.bfd and a ld.ldd?

I think this was already added to some ports, I am not sure how the BINARY_ALIAS code will work if there is the same alias twice, so make sure you remove the existing aliases at the same time.

I am not sure if using BINARY_ALIAS+= ld=ld.bfd is correct.
If both /usr/bin/ld.bfd and binutils from ports are installed, it will alias to which ld.bfd which is /usr/bin/ld.bfd and not to /usr/local/bin/ld.bfd
Maybe it should be BINARY_ALIAS+= ld=${LD} instead?

In D14876#312853, @mat wrote:

Mmmm, should not this be in the .if exists(/usr/bin/ld.bfd) block? Or does USE_BINUTILS also installs a ld.bfd and a ld.ldd?

Yes, USE_BINUTILS also installs ld.bfd.

I think this was already added to some ports, I am not sure how the BINARY_ALIAS code will work if there is the same alias twice, so make sure you remove the existing aliases at the same time.

Good point, will do.

  • use ld=${LD} (@antoine)
  • remove existing BINARY_ALIAS (@mat)
Mk/bsd.port.mk
1847 ↗(On Diff #40835)

+= ?

  • += from @antoine
  • address newly added BINARY_ALIASes

Make sure that all the exisiting BINARY_ALIAS=ld=ld.bfd are removed.

This revision is now accepted and ready to land.Mar 29 2018, 1:52 PM
This revision was automatically updated to reflect the committed changes.