Linux s390 Architecture development
 help / color / mirror / Atom feed
* [PATCH v1 1/1] s390/rust: Use -Cforce-frame-pointers instead of -Ctarget-feature=+backchain
@ 2026-12-02 16:37 Jan Polensky
  2026-12-02 16:47 ` sashiko-bot
  2026-12-02 16:48 ` Miguel Ojeda
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Polensky @ 2026-12-02 16:37 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev
  Cc: Christian Borntraeger, Sven Schnelle, Miguel Ojeda, linux-s390,
	rust-for-linux

Newer rustc releases reject -Ctarget-feature=+backchain on s390x with

  error: target feature `backchain` cannot be enabled with
  `-Ctarget-feature`: use `-Cforce-frame-pointers` compiler flag instead

On s390x, -Cforce-frame-pointers now enables the "backchain" LLVM function
attribute instead of the generic "frame-pointer" attribute.

Switch the Rust flags to -Cforce-frame-pointers=y. The target stays
s390x-unknown-none-softfloat, which is required to combine backchain with
-Zpacked-stack.

Signed-off-by: Jan Polensky <japo@linux.ibm.com>
---
 arch/s390/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 8b712cd85fcd..3ec7e6d7a783 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -35,7 +35,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_NO_ARRAY_BOUNDS),-Wno-array-bounds)
 
-KBUILD_RUSTFLAGS += --target=s390x-unknown-none-softfloat -Zpacked-stack -Ctarget-feature=+backchain
+KBUILD_RUSTFLAGS += --target=s390x-unknown-none-softfloat -Zpacked-stack -Cforce-frame-pointers=y
 
 UTS_MACHINE	:= s390x
 STACK_SIZE	:= $(if $(CONFIG_KASAN),65536,$(if $(CONFIG_KMSAN),65536,16384))
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-12-02 17:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox