From: "Gary Guo" <gary@garyguo.net>
To: "Jan Polensky" <japo@linux.ibm.com>,
"Gary Guo" <gary@garyguo.net>,
"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>
Cc: "Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Sven Schnelle" <svens@linux.ibm.com>,
"Miguel Ojeda" <ojeda@kernel.org>, <linux-s390@vger.kernel.org>,
<rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH v1 1/1] s390/rust: Use -Cforce-frame-pointers instead of -Ctarget-feature=+backchain
Date: Thu, 03 Dec 2026 22:09:06 +0000 [thread overview]
Message-ID: <DNBFVLGLPA40.5ZXZNDBQWWUB@garyguo.net> (raw)
In-Reply-To: <axHOn0zBYPZVwam_@li-276bd24c-2dcc-11b2-a85c-945b6f05615c.ibm.com>
On Thu Dec 3, 2026 at 8:18 PM GMT, Jan Polensky wrote:
> Hi Miguel, Gary,
>
> thanks for the feedback.
>
> On Wed, Dec 02, 2026 at 05:05:23PM +0000, Gary Guo wrote:
>> Or switch on probe so that as long as `-Ctarget-feature=+backchain` is
>> accepted then still pass it.
>>
>> We can unconditionally enable -Cforce-frame-pointers.
>
> Right, older rustc releases (1.96 to 1.101 for s390) do not enable
> backchain through -Cforce-frame-pointers; that only came with
> rust-lang/rust#163315 (milestone 1.102.0). Passing only
> -Cforce-frame-pointers=y there would silently drop the backchain, so
> a plain switch is not an option.
>
> One way to handle both is to probe, so no version number is needed
> (and it also covers 1.102 nightlies from before the change landed):
>
> KBUILD_RUSTFLAGS += --target=s390x-unknown-none-softfloat -Zpacked-stack
> KBUILD_RUSTFLAGS += $(call rustc-option,-Ctarget-feature=+backchain,-Cforce-frame-pointers=y)
>
> I tested this with a 1.102.0-nightly: the probe is rejected and the
> stable flag is used; with a rustc that accepts +backchain, only that
> flag is used.
>
> The downside is that rustc < 1.102 keeps printing
>
> warning: unstable feature specified for `-Ctarget-feature`: `backchain`
>
> as it already did with the current code (see the discussion on the
> s390 enablement series). The alternative to avoid that for good is to
> raise the minimum rustc version for s390 to 1.102.0 in
> scripts/min-tool-version.sh and pass only -Cforce-frame-pointers=y.
> Since s390 Rust support is new, few users are affected, but it
> means no released rustc is usable until 1.102 is out.
>
> Do you have a preference between the probe (as above), a version-based
> switch with rustc-min-version, or just raising the minimum version?
I think keeping the backchain probe isn't a big deal even with warnings, but
incrementing minimum rustc version for s390 sounds reasonable too. Ultimately
it's up to the s390 folks to decide.
> I will add a Fixes: 3f70ebe63858 ("s390: Enable Rust support") in v2,
> as suggested by Sashiko, since it points to where the flag came from.
I don't think this is a fix (the old code is not buggy, just that new stable
compiler expects something different). A cc stable tag should suffice.
Best,
Gary
next prev parent reply other threads:[~2026-12-03 22:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 16:37 [PATCH v1 1/1] s390/rust: Use -Cforce-frame-pointers instead of -Ctarget-feature=+backchain Jan Polensky
2026-12-02 16:47 ` sashiko-bot
2026-12-02 16:48 ` Miguel Ojeda
2026-12-02 17:05 ` Gary Guo
2026-12-03 20:18 ` Jan Polensky
2026-12-03 22:09 ` Gary Guo [this message]
2026-12-04 11:05 ` Heiko Carstens
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=DNBFVLGLPA40.5ZXZNDBQWWUB@garyguo.net \
--to=gary@garyguo.net \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=japo@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=svens@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.