summaryrefslogtreecommitdiff
path: root/dev-lang/ocaml/ocaml-4.09.0.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/ocaml/ocaml-4.09.0.ebuild')
-rw-r--r--dev-lang/ocaml/ocaml-4.09.0.ebuild11
1 files changed, 11 insertions, 0 deletions
diff --git a/dev-lang/ocaml/ocaml-4.09.0.ebuild b/dev-lang/ocaml/ocaml-4.09.0.ebuild
index 181f30b8fef2..f74988668b87 100644
--- a/dev-lang/ocaml/ocaml-4.09.0.ebuild
+++ b/dev-lang/ocaml/ocaml-4.09.0.ebuild
@@ -3,6 +3,8 @@
EAPI=7
+inherit flag-o-matic
+
HOMEPAGE="https://ocaml.org/"
SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles"
@@ -23,6 +25,15 @@ PATCHES=("${FILESDIR}"/${PN}-4.09.0-gcc-10.patch)
src_prepare() {
default
+
+ # OCaml generates textrels on 32-bit arches
+ # We can't do anything about it, but disabling it means that tests
+ # for OCaml-based packages won't fail on unexpected output
+ # bug #773226
+ if use arm || use ppc || use x86 ; then
+ append-ldflags "-Wl,-z,notext"
+ fi
+
# Upstream build ignores LDFLAGS in several places.
sed -i -e 's/\(^MKDLL=.*\)/\1 $(LDFLAGS)/' \
-e 's/\(^OC_CFLAGS=.*\)/\1 $(LDFLAGS)/' \