commit:     23d034269b1fcfe85d736ef3131820a8b5fe789e
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Thu Mar 14 01:57:22 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 14 01:59:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23d03426

net-misc/portspoof: mark as LTO-unsafe, strict-aliasing unsafe

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

 net-misc/portspoof/portspoof-1.3-r1.ebuild | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/net-misc/portspoof/portspoof-1.3-r1.ebuild 
b/net-misc/portspoof/portspoof-1.3-r1.ebuild
index ad443ee320fb..d0fed28eeb2b 100644
--- a/net-misc/portspoof/portspoof-1.3-r1.ebuild
+++ b/net-misc/portspoof/portspoof-1.3-r1.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=8
 
+inherit flag-o-matic
+
 DESCRIPTION="return SYN+ACK for every port connection attempt"
 HOMEPAGE="http://portspoof.org/";
 LICENSE="GPL-2+"
@@ -29,6 +31,18 @@ src_prepare() {
        sed -i '/#include <sys\/sysctl.h>/d' src/connection.h || die
 }
 
+src_configure() {
+       # -Werror=strict-aliasing
+       # https://bugs.gentoo.org/861698
+       # https://github.com/drk1wi/portspoof/issues/48
+       #
+       # Do not trust it with LTO either
+       append-flags -fno-strict-aliasing
+       filter-lto
+
+       default
+}
+
 src_install() {
        default_src_install
        newsbin system_files/init.d/portspoof.sh portspoof-runner

Reply via email to