commit:     05f8053ee47fb207421205cb98570a4ee8b4990e
Author:     Rafael Kitover <rkitover <AT> gmail <DOT> com>
AuthorDate: Mon Apr 20 00:21:20 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue May  5 08:46:35 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05f8053e

dev-ml/camlp4: Avoid stack overflow in build.

Add ulimit -s 11530000 (set stack limit to 11GiB) to src_compile() to
try to avoid stack overflow errors.

Closes: https://bugs.gentoo.org/644352
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Rafael Kitover <rkitover <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/15433
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-ml/camlp4/camlp4-4.04_p1.ebuild | 2 ++
 dev-ml/camlp4/camlp4-4.05_p1.ebuild | 2 ++
 dev-ml/camlp4/camlp4-4.08_p1.ebuild | 4 +++-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/dev-ml/camlp4/camlp4-4.04_p1.ebuild 
b/dev-ml/camlp4/camlp4-4.04_p1.ebuild
index 8bf8d05f279..af8352a49da 100644
--- a/dev-ml/camlp4/camlp4-4.04_p1.ebuild
+++ b/dev-ml/camlp4/camlp4-4.04_p1.ebuild
@@ -33,6 +33,8 @@ src_configure() {
 }
 
 src_compile() {
+       # Increase stack limit to 11GiB to avoid stack overflow error.
+       ulimit -s 11530000
        emake byte
        use ocamlopt && emake native
 }

diff --git a/dev-ml/camlp4/camlp4-4.05_p1.ebuild 
b/dev-ml/camlp4/camlp4-4.05_p1.ebuild
index fe6e0dc150a..c7ad55154b1 100644
--- a/dev-ml/camlp4/camlp4-4.05_p1.ebuild
+++ b/dev-ml/camlp4/camlp4-4.05_p1.ebuild
@@ -33,6 +33,8 @@ src_configure() {
 }
 
 src_compile() {
+       # Increase stack limit to 11GiB to avoid stack overflow error.
+       ulimit -s 11530000
        emake byte
        use ocamlopt && emake native
 }

diff --git a/dev-ml/camlp4/camlp4-4.08_p1.ebuild 
b/dev-ml/camlp4/camlp4-4.08_p1.ebuild
index 0c86d665428..731b5432fd9 100644
--- a/dev-ml/camlp4/camlp4-4.08_p1.ebuild
+++ b/dev-ml/camlp4/camlp4-4.08_p1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -34,6 +34,8 @@ src_configure() {
 }
 
 src_compile() {
+       # Increase stack limit to 11GiB to avoid stack overflow error.
+       ulimit -s 11530000
        emake byte
        use ocamlopt && emake native
 }

Reply via email to