diff --git a/package/rustc/Config.in.host b/package/rustc/Config.in.host index 13b866345b..d647ae69b2 100644 --- a/package/rustc/Config.in.host +++ b/package/rustc/Config.in.host @@ -99,11 +99,15 @@ config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_PLATFORMS default y if BR2_sparc64 && BR2_TOOLCHAIN_USES_GLIBC # All target rust packages should depend on this option +# Note: With musl based toolchain, we need a C++ cross compiler to +# build host-rust some target libraries (libunwind) from llvm source +# code bundled in rust sources. config BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS bool default y if BR2_PACKAGE_HOST_RUSTC_TARGET_TIER1_PLATFORMS default y if BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_HOST_TOOLS_PLATFORMS default y if BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_PLATFORMS + depends on BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_MUSL depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS config BR2_PACKAGE_HOST_RUSTC_ARCH