lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQU8m=QrEXS2h_0Q8UNqqTmkud18zc8RM6LVPsKYM5z3w@mail.gmail.com>
Date: Wed, 9 Oct 2024 03:44:50 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Alice Ryhl <aliceryhl@...gle.com>, Nathan Chancellor <nathan@...nel.org>, 
	Nicolas Schier <nicolas@...sle.eu>, Miguel Ojeda <ojeda@...nel.org>, 
	Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, 
	Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Trevor Gross <tmgross@...ch.edu>, linux-kbuild@...r.kernel.org, 
	linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] Kbuild: add RUSTC_BOOTSTRAP to rustc-option

On Tue, Oct 8, 2024 at 11:25 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> On Tue, Oct 8, 2024 at 3:49 PM Alice Ryhl <aliceryhl@...gle.com> wrote:
> >
> > When using unstable features with the Rust compiler, you must either use
> > a nightly compiler release or set the RUSTC_BOOTSTRAP environment
> > variable. Otherwise, the compiler will emit a compiler error. This
> > environment variable is missing when rustc-option is executed, so add
> > the environment variable.
>
> Yeah, `$(shell ...` does not pass the environment, so we need it.


Really?

$(shell ...) inherits env variables in my understanding.





> > This change is necessary to avoid two kinds of problems:
> >
> > 1. When using rustc-option to test whether a -Z flag is available, the
> >    check will always fail, even if the flag is available.
> > 2. If KBUILD_RUSTFLAGS happens to contain any -Z flags from the
> >    environment, even if unrelated to the flag being tested, then all
> >    invocations of rustc-option everywhere will fail.
> >
> > I was not actually able to trigger the second kind of problem with the
> > makefiles that exist today, but it seems like it could easily start
> > being a problem due to complicated interactions between changes. It is
> > better to fix this now so it doesn't surprise us later.
> >
> > I added the flag under try-run as this seemed like the easiest way to
> > make sure that the fix applies to all variations of rustc-option,
> > including new ones added in the future.
> >
> > Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
>
> I think we need an `export` there.
>
> I am also rechecking this, and I didn't get a reply from:
>
>     https://lore.kernel.org/rust-for-linux/CANiq72mv5E0PvZRW5eAEvqvqj74PH01hcRhLWTouB4z32jTeSA@mail.gmail.com/
>
> And I forgot about it, which is my mistake too -- I still think we
> need it (and we should not use `-o` either together with it, I think).
>
> I can take a look...


No.

You need to understand who expands it.

TMPOUT=$(TMPOUT);

was needed because you used

-out-dir="$$TMPOUT"

It should be -out-dir=$(TMPOUT)


Such pointless code is unneeded.




--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ