diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-07-15 00:41:39 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-07-15 00:42:54 +0000 |
commit | 85ffdceb69831fd6f4f188784aee626414ce5929 (patch) | |
tree | d417ba25eefdecd47c32285f4dbf7b80cd00ab4b | |
parent | 213c779e49b95baf5968b28af26959119fec5863 (diff) | |
download | ports-85ffdceb69831fd6f4f188784aee626414ce5929.tar.gz ports-85ffdceb69831fd6f4f188784aee626414ce5929.zip |
lang/ocaml: fix build on powerpc*
1. SYSTEM_ARCH needs to be set to power.
2. To override LD, -fuse-ld=bfd needs to be appended to CC.
-rw-r--r-- | lang/ocaml/Makefile | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile index 3e4b22ddb1dc..93eb441d046e 100644 --- a/lang/ocaml/Makefile +++ b/lang/ocaml/Makefile @@ -45,11 +45,10 @@ awk_CMD= /usr/bin/awk SHEBANG_FILES= tools/ocaml-instr-graph tools/ocaml-instr-report CONFIGURE_ARGS= --prefix="${PREFIX}" -CONFIGURE_ENV= CC="${CC}" \ - LDFLAGS="${LDFLAGS}" \ +CONFIGURE_ENV= LDFLAGS="${LDFLAGS}" \ ASPP="${CC} -c" \ PARTIALLD="${LD} -r" -MAKE_ENV= SYSTEM_ARCH="${ARCH}" +MAKE_ENV= SYSTEM_ARCH="${ARCH:C/powerpc.*/power/}" OPTIONS_DEFINE= X11 THREADS DOCS EXAMPLES OPTIONS_DEFAULT=X11 THREADS @@ -76,11 +75,13 @@ DOCS_DISTFILES= ${DISTNAME:R}-refman-html.tar.gz:docs \ .include <bsd.port.pre.mk> .if ${ARCH} == armv6 || ${ARCH} == armv7 -CONFIGURE_ENV+= AS="${AS} ${ASFLAGS} -meabi=5" +CONFIGURE_ENV+= AS="${AS} ${ASFLAGS} -meabi=5" \ + CC="${CC}" .elif ${ARCH} == powerpc || ${ARCH} == powerpc64 || ${ARCH} == powerpc64le -LLD_UNSAFE= yes +CONFIGURE_ENV+= CC="${CC} -fuse-ld=bfd" .else -CONFIGURE_ENV+= AS="${AS} ${ASFLAGS}" +CONFIGURE_ENV+= AS="${AS} ${ASFLAGS}" \ + CC="${CC}" .endif .if defined(NO_PROFILE) || ${ARCH:Mpowerpc} || ${ARCH:Mamd64} |