From 7bfa843e2bec0fea79a22040d477cf42d1abe54c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= Date: Sat, 20 Sep 2025 14:26:20 +0200 Subject: [PATCH] net-dns/dnsdist: disable LTO for mixed C++/Rust configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is currently no good or reliable way to make this work, due to myriad combinations of compilers, linkers and limitations of the Rust toolchain. Closes: https://bugs.gentoo.org/963128 Signed-off-by: Holger Hoffstätte Part-of: https://github.com/gentoo/gentoo/pull/43861 Closes: https://github.com/gentoo/gentoo/pull/43861 Signed-off-by: Sam James --- net-dns/dnsdist/dnsdist-2.0.1.ebuild | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/net-dns/dnsdist/dnsdist-2.0.1.ebuild b/net-dns/dnsdist/dnsdist-2.0.1.ebuild index 3efa0746c516d..1891cad99c671 100644 --- a/net-dns/dnsdist/dnsdist-2.0.1.ebuild +++ b/net-dns/dnsdist/dnsdist-2.0.1.ebuild @@ -8,7 +8,7 @@ PYTHON_COMPAT=( python3_{11..14} ) RUST_MIN_VER=1.85.1 RUST_OPTIONAL=1 -inherit cargo flag-o-matic lua-single python-any-r1 +inherit cargo flag-o-matic lua-single python-any-r1 toolchain-funcs DESCRIPTION="A highly DNS-, DoS- and abuse-aware loadbalancer" HOMEPAGE="https://www.dnsdist.org/index.html" @@ -77,6 +77,13 @@ src_configure() { # bug #822855 append-lfs-flags + # There is currently no reliable way to handle mixed C++/Rust + LTO + # correctly: https://bugs.gentoo.org/963128 + if use yaml && tc-is-lto ; then + ewarn "Disabling LTO because of mixed C++/Rust toolchains." + filter-lto + fi + # some things can only be enabled/disabled by defines ! use dnstap && append-cppflags -DDISABLE_PROTOBUF ! use web && append-cppflags -DDISABLE_BUILTIN_HTML