commit:     aec66421746a0ac2dc2b2eebed6e0f0d2abe3405
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Feb 28 22:30:22 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 28 22:57:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aec66421

media-libs/plib: mark LTO-unsafe, mark strict-aliasing unsafe

This code is formally terrible. It is so terrible, because upstream
claims: "PLIB has been obsolete and unmaintained for at LEAST 15
years!!"

https://sourceforge.net/p/plib/bugs/55/#88e9

And that was already 3 years ago. We can't fix it so limit the extent to
which compilers are allowed to misinterpret it.

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

 media-libs/plib/plib-1.8.5-r4.ebuild | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/media-libs/plib/plib-1.8.5-r4.ebuild 
b/media-libs/plib/plib-1.8.5-r4.ebuild
index 3e4494514020..b5769bd1ab11 100644
--- a/media-libs/plib/plib-1.8.5-r4.ebuild
+++ b/media-libs/plib/plib-1.8.5-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -32,6 +32,12 @@ src_prepare() {
 src_configure() {
        append-cxxflags -std=c++03
 
+       # violates strict aliasing rules and is LTO-unsafe: 
https://bugs.gentoo.org/860048
+       # Per upstream in 2021, "PLIB has been obsolete and unmaintained for at 
LEAST 15 years!!"
+       # so this is getting fixed exactly never and getting worse.
+       append-cxxflags -fno-strict-aliasing
+       filter-lto
+
        local myconf=(
                --enable-shared
        )

Reply via email to