Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Sep 2018 16:05:15 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r480033 - head/lang/ocaml
Message-ID:  <201809181605.w8IG5FCS007669@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste (src committer)
Date: Tue Sep 18 16:05:15 2018
New Revision: 480033
URL: https://svnweb.freebsd.org/changeset/ports/480033

Log:
  lang/ocaml: add -znotext to LDFLAGS on i386, for lld
  
  Example error:
  /usr/bin/ld: error: can't create dynamic relocation R_386_32 against
      symbol: caml_last_return_address in readonly segment; recompile
      object files with -fPIC
  
  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, 230209
  Approved by:	bapt
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D17200

Modified:
  head/lang/ocaml/Makefile

Modified: head/lang/ocaml/Makefile
==============================================================================
--- head/lang/ocaml/Makefile	Tue Sep 18 16:04:19 2018	(r480032)
+++ head/lang/ocaml/Makefile	Tue Sep 18 16:05:15 2018	(r480033)
@@ -33,6 +33,7 @@ ALL_TARGET=	world.opt
 STRIP=
 SSP_UNSAFE=	yes
 MAKE_JOBS_UNSAFE=	yes
+LDFLAGS_i386=	-Wl,-znotext
 
 CONFIGURE_ARGS=	-verbose -prefix "${PREFIX}" \
 		-cc "${CC}" \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809181605.w8IG5FCS007669>