Bug 234866

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

Description Ed Maste freebsd_committer freebsd_triage 2019-01-11 14:15:14 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/quake2lnx-0.16.2_15.log

ld: error: can't create dynamic relocation R_386_32 against symbol: r_refdef in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in release/ref_soft/r_main.o
>>> referenced by release/ref_soft/r_aclipa.o:(.text+0xB)

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 release/ref_soft/r_aclipa.o
>>> referenced by release/ref_soft/r_aclipa.o:(.text+0x2D)

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 release/ref_soft/r_aclipa.o
>>> referenced by release/ref_soft/r_aclipa.o:(.text+0x32)
...
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-04-16 03:59:54 UTC
A commit references this bug:

Author: danfe
Date: Tue Apr 16 03:58:59 UTC 2019
New revision: 499072
URL: https://svnweb.freebsd.org/changeset/ports/499072

Log:
  - Do not suppress -Wall from default CFLAGS, it is always good to see if the
    code needs some attention, and move macro definition behind other flags
  - Fix the build against the LLD linker on i386 when using optimized assembly
    routines by allowing relocations in read-only segments (normally, Quake II
    builds its shared libraries with -fPIC and they link fine except these few
    files written in assembly)

  PR:		234866
  Submitted by:	emaste

Changes:
  head/games/quake2lnx/Makefile
  head/games/quake2lnx/files/patch-Makefile
Comment 2 Alexey Dokuchaev freebsd_committer freebsd_triage 2019-04-16 04:01:22 UTC
The port should be fixed as of ports r499072, thank you.