From 59a3ad3e13a87e1b8ab9f4481faf764484509c27 Mon Sep 17 00:00:00 2001 From: Adam Greig Date: Wed, 31 Dec 2025 05:53:50 +0000 Subject: [PATCH] Enable thumb interworking on ARMv7A/R and ARMv8R bare-metal targets --- compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs | 1 + compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs | 1 + compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs | 1 + compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs | 1 + compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs | 1 + compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs | 1 + compiler/rustc_target/src/spec/targets/armv8r_none_eabihf.rs | 1 + 7 files changed, 7 insertions(+) diff --git a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs index 849a0f4c9a68..7a62464aea4b 100644 --- a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs @@ -31,6 +31,7 @@ pub(crate) fn target() -> Target { emit_debug_gdb_scripts: false, // GCC defaults to 8 for arm-none here. c_enum_min_bits: Some(8), + has_thumb_interworking: true, ..Default::default() }, } diff --git a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs index 0cf3880cadc9..33147c5f1b09 100644 --- a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs @@ -32,6 +32,7 @@ pub(crate) fn target() -> Target { emit_debug_gdb_scripts: false, // GCC defaults to 8 for arm-none here. c_enum_min_bits: Some(8), + has_thumb_interworking: true, ..Default::default() }, } diff --git a/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs index 13a95a113b13..6b7707a47390 100644 --- a/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs @@ -32,6 +32,7 @@ pub(crate) fn target() -> Target { panic_strategy: PanicStrategy::Abort, emit_debug_gdb_scripts: false, c_enum_min_bits: Some(8), + has_thumb_interworking: true, ..Default::default() }; Target { diff --git a/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs index 28efdbe2291f..993390543b96 100644 --- a/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs @@ -24,6 +24,7 @@ pub(crate) fn target() -> Target { emit_debug_gdb_scripts: false, // GCC defaults to 8 for arm-none here. c_enum_min_bits: Some(8), + has_thumb_interworking: true, ..Default::default() }; Target { diff --git a/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs index b490b716f4b0..551cbf4a589f 100644 --- a/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs @@ -29,6 +29,7 @@ pub(crate) fn target() -> Target { emit_debug_gdb_scripts: false, // GCC defaults to 8 for arm-none here. c_enum_min_bits: Some(8), + has_thumb_interworking: true, ..Default::default() }, } diff --git a/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs index 7a3eb3b811a6..97c911ec8090 100644 --- a/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs @@ -30,6 +30,7 @@ pub(crate) fn target() -> Target { emit_debug_gdb_scripts: false, // GCC defaults to 8 for arm-none here. c_enum_min_bits: Some(8), + has_thumb_interworking: true, ..Default::default() }, } diff --git a/compiler/rustc_target/src/spec/targets/armv8r_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv8r_none_eabihf.rs index 423bf260d89c..e36240b9c223 100644 --- a/compiler/rustc_target/src/spec/targets/armv8r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv8r_none_eabihf.rs @@ -39,6 +39,7 @@ pub(crate) fn target() -> Target { emit_debug_gdb_scripts: false, // GCC defaults to 8 for arm-none here. c_enum_min_bits: Some(8), + has_thumb_interworking: true, ..Default::default() }, }