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
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 ------------------------------------------------------------------------