Bug 234790

Summary: audio/faust-lv2: fails to link on i386 with LLD as system linker
Product: Ports & Packages Reporter: Ed Maste <emaste>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: New ---    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (yuri)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 214864    

Description Ed Maste freebsd_committer 2019-01-09 15:19:02 UTC
http://package18.nyi.freebsd.org/build.html?mastername=headi386PR214864-default&build=2019-01-05_21h00m02s
http://package18.nyi.freebsd.org/data/headi386PR214864-default/2019-01-05_21h00m02s/logs/errors/faust-lv2-1.4.20180118_2.log

ld: error: can't create dynamic relocation R_386_32 against symbol: vtable for LV2UI in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /tmp/NLFeks-4b81cb.o
>>> referenced by NLFeks.cpp
>>>               /tmp/NLFeks-4b81cb.o:(LV2UI::LV2UI(int))

ld: error: can't create dynamic relocation R_386_32 against symbol: vtable for LV2UI in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /tmp/NLFeks-4b81cb.o
>>> referenced by NLFeks.cpp
>>>               /tmp/NLFeks-4b81cb.o:(LV2UI::~LV2UI())
...

Need to add -Wl,-z,notext to the compiler driver link invocation; unfortunately this port does not honour LDFLAGS.

Adding -Wl,-z,notext to CFLAGS (for i386) appears to work.  Same change probably solves the BROKEN_aarch64 issue.
Comment 1 Ed Maste freebsd_committer 2019-07-24 19:33:29 UTC
lld has been enabled as system linker for i386 on stable/12 in advance of 12.1 (base svn r350297, a few minutes ago)