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 E672515813A for ; Sat, 18 Jan 2025 21:51:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1C951E08A2; Sat, 18 Jan 2025 21:51:58 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 54DDEE08A2 for ; Sat, 18 Jan 2025 21:51:56 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 55BDD342F8D for ; Sat, 18 Jan 2025 21:51:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AD55B15B5 for ; Sat, 18 Jan 2025 21:51:53 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1737237101.95989aaa274f30e42d00828e16fbe5c4c73c9299.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/glibc/glibc-2.40-r7.ebuild sys-libs/glibc/glibc-9999.ebuild X-VCS-Directories: sys-libs/glibc/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 95989aaa274f30e42d00828e16fbe5c4c73c9299 X-VCS-Branch: master Date: Sat, 18 Jan 2025 21:51:53 +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: 2304f963-8cce-4d58-a284-a328f34ebbdc X-Archives-Hash: e8f3fd770167e33196c0ff22e16313fa commit: 95989aaa274f30e42d00828e16fbe5c4c73c9299 Author: James Le Cuirot gentoo org> AuthorDate: Fri Jan 3 16:58:12 2025 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Sat Jan 18 21:51:41 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95989aaa sys-libs/glibc: Fix cross-compiling glibc when clang is selected binutils-config returns the wrong binary path for cross-compilers unless you specify both the CHOST (actually CBUILD in this case) and CTARGET. Cross-compilers do not have the bare binary names (e.g. gcc) in the binary path returned by gcc-config, but the tuple-prefixed names are always present. Tested with a cross build and a native build. Closes: https://github.com/gentoo/gentoo/pull/39966 Signed-off-by: James Le Cuirot gentoo.org> sys-libs/glibc/glibc-2.40-r7.ebuild | 10 +++++----- sys-libs/glibc/glibc-9999.ebuild | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys-libs/glibc/glibc-2.40-r7.ebuild b/sys-libs/glibc/glibc-2.40-r7.ebuild index 66f7383c954d..e7b5d78134bb 100644 --- a/sys-libs/glibc/glibc-2.40-r7.ebuild +++ b/sys-libs/glibc/glibc-2.40-r7.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -609,13 +609,13 @@ setup_env() { # Last, we need the settings of the *build* environment, not of the # target environment... - local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) + local current_binutils_path=$(env CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}") local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) einfo "Overriding clang configuration, since it won't work here" - export CC="${current_gcc_path}/gcc" - export CPP="${current_gcc_path}/cpp" - export CXX="${current_gcc_path}/g++" + export CC="${current_gcc_path}/${CTARGET}-gcc" + export CPP="${current_gcc_path}/${CTARGET}-cpp" + export CXX="${current_gcc_path}/${CTARGET}-g++" export LD="${current_binutils_path}/ld.bfd" export AR="${current_binutils_path}/ar" export AS="${current_binutils_path}/as" diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 39f4cd3f2872..b331be70e2de 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -615,13 +615,13 @@ setup_env() { # Last, we need the settings of the *build* environment, not of the # target environment... - local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) + local current_binutils_path=$(env CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}") local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) einfo "Overriding clang configuration, since it won't work here" - export CC="${current_gcc_path}/gcc" - export CPP="${current_gcc_path}/cpp" - export CXX="${current_gcc_path}/g++" + export CC="${current_gcc_path}/${CTARGET}-gcc" + export CPP="${current_gcc_path}/${CTARGET}-cpp" + export CXX="${current_gcc_path}/${CTARGET}-g++" export LD="${current_binutils_path}/ld.bfd" export AR="${current_binutils_path}/ar" export AS="${current_binutils_path}/as"