commit: 415e06c48955f3f0e32aa8fd9f6a7ac560f51488 Author: Z. Liu <zhixu.liu <AT> gmail <DOT> com> AuthorDate: Fri Oct 3 12:13:23 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Oct 26 01:02:47 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=415e06c4
dev-lang/mrustc: force gcc Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44129 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-lang/mrustc/mrustc-0.11.2-r1.ebuild | 12 ++++++------ dev-lang/mrustc/mrustc-9999.ebuild | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dev-lang/mrustc/mrustc-0.11.2-r1.ebuild b/dev-lang/mrustc/mrustc-0.11.2-r1.ebuild index d5aa99ea633d..d96a4cc2e441 100644 --- a/dev-lang/mrustc/mrustc-0.11.2-r1.ebuild +++ b/dev-lang/mrustc/mrustc-0.11.2-r1.ebuild @@ -50,17 +50,17 @@ QA_FLAGS_IGNORED=" usr/lib/rust/${P}/lib/rustlib/$(rust_abi)/lib/*.rlib " -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] && ! tc-is-gcc; then - die "mrustc needs to be built using GCC." - fi -} - src_configure() { : } src_compile() { + if ! tc-is-gcc ; then + # mrustc needs to be built using GCC + export CC=${CHOST}-gcc + export CXX=${CHOST}-g++ + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi export PARLEVEL=$(makeopts_jobs) export RUSTC_VERSION=${MRUSTC_RUST_VER} # Pretend that we're using upstream-supported Rust export MRUSTC_TARGET_VER=${RUSTC_VERSION%.*} diff --git a/dev-lang/mrustc/mrustc-9999.ebuild b/dev-lang/mrustc/mrustc-9999.ebuild index 8a3d460ca787..f8679de3c764 100644 --- a/dev-lang/mrustc/mrustc-9999.ebuild +++ b/dev-lang/mrustc/mrustc-9999.ebuild @@ -47,17 +47,17 @@ QA_FLAGS_IGNORED=" usr/lib/rust/${P}/lib/rustlib/$(rust_abi)/lib/*.rlib " -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] && ! tc-is-gcc; then - die "mrustc needs to be built using GCC." - fi -} - src_configure() { : } src_compile() { + if ! tc-is-gcc ; then + # mrustc needs to be built using GCC + export CC=${CHOST}-gcc + export CXX=${CHOST}-g++ + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi export PARLEVEL=$(makeopts_jobs) export RUSTC_VERSION=${MRUSTC_RUST_VER} # Pretend that we're using upstream-supported Rust export MRUSTC_TARGET_VER=${RUSTC_VERSION%.*}
