Bug 234836

Summary: audio/ocp: build fails on i386 with lld as system linker
Product: Ports & Packages Reporter: Ed Maste <emaste>
Component: Individual Port(s)Assignee: Emanuel Haupt <ehaupt>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (ehaupt)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 214864    

Description Ed Maste freebsd_committer freebsd_triage 2019-01-10 22:38:32 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/ocp-0.1.21_4,1.log

ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in mixasm.o
>>> referenced by mixasm.c
>>>               mixasm.o:(mixPlayChannel)

ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in mixasm.o
>>> referenced by mixasm.c
>>>               mixasm.o:(mixPlayChannel)

ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocrations in the output
>>> defined in mixasm.o
>>> referenced by mixasm.c
>>>               mixasm.o:(mixPlayChannel)
...

I tried adding LDFLAGS_i386=-Wl,-z,notext but it seems it is not passed through the build to the link invocation.
Comment 1 Emanuel Haupt freebsd_committer freebsd_triage 2019-01-11 08:59:52 UTC
(In reply to Ed Maste from comment #0)

Thank you. I'll look into it.
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-01-14 15:20:18 UTC
A commit references this bug:

Author: ehaupt
Date: Mon Jan 14 15:19:55 UTC 2019
New revision: 490259
URL: https://svnweb.freebsd.org/changeset/ports/490259

Log:
  Fix build on i386 with lld as system linker.

  PR:		234836 (based on)
  Submitted by:	emaste
  Reported by:	antoine (via exp-run)

Changes:
  head/audio/ocp/Makefile
  head/audio/ocp/files/patch-configure