commit:     677056ae1551e2ab9c7203ea4a4c32f7d2d59f0a
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon Apr  8 03:32:34 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 05:21:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=677056ae

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

I cannot tell whether it's still a problem upstream. Too many
catastrophes going on in this codebase right now. Not going to report it
when I have no clue.

Maybe if it could be updated for a better baseline...

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

 sci-libs/hdf/hdf-4.2.15-r2.ebuild | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sci-libs/hdf/hdf-4.2.15-r2.ebuild 
b/sci-libs/hdf/hdf-4.2.15-r2.ebuild
index 01a74e03df73..1b395672879f 100644
--- a/sci-libs/hdf/hdf-4.2.15-r2.ebuild
+++ b/sci-libs/hdf/hdf-4.2.15-r2.ebuild
@@ -50,6 +50,14 @@ src_prepare() {
 }
 
 src_configure() {
+       # -Werror=strict-aliasing, -Werror=lto-type-mismatch
+       # https://bugs.gentoo.org/862720
+       #
+       # Do not trust with LTO either, just because of strict-aliasing.
+       # But also because it does have blatant LTO errors too.
+       append-flags -fno-strict-aliasing
+       filter-lto
+
        [[ $(tc-getFC) = *gfortran ]] && append-fflags -fno-range-check
        # GCC 10 workaround
        # bug #723014

Reply via email to