x32: set panic strategy to aborting
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 13 Oct 2025 12:35:56 +0000 (14:35 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Fri, 26 Dec 2025 19:54:51 +0000 (20:54 +0100)
x32 lacks libunwind support

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Gbp-Pq: Topic behaviour
Gbp-Pq: Name x32-set-panic-strategy-to-aborting.patch

compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnux32.rs

index c5d556e5cc6507631965049af6a8462a1a893b44..e24fa7fc1125e77fe137a3a8d8124ea65013fe3f 100644 (file)
@@ -1,4 +1,4 @@
-use crate::spec::{Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetMetadata, base};
+use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, StackProbeType, Target, TargetMetadata, base};
 
 pub(crate) fn target() -> Target {
     let mut base = base::linux_gnu::opts();
@@ -11,6 +11,7 @@ pub(crate) fn target() -> Target {
     // BUG(GabrielMajeri): disabling the PLT on x86_64 Linux with x32 ABI
     // breaks code gen. See LLVM bug 36743
     base.plt_by_default = true;
+    base.panic_strategy = PanicStrategy::Abort;
 
     Target {
         llvm_target: "x86_64-unknown-linux-gnux32".into(),