diff options
author | Andrei Horodniceanu <a.horodniceanu@proton.me> | 2024-10-04 08:04:47 +0300 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-10-07 05:12:41 +0100 |
commit | 258a44f3500383f7948781d463652b6d79aa7c06 (patch) | |
tree | 2bbddf94426e2c8ceb3498e0ae2d33355ef43c5d /eclass | |
parent | toolchain.eclass: Only search for a D installation if D bootstrapping is needed (diff) | |
download | gentoo-258a44f3500383f7948781d463652b6d79aa7c06.tar.gz gentoo-258a44f3500383f7948781d463652b6d79aa7c06.tar.bz2 gentoo-258a44f3500383f7948781d463652b6d79aa7c06.zip |
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 <a.horodniceanu@proton.me>
Closes: https://github.com/gentoo/gentoo/pull/38894
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 19 |
1 files 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 <<---- |