rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Nicolas Schier" <nicolas@fjasle.eu>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Andreas Hindborg" <a.hindborg@samsung.com>,
	linux-kbuild@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@lists.linux.dev,
	"Raphael Nestler" <raphael.nestler@gmail.com>,
	"Andrea Righi" <andrea.righi@canonical.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] kbuild: rust: avoid creating temporary files
Date: Sat, 22 Jul 2023 17:51:46 +0200	[thread overview]
Message-ID: <CANiq72kD2wxXy2ri8sBhVJ4y-JJiq+kYt_MRZwuwB9uGkX-_jQ@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNASqumGb0xvSa8n4Heasz9BKxgk4mvzNXsfFhZE1G+Bxbg@mail.gmail.com>

On Thu, Jul 20, 2023 at 8:35 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Maybe, the following was a breakage.
>
> commit 295d8398c67e314d99bb070f38883f83fe94a97a
> Author: Masahiro Yamada <masahiroy@kernel.org>
> Date:   Sat Jan 7 18:18:15 2023 +0900
>
>     kbuild: specify output names separately for each emission type from rustc
>
> Before that, rust_common_cmd had --out-dir.

That's right, good catch!

> BTW, do we also need to fix scripts/Makefile.host
> in case the external module Makefile creates host programs?

Indeed, we need it too. [1] would fix it (tested it with a trivial
out-of-tree Rust hostprog).

Do you want me to send it separately? i.e. to avoid losing the
`Tested-by`s etc. that we already got for this one, which is the
important one since that actually has users.

The hostprogs fix is not really critical for stable, since it is
unlikely there are users at all (we just got the first in-tree real
user in the Rust+KUnit integration coming into 6.6), but I guess it
does not hurt for the same reason.

Thanks!

Cheers,
Miguel

[1]

diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index 7aea9005e497..54adf2e2ec51 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -86,7 +86,7 @@ hostc_flags    = -Wp,-MMD,$(depfile) \
 hostcxx_flags  = -Wp,-MMD,$(depfile) \
                  $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
                  $(HOSTCXXFLAGS_$(target-stem).o)
-hostrust_flags = --emit=dep-info=$(depfile) \
+hostrust_flags = --out-dir $(dir $@) --emit=dep-info=$(depfile) \
                  $(KBUILD_HOSTRUSTFLAGS) $(HOST_EXTRARUSTFLAGS) \
                  $(HOSTRUSTFLAGS_$(target-stem))

  reply	other threads:[~2023-07-22 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18  5:52 [PATCH] kbuild: rust: avoid creating temporary files Miguel Ojeda
2023-07-18 16:43 ` Nathan Chancellor
2023-07-19 17:44 ` Martin Rodriguez Reboredo
2023-07-20 17:17 ` Masahiro Yamada
2023-07-20 17:29   ` Miguel Ojeda
2023-07-20 18:34     ` Masahiro Yamada
2023-07-22 15:51       ` Miguel Ojeda [this message]
2023-07-23  5:05         ` Masahiro Yamada
2023-07-23 13:35           ` Masahiro Yamada
2023-07-23 14:27           ` Miguel Ojeda

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=CANiq72kD2wxXy2ri8sBhVJ4y-JJiq+kYt_MRZwuwB9uGkX-_jQ@mail.gmail.com \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=a.hindborg@samsung.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=andrea.righi@canonical.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    --cc=ojeda@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=raphael.nestler@gmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wedsonaf@gmail.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 NNTP newsgroup(s).