# these libraries are used by various programs built for the host environment
#f
-host_libs="gettext libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libiconv libctf libsframe"
+host_libs="gettext libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libiconv libctf libsframe libgrust "
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
target-libada \
target-libgm2 \
target-libgo \
+ target-libgrust \
target-libphobos \
target-zlib"
# Check for target supported by gold.
case "${target}" in
i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
- | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*)
+ | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*)
configdirs="$configdirs gold"
if test x${ENABLE_GOLD} = xdefault; then
default_ld=gold
ACX_PROG_GNAT
ACX_PROG_GDC
+ACX_PROG_CARGO
ACX_PROG_CMP_IGNORE_INITIAL
AC_ARG_ENABLE([bootstrap],
;;
esac
+ # Pre-conditions to consider whether cargo being supported.
+ if test x"$have_cargo" = xyes \
+ && test x"$build" != x"$host"; then
+ # Until <https://github.com/Rust-GCC/gccrs/issues/2898>
+ # "'cargo' should build for the host system" is resolved:
+ AC_MSG_WARN([use of cargo not yet supported here in Canadian cross configurations])
+ have_cargo=no
+ else
+ # Assume that cargo-produced object files are compatible with what
+ # we're going to build here.
+ :
+ fi
+ # Disable Rust if cargo is unavailable.
+ case ${add_this_lang}:${language}:${have_cargo} in
+ yes:rust:no)
+ # Specifically requested language; tell them.
+ AC_MSG_ERROR([cargo is required to build $language])
+ ;;
+ all:rust:no)
+ AC_MSG_WARN([cargo is required to build $language])
+ add_this_lang=unsupported
+ ;;
+ *:rust:no)
+ # Silently disable.
+ add_this_lang=unsupported
+ ;;
+ esac
+
+
# Disable a language that is unsupported by the target.
case "${add_this_lang}: $unsupported_languages " in
no:*) ;;
;;
esac
+case ,${enable_languages}, in
+ *,rust,*)
+ case " ${noconfigdirs} " in
+ *\ target-libstdc++-v3\ *)
+ # Disable target libgrust if we're not building target libstdc++.
+ noconfigdirs="$noconfigdirs target-libgrust"
+ ;;
+ esac
+ ;;
+esac
+
# If gcc/ is not in the source tree then we'll not be building a
# target compiler, assume in that case we don't want to build any
# target libraries or tools.