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 BDB5315807B for ; Mon, 7 Oct 2024 04:13:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 83341E29AC; Mon, 7 Oct 2024 04:13:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 58A45E29AC for ; Mon, 7 Oct 2024 04:13:04 +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 01FC334315A for ; Mon, 7 Oct 2024 04:13:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 60503213C for ; Mon, 7 Oct 2024 04:13:01 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1728274361.258a44f3500383f7948781d463652b6d79aa7c06.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 258a44f3500383f7948781d463652b6d79aa7c06 X-VCS-Branch: master Date: Mon, 7 Oct 2024 04:13:01 +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: 4302c4b6-a09d-4e36-9f43-601c9d224e9f X-Archives-Hash: d55a69c5e7d9d78c0d5375832ea44eed commit: 258a44f3500383f7948781d463652b6d79aa7c06 Author: Andrei Horodniceanu proton me> AuthorDate: Fri Oct 4 05:04:47 2024 +0000 Commit: Sam James gentoo org> CommitDate: Mon Oct 7 04:12:41 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=258a44f3 toolchain.eclass: Print an error message and die if GDC isn't found When cross compiling sys-devel/gcc[d] one would need cross-${CHOST}/gcc[d] installed. We can't enforce this dependency so defer to printing an error message if it can't be found prompting the user to install the package. Signed-off-by: Andrei Horodniceanu proton.me> Closes: https://github.com/gentoo/gentoo/pull/38894 Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index ff02723e2d90..34f595bcd1bc 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1032,9 +1032,24 @@ toolchain_setup_d() { eend 1 done - if [[ -n ${d_bootstrap} ]] ; then - export GDC=${gcc_bin_base}/${d_bootstrap}/${CHOST}-gdc + if [[ -z ${d_bootstrap} ]] ; then + if tc-is-cross-compiler ; then + # We can't add cross-${CHOST}/gcc[d] to BDEPEND but we can + # print a useful message to the user. + eerror "No ${gcc_pkg}[d] was found installed." + eerror "When cross-compiling GDC a bootstrap GDC is required." + eerror "Either disable the d USE flag or add:" + eerror "" + eerror " ${gcc_pkg} d" + eerror "" + eerror "In your package.use and re-emerge it." + eerror "" + fi + + die "Did not find any appropriate GDC compiler installed" fi + + export GDC=${gcc_bin_base}/${d_bootstrap}/${CHOST}-gdc } #---->> src_configure <<----