git: 0a52b6abcfe9 - main - lang/ocaml: fix build on powerpc

Piotr Kubaj pkubaj at FreeBSD.org
Thu Jun 10 18:30:28 UTC 2021


The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0a52b6abcfe917dbb9b39514b1d2d5dc0d50a8de

commit 0a52b6abcfe917dbb9b39514b1d2d5dc0d50a8de
Author:     Piotr Kubaj <pkubaj at FreeBSD.org>
AuthorDate: 2021-06-10 18:29:12 +0000
Commit:     Piotr Kubaj <pkubaj at FreeBSD.org>
CommitDate: 2021-06-10 18:29:12 +0000

    lang/ocaml: fix build on powerpc
    
    Use ld.bfd:
    ld: error: can't create dynamic relocation R_PPC_ADDR16_LO against symbol: caml_last_return_address in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
---
 lang/ocaml/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile
index 3c0c8335af3a..9eb9faca8621 100644
--- a/lang/ocaml/Makefile
+++ b/lang/ocaml/Makefile
@@ -71,6 +71,8 @@ PLIST_SUB+=	DOC="@comment "
 
 .if ${ARCH} == armv6 || ${ARCH} == armv7
 CONFIGURE_ARGS+=	-as "${AS} ${ASFLAGS} -meabi=5"
+.elif ${ARCH} == powerpc
+LLD_UNSAFE=		yes
 .else
 CONFIGURE_ARGS+=	-as "${AS} ${ASFLAGS}"
 .endif


More information about the dev-commits-ports-main mailing list