Bug 221727 - devel/libffi: fails to link with lld (WITH_LLD_IS_LD) on i386
Summary: devel/libffi: fails to link with lld (WITH_LLD_IS_LD) on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 214864
  Show dependency treegraph
 
Reported: 2017-08-22 20:05 UTC by Ed Maste
Modified: 2017-12-19 18:39 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (zeising)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2017-08-22 20:05:54 UTC
PR submitted for tracking. Found during exp-run in PR214864 -- linking fails with:

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment
>>> defined in src/x86/.libs/win32.o
>>> referenced by src/x86/.libs/win32.o:(.text+0x3F0)

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment
>>> defined in src/x86/.libs/win32.o
>>> referenced by src/x86/.libs/win32.o:(.text+0x414)

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment
>>> defined in src/x86/.libs/win32.o
>>> referenced by src/x86/.libs/win32.o:(.text+0x438)

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment
>>> defined in src/x86/.libs/win32.o
>>> referenced by src/x86/.libs/win32.o:(.text+0x460)

http://package18.nyi.freebsd.org/data/headi386PR214864-default/2017-08-20_08h31m49s/logs/errors/libffi-3.2.1.log
Comment 1 Dimitry Andric freebsd_committer 2017-12-19 18:39:00 UTC
Fixed in r456663 (I was not aware of this PR, so there was no PR: header in the commit message):
------------------------------------------------------------------------
r456663 | dim | 2017-12-18 18:48:43 +0100 (Mon, 18 Dec 2017) | 10 lines

Apply upstream change from libffi to check for HAVE_AS_X86_PCREL for all
x86 targets.  This should eliminate any text relocations, in particular
for the i386 build, making it possible to build the port with lld
without having to use -z notext.

Obtained from:	https://github.com/libffi/libffi/pull/174
Approved by:	zeising (maintainer)
PR:		214864
MFH:		2017Q4
------------------------------------------------------------------------