From 677056ae1551e2ab9c7203ea4a4c32f7d2d59f0a Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 7 Apr 2024 23:32:34 -0400 Subject: [PATCH] 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 Signed-off-by: Sam James --- 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 01a74e03df732..1b395672879f0 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