commit:     0f67609cac00b0e0009925a651d2486f0ed61d34
Author:     François Bissey <frp.bissey <AT> gmail <DOT> com>
AuthorDate: Fri Jul  2 00:17:49 2021 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Jul  2 00:42:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f67609c

sci-mathematics/singular: better flag control to avoid segfault

Closes: https://bugs.gentoo.org/797655
Closes: https://github.com/gentoo/gentoo/pull/21381
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: François René Pierre Bissey <frp.bissey <AT> gmail.com>
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-mathematics/singular/singular-4.2.0_p3-r1.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/singular/singular-4.2.0_p3-r1.ebuild 
b/sci-mathematics/singular/singular-4.2.0_p3-r1.ebuild
index dd0a6b83be0..7e20b068308 100644
--- a/sci-mathematics/singular/singular-4.2.0_p3-r1.ebuild
+++ b/sci-mathematics/singular/singular-4.2.0_p3-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit autotools elisp-common
+inherit autotools elisp-common flag-o-matic
 
 MY_PN=Singular
 MY_PV=$(ver_rs 3 '')
@@ -47,6 +47,9 @@ src_prepare() {
 }
 
 src_configure() {
+       # singular may segfault with common optimisation such as -O2 without 
this flag
+       append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks)
+
        econf --with-gmp \
                --with-ntl \
                --with-flint \
@@ -57,6 +60,7 @@ src_configure() {
                --enable-libfac \
                --disable-polymake \
                --with-libparse \
+               --disable-optimizationflags \
                $(use_enable static-libs static) \
                $(use_enable emacs) \
                $(use_with readline)

Reply via email to