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