diff --git a/configure b/configure index 1a5513ce061..3b0abeb8b2e 100755 --- a/configure +++ b/configure @@ -9148,6 +9148,19 @@ $as_echo "$as_me: WARNING: --enable-host-shared required to build $language" >&2 ;; esac + # Pre-conditions to consider whether cargo being supported. + if test x"$have_cargo" = xyes \ + && test x"$build" != x"$host"; then + # Until + # "'cargo' should build for the host system" is resolved: + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: use of cargo not yet supported here in Canadian cross configurations" >&5 +$as_echo "$as_me: WARNING: use of cargo not yet supported here in Canadian cross configurations" >&2;} + 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) diff --git a/configure.ac b/configure.ac index a0191e5c1e0..042681c27be 100644 --- a/configure.ac +++ b/configure.ac @@ -2306,6 +2306,18 @@ directories, to avoid imposing the performance cost of ;; esac + # Pre-conditions to consider whether cargo being supported. + if test x"$have_cargo" = xyes \ + && test x"$build" != x"$host"; then + # Until + # "'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)