public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@baylibre.com>
To: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>,
	gcc-patches@gcc.gnu.org, gcc-rust@gcc.gnu.org
Cc: Arthur Cohen <arthur.cohen@embecosm.com>
Subject: build: Use of cargo not yet supported here in Canadian cross configurations (was: [PATCH] build: Check for cargo when building rust language)
Date: Mon, 15 Apr 2024 14:44:35 +0200	[thread overview]
Message-ID: <87wmoylrrg.fsf@euler.schwinge.ddns.net> (raw)
In-Reply-To: <87edb6ev31.fsf@euler.schwinge.ddns.net>

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

Hi!

On 2024-04-15T13:14:42+0200, I wrote:
> On 2024-04-08T18:33:38+0200, pierre-emmanuel.patry@embecosm.com wrote:
>> The rust frontend requires cargo to build some of it's components,
>
> In GCC upstream still: 's%requires%is going to require'.  ;-)
>
>> it's presence was not checked during configuration.
>
> After confirming the desired semantics/diagnostics, I've now pushed this
> to trunk branch in commit 3e1e73fc99584440e5967577f2049573eeaf4596
> "build: Check for cargo when building rust language".

On top of that, OK to push the attached
"build: Use of cargo not yet supported here in Canadian cross configurations"?


Grüße
 Thomas



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-build-Use-of-cargo-not-yet-supported-here-in-Canadia.patch --]
[-- Type: text/x-diff, Size: 2718 bytes --]

From eb38990b4147951dd21f19def43072368f782af5 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tschwinge@baylibre.com>
Date: Mon, 15 Apr 2024 14:27:45 +0200
Subject: [PATCH] build: Use of cargo not yet supported here in Canadian cross
 configurations

..., until <https://github.com/Rust-GCC/gccrs/issues/2898>
"'cargo' should build for the host system" is resolved.

Follow-up to commit 3e1e73fc99584440e5967577f2049573eeaf4596
"build: Check for cargo when building rust language".

	* configure.ac (have_cargo): Force to "no" in Canadian cross
	configurations
	* configure: Regenerate.
---
 configure    | 13 +++++++++++++
 configure.ac | 12 ++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/configure b/configure
index e254aa132b5..e59a870b2bd 100755
--- a/configure
+++ b/configure
@@ -9179,6 +9179,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 <https://github.com/Rust-GCC/gccrs/issues/2898>
+          # "'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 87205d0ac1f..4ab54431475 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 <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)
-- 
2.34.1


  parent reply	other threads:[~2024-04-15 12:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08 16:33 [PATCH] build: Check for cargo when building rust language pierre-emmanuel.patry
2024-04-09  7:42 ` Richard Biener
2024-04-09  7:47 ` John Paul Adrian Glaubitz
2024-04-09  8:00   ` Jakub Jelinek
2024-04-09  8:29     ` John Paul Adrian Glaubitz
2024-04-09 10:40   ` Arthur Cohen
2024-04-09  8:55     ` Iain Sandoe
2024-04-09 12:01       ` Arthur Cohen
2024-04-09 10:09         ` Iain Sandoe
2024-04-09 13:53           ` Arthur Cohen
2024-04-09 14:12 ` Andrew Pinski
2024-04-09 14:25   ` Arthur Cohen
2024-04-15 11:14 ` Thomas Schwinge
2024-04-15 11:50   ` build: Don't check for host-prefixed 'cargo' program (was: [PATCH] build: Check for cargo when building rust language) Thomas Schwinge
2024-04-15 12:18     ` build: Don't check for host-prefixed 'cargo' program Pierre-Emmanuel Patry
2024-04-15 12:44   ` Thomas Schwinge [this message]
2024-04-15 16:36     ` build: Use of cargo not yet supported here in Canadian cross configurations Pierre-Emmanuel Patry
2024-04-16  8:55     ` Arthur Cohen
2024-04-16 20:34 ` [PATCH] build: Check for cargo when building rust language Andrew Pinski
2024-04-17  8:13   ` Rainer Orth
2024-04-17 14:54     ` Arthur Cohen
2024-04-23  8:52       ` Rainer Orth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmoylrrg.fsf@euler.schwinge.ddns.net \
    --to=tschwinge@baylibre.com \
    --cc=arthur.cohen@embecosm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc-rust@gcc.gnu.org \
    --cc=pierre-emmanuel.patry@embecosm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).