Bug 230207 - lang/php56 (and others) fail to link with lld as /usr/bin/ld on i386
Summary: lang/php56 (and others) fail to link with lld as /usr/bin/ld on i386
Status: Closed DUPLICATE of bug 224442
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks: 214864
  Show dependency treegraph
 
Reported: 2018-07-30 23:46 UTC by Ed Maste
Modified: 2019-01-07 21:56 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2018-07-30 23:46:49 UTC
The migration to the LLVM project's lld linker as the system linker (/usr/bin/ld) for FreeBSD is in progress - it is the case for arm64 and amd64 today, and i386 will switch once ports issues are addressed - see exp-run in PR214864.

Attempting to link php produces many errors of the form:

/usr/bin/ld: error: can't create dynamic relocation R_386_32 against symbol: php_date_global_timezone_db in readonly segment; recompile object files with -fPIC
>>> defined in ext/date/.libs/php_date.o
>>> referenced by php_date.c
>>>               ext/date/.libs/php_date.o:(zif_strtotime)

http://package18.nyi.freebsd.org/data/headi386PR214864-default/2018-07-30_18h09m59s/logs/errors/php56-5.6.37.log

This applies to lang/php56, lang/php70, lang/php71, lang/php72
Comment 1 Ed Maste freebsd_committer freebsd_triage 2018-09-05 14:35:51 UTC

*** This bug has been marked as a duplicate of bug 224442 ***
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-09-18 16:08:49 UTC
A commit references this bug:

Author: emaste
Date: Tue Sep 18 16:08:02 UTC 2018
New revision: 480035
URL: https://svnweb.freebsd.org/changeset/ports/480035

Log:
  lang/php*: link with -znotext on i386

  This port links some non-PIC code, which fails with lld as it defaults
  to disallowing relocations against read-only segments. For i386 we can
  just add -znotext unconditionally: for GNU BFD ld it just affirms BFD's
  existing default.

  PR:		214864, 230207
  Approved by:	bapt
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D17193

Changes:
  head/lang/php56/Makefile
  head/lang/php70/Makefile
  head/lang/php71/Makefile
  head/lang/php72/Makefile
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-11-22 20:21:28 UTC
A commit references this bug:

Author: emaste
Date: Thu Nov 22 20:20:58 UTC 2018
New revision: 485615
URL: https://svnweb.freebsd.org/changeset/ports/485615

Log:
  lang/php73: link with -znotext on i386

  This port links some non-PIC code, which fails with lld as it defaults
  to disallowing relocations against read-only segments. For i386 we can
  just add -znotext unconditionally: for GNU BFD ld it just affirms BFD's
  existing default.

  PR:		214864, 230207
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/lang/php73/Makefile