commit:     2df2ec23674da60b38a6aec7e5f1a8e5c281203b
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Mar  6 07:21:02 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar  6 07:25:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2df2ec23

sci-libs/scalapack: mark as LTO-unsafe, strict-aliasing unsafe

Closes: https://bugs.gentoo.org/862924
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/scalapack/scalapack-2.1.0.ebuild | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/sci-libs/scalapack/scalapack-2.1.0.ebuild 
b/sci-libs/scalapack/scalapack-2.1.0.ebuild
index e102c27d3b80..843d2ff0d166 100644
--- a/sci-libs/scalapack/scalapack-2.1.0.ebuild
+++ b/sci-libs/scalapack/scalapack-2.1.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit cmake fortran-2 toolchain-funcs
+inherit cmake flag-o-matic fortran-2 toolchain-funcs
 
 GCC10_PATCH_HASH="bc6cad585362aa58e05186bb85d4b619080c45a9"
 
@@ -39,6 +39,14 @@ src_prepare() {
 }
 
 src_configure() {
+       # -Werror=strict-aliasing
+       # https://bugs.gentoo.org/862924
+       # https://github.com/Reference-ScaLAPACK/scalapack/issues/95
+       #
+       # Do not trust it for LTO either.
+       append-flags -fno-strict-aliasing
+       filter-lto
+
        scalapack_configure() {
                local mycmakeargs=(
                        -DUSE_OPTIMIZED_LAPACK_BLAS=ON

Reply via email to