Bug 234866 - games/quake2lnx: fails to build on i386 with lld as system linker
Summary: games/quake2lnx: fails to build on i386 with lld as system linker
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: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks: 214864
  Show dependency treegraph
 
Reported: 2019-01-11 14:15 UTC by Ed Maste
Modified: 2019-04-16 04:01 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 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 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 2019-04-16 04:01:22 UTC
The port should be fixed as of ports r499072, thank you.