commit:     447ab933512e18f1d9d3e37cdf84b8b8d12f08e4
Author:     Alarig Le Lay <alarig <AT> swordarmor <DOT> fr>
AuthorDate: Tue Mar  7 18:11:57 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar  8 22:40:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=447ab933

net-misc/bird: Using custom-cflags to make lto optionnal

Closes: https://bugs.gentoo.org/781923
Signed-off-by: Alarig Le Lay <alarig <AT> swordarmor.fr>
Closes: https://github.com/gentoo/gentoo/pull/29980
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/bird/bird-2.0.12.ebuild | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/net-misc/bird/bird-2.0.12.ebuild b/net-misc/bird/bird-2.0.12.ebuild
index 11b8c7484e39..043f67e052c9 100644
--- a/net-misc/bird/bird-2.0.12.ebuild
+++ b/net-misc/bird/bird-2.0.12.ebuild
@@ -12,7 +12,7 @@ LICENSE="GPL-2"
 
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86 ~x64-macos"
-IUSE="+client debug libssh"
+IUSE="+client custom-cflags debug libssh"
 
 RDEPEND="
        client? (
@@ -56,6 +56,12 @@ src_configure() {
                $(use_enable libssh)
        )
 
+       # lto must be enabled by default as bird is mono-threaded and use 
several
+       # optimisations to be fast, as it may very likely be exposed to several
+       # thounsand BGP updates per seconds
+       # Although, we make it possible to deactivate it if wanted
+       use custom-cflags && myargs+=( bird_cv_c_lto=no )
+
        econf "${myargs[@]}"
 }
 

Reply via email to