From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6528315800A for ; Mon, 17 Jul 2023 09:44:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 59522E0934; Mon, 17 Jul 2023 09:44:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 26D91E0936 for ; Mon, 17 Jul 2023 09:44:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5930D340D8B for ; Mon, 17 Jul 2023 09:44:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A71E7B7D for ; Mon, 17 Jul 2023 09:44:27 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1689587059.d2da31f41428439e273db7f1a8c8c3ff883641ed.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/distutils-r1.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: d2da31f41428439e273db7f1a8c8c3ff883641ed X-VCS-Branch: master Date: Mon, 17 Jul 2023 09:44:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5cc70de7-186d-4275-9cba-d019fdf21976 X-Archives-Hash: 7f0f5243b723e2fc199618f3866e1c86 commit: d2da31f41428439e273db7f1a8c8c3ff883641ed Author: Michał Górny gentoo org> AuthorDate: Wed Jul 12 12:19:36 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Jul 17 09:44:19 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2da31f4 distutils-r1.eclass: Disable LTO when using cargo.eclass Strip LTO flags when cargo.eclass is inherited. This means that Rust extensions are being built, and linking them with C/C++ style LTO results in broken shared libraries. Closes: https://bugs.gentoo.org/910220 Signed-off-by: Michał Górny gentoo.org> eclass/distutils-r1.eclass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 924e83b54ad8..e4f0589e191b 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -191,6 +191,7 @@ esac if [[ -z ${_DISTUTILS_R1_ECLASS} ]]; then _DISTUTILS_R1_ECLASS=1 +inherit flag-o-matic inherit multibuild multilib multiprocessing ninja-utils toolchain-funcs if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then @@ -1836,6 +1837,12 @@ distutils-r1_run_phase() { local -x CYTHON_FORCE_REGEN=1 fi + # Rust extensions are incompatible with C/C++ LTO compiler + # see e.g. https://bugs.gentoo.org/910220 + if has cargo ${INHERITED}; then + filter-lto + fi + # How to build Python modules in different worlds... local ldopts case "${CHOST}" in