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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6A63715812D for ; Thu, 02 Jan 2025 16:38:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90346E081E; Thu, 02 Jan 2025 16:38:50 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 1C5ADE083D for ; Thu, 02 Jan 2025 16:38:50 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: James Le Cuirot Subject: [gentoo-dev] [PATCH] toolchain.eclass: Don't prefixify dynamic linker for cross-compilers Date: Thu, 2 Jan 2025 16:38:27 +0000 Message-ID: <20250102163832.26654-1-chewi@gentoo.org> X-Mailer: git-send-email 2.47.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 8479529e-7817-4ac9-af3f-6bd680fd7585 X-Archives-Hash: c0116c42775556b158da84629188770d Cross environments within a prefixed system do not have a nested prefix, i.e. they are located at ${EPREFIX}/usr/${CHOST}, not ${EPREFIX}/usr/${CHOST}/${EPREFIX}. Binaries built with the cross-compiler should therefore get an unprefixed dynamic linker path by default so that they work out of the box with QEMU's -L option. Signed-off-by: James Le Cuirot --- eclass/toolchain.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index c605c437f355a..f5d3b83c2e03b 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -716,7 +716,7 @@ toolchain_src_prepare() { gnuconfig_update - if ! use prefix-guest && [[ -n ${EPREFIX} ]] ; then + if ! is_crosscompile && ! use prefix-guest && [[ -n ${EPREFIX} ]] ; then einfo "Prefixifying dynamic linkers..." for f in gcc/config/*/*linux*.h ; do ebegin " Updating ${f}" -- 2.47.1