[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72mCuqCE3fA2jgaaA4fyj1kNzYm61C2600vAf0CT5=JP0A@mail.gmail.com>
Date: Tue, 8 Oct 2024 22:05:46 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Masahiro Yamada <masahiroy@...nel.org>
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 8:45 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> Really?
>
> $(shell ...) inherits env variables in my understanding.
I mean the Make-exported variables (not the external environment),
i.e. `RUSTC_BOOTSTRAP=1` that we export in the main `Makefile`. Those
are not exported into the `shell` function.
However, it turns out this changes in GNU Make 4.4 in commit
98da874c4303 ("[SV 10593] Export variables to $(shell ...) commands"):
* WARNING: Backward-incompatibility!
Previously makefile variables marked as export were not exported
to commands
started by the $(shell ...) function. Now, all exported variables are
exported to $(shell ...). If this leads to recursion during
expansion, then
for backward-compatibility the value from the original
environment is used.
To detect this change search for 'shell-export' in the .FEATURES variable.
And indeed:
export A := .PHONY: a
$(shell echo $$A)
a: ; @echo exported
Gives:
$ make-4.3
make: 'a' is up to date.
$ make-4.4.1
exported
Cheers,
Miguel
Powered by blists - more mailing lists