diff options
author | Ed Maste <emaste@FreeBSD.org> | 2018-09-18 16:05:15 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2018-09-18 16:05:15 +0000 |
commit | fcedde52c4de433b626b2424b21718d5190cbfb1 (patch) | |
tree | f3373bf3c31fb8ec23a559e3d8e67c88a3061246 /lang/ocaml | |
parent | d43312d77a5aa6aa5c1bf381acad00a27c516024 (diff) | |
download | freebsd-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/Makefile | 1 |
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}" \ |