summaryrefslogtreecommitdiff
path: root/lang/ocaml
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-09-18 16:05:15 +0000
committerEd Maste <emaste@FreeBSD.org>2018-09-18 16:05:15 +0000
commitfcedde52c4de433b626b2424b21718d5190cbfb1 (patch)
treef3373bf3c31fb8ec23a559e3d8e67c88a3061246 /lang/ocaml
parentd43312d77a5aa6aa5c1bf381acad00a27c516024 (diff)
downloadfreebsd-ports-fcedde52c4de433b626b2424b21718d5190cbfb1.zip
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
Diffstat (limited to 'lang/ocaml')
-rw-r--r--lang/ocaml/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile
index efaa17931dc3..a12db022eb8d 100644
--- a/lang/ocaml/Makefile
+++ b/lang/ocaml/Makefile
@@ -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}" \