commit:     2bca294bbe5941e8ce680a48824d3addc1a09ad0
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Fri Apr  5 01:06:28 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr  5 01:20:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bca294b

net-analyzer/netdata: mark as LTO-unsafe, strict-aliasing unsafe

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

 net-analyzer/netdata/netdata-1.45.2.ebuild | 10 +++++++++-
 net-analyzer/netdata/netdata-9999.ebuild   | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/net-analyzer/netdata/netdata-1.45.2.ebuild 
b/net-analyzer/netdata/netdata-1.45.2.ebuild
index 2d2fe2aeb560..0d57f53917bc 100644
--- a/net-analyzer/netdata/netdata-1.45.2.ebuild
+++ b/net-analyzer/netdata/netdata-1.45.2.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 PYTHON_COMPAT=( python{3_9,3_10,3_11} )
 
-inherit cmake fcaps linux-info optfeature python-single-r1 systemd
+inherit cmake fcaps flag-o-matic linux-info optfeature python-single-r1 systemd
 
 if [[ ${PV} == *9999 ]] ; then
        EGIT_REPO_URI="https://github.com/netdata/${PN}.git";
@@ -95,6 +95,14 @@ pkg_setup() {
 }
 
 src_configure() {
+       # -Werror=strict-aliasing
+       # https://bugs.gentoo.org/927174
+       # https://github.com/netdata/netdata/issues/17321
+       #
+       # Do not trust with LTO either.
+       append-flags -fno-strict-aliasing
+       filter-lto
+
        local mycmakeargs=(
                -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE
                -DCMAKE_INSTALL_PREFIX=/

diff --git a/net-analyzer/netdata/netdata-9999.ebuild 
b/net-analyzer/netdata/netdata-9999.ebuild
index 2d2fe2aeb560..0d57f53917bc 100644
--- a/net-analyzer/netdata/netdata-9999.ebuild
+++ b/net-analyzer/netdata/netdata-9999.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 PYTHON_COMPAT=( python{3_9,3_10,3_11} )
 
-inherit cmake fcaps linux-info optfeature python-single-r1 systemd
+inherit cmake fcaps flag-o-matic linux-info optfeature python-single-r1 systemd
 
 if [[ ${PV} == *9999 ]] ; then
        EGIT_REPO_URI="https://github.com/netdata/${PN}.git";
@@ -95,6 +95,14 @@ pkg_setup() {
 }
 
 src_configure() {
+       # -Werror=strict-aliasing
+       # https://bugs.gentoo.org/927174
+       # https://github.com/netdata/netdata/issues/17321
+       #
+       # Do not trust with LTO either.
+       append-flags -fno-strict-aliasing
+       filter-lto
+
        local mycmakeargs=(
                -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE
                -DCMAKE_INSTALL_PREFIX=/

Reply via email to