From ef479ce0f2e28710b4ec1b53bdbf39b99eb0627b Mon Sep 17 00:00:00 2001 From: Alarig Le Lay Date: Tue, 7 Mar 2023 19:17:11 +0100 Subject: [PATCH] net-misc/bird: Using custom-cflags to make lto optionnal --- net-misc/bird/bird-2.0.12.ebuild | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/net-misc/bird/bird-2.0.12.ebuild b/net-misc/bird/bird-2.0.12.ebuild index 382c117..22f83ed 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? ( @@ -46,11 +46,25 @@ src_prepare() { } src_configure() { - econf \ - --localstatedir="${EPREFIX}/var" \ - $(use_enable client) \ - $(use_enable debug) \ + # This export makes compilation and test phases verbose + export VERBOSE=1 + + # lto must be enabled by default as bird is mono-threaded and use several + # optimisations to be fast, at it may very likely be exposed to several + # thounsand BGP updates per seconds + # Although, we make it possible to desactivate it if wanted + if use custom-cflags; then + export bird_cv_c_lto=no + fi + + local myargs=( + --localstatedir="${EPREFIX}/var" + $(use_enable client) + $(use_enable debug) $(use_enable libssh) + ) + + econf "${myargs[@]}" } src_install() {