Re: [PATCH 4/4] s390: enable Rust support
From: Alice Ryhl
Date: Mon May 18 2026 - 11:35:33 EST
On Mon, May 18, 2026 at 5:19 PM Jan Polensky <japo@xxxxxxxxxxxxx> wrote:
>
> On Tue, May 12, 2026 at 02:10:52PM +0200, Miguel Ojeda wrote:
> > On Tue, May 12, 2026 at 1:00 PM Jan Polensky <japo@xxxxxxxxxxxxx> wrote:
> > >
> > > Signed-off-by: Jan Polensky <japo@xxxxxxxxxxxxx>
> >
> > Closes: https://github.com/Rust-for-Linux/linux/issues/106
> >
> > I am happy to see IBM getting involved and being able to close a 5
> > year issue! :)
> :)
> >
> > I backlinked there this thread.
> >
> > > +KBUILD_RUSTFLAGS += --target=s390x-unknown-none-softfloat -Zpacked-stack -Ctarget-feature=+backchain
> >
> > I added `-Zpacked-stack` and a bunch of related links to:
> >
> > https://github.com/Rust-for-Linux/linux/issues/2
> >
> > Is there a tracking issue for it? I linked
> > https://github.com/rust-lang/rust/issues/150259 for the backchain
> > feature.
> >
> > > + if [ "$SRCARCH" = "s390" ]; then
> > > + echo 1.97.0-nightly
> >
> > `-Zpacked-stack` landed for 1.96. Is there something queued for 1.97?
> > If not, does the beta work?
> >
> > Either way, I would prefer waiting until we know the actual version
> > number, i.e. without `-nightly`. It is just a few weeks away anyway.
> >
> > Thanks!
> >
> > Cheers,
> > Miguel
>
> Hi Miguel,
>
> thanks for the review.
>
> -Zpacked-stack: I’m not aware of a dedicated rust-lang/rust tracking
> issue for this flag. The implementation landed via rust-lang/rust PR
> 152432, but it doesn’t appear to reference a tracking issue.
>
> backchain: ack, the s390x target-feature tracking issue you linked is the
> right umbrella reference.
>
> minimum toolchain version / beta: as long as we pass -Zpacked-stack in
> KBUILD_RUSTFLAGS, we need a nightly compiler; beta/stable won’t accept -Z
> flags. In v2 I’ll drop the 1.97.0-nightly guess and set the minimum to
> 1.96.0-nightly (the first release line that includes -Zpacked-stack).
> We’ll keep the “-nightly” suffix while this remains a -Z flag. If it gets
> stabilized and nothing blocks, the earliest stable release that could
> plausibly carry it would be 1.98.
You should not add a nightly suffix for this reason. If it's available
in nightly since 1.96.0, then you just write 1.96.0 here. Linux uses
RUSTC_BOOTSTRAP to allow use of such flags on stable compiler builds.
Alice