Skip to content

Commit cb88ae4

Browse files
committed
expose abi information on ppc64 targets
1 parent 9c1180b commit cb88ae4

9 files changed

+9
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub(crate) fn target() -> Target {
1010
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
1111
base.max_atomic_width = Some(64);
1212
base.stack_probes = StackProbeType::Inline;
13+
base.abi = "elfv2".into();
1314
base.llvm_abiname = "elfv2".into();
1415

1516
Target {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub(crate) fn target() -> Target {
1010
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
1111
base.max_atomic_width = Some(64);
1212
base.stack_probes = StackProbeType::Inline;
13+
base.abi = "elfv1".into();
1314
base.llvm_abiname = "elfv1".into();
1415

1516
Target {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pub(crate) fn target() -> Target {
1212
base.stack_probes = StackProbeType::Inline;
1313
// FIXME(compiler-team#422): musl targets should be dynamically linked by default.
1414
base.crt_static_default = true;
15+
base.abi = "elfv2".into();
1516
base.llvm_abiname = "elfv2".into();
1617

1718
Target {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub(crate) fn target() -> Target {
1010
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
1111
base.max_atomic_width = Some(64);
1212
base.stack_probes = StackProbeType::Inline;
13+
base.abi = "elfv2".into();
1314
base.llvm_abiname = "elfv2".into();
1415

1516
Target {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub(crate) fn target() -> Target {
1010
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
1111
base.max_atomic_width = Some(64);
1212
base.stack_probes = StackProbeType::Inline;
13+
base.abi = "elfv1".into();
1314
base.llvm_abiname = "elfv1".into();
1415

1516
Target {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub(crate) fn target() -> Target {
88
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
99
base.max_atomic_width = Some(64);
1010
base.stack_probes = StackProbeType::Inline;
11+
base.abi = "elfv2".into();
1112
base.llvm_abiname = "elfv2".into();
1213

1314
Target {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub(crate) fn target() -> Target {
88
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
99
base.max_atomic_width = Some(64);
1010
base.stack_probes = StackProbeType::Inline;
11+
base.abi = "elfv2".into();
1112
base.llvm_abiname = "elfv2".into();
1213

1314
Target {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub(crate) fn target() -> Target {
1010
base.stack_probes = StackProbeType::Inline;
1111
// FIXME(compiler-team#422): musl targets should be dynamically linked by default.
1212
base.crt_static_default = true;
13+
base.abi = "elfv2".into();
1314
base.llvm_abiname = "elfv2".into();
1415

1516
Target {

tests/ui/check-cfg/well-known-values.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
129129
LL | target_abi = "_UNEXPECTED_VALUE",
130130
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131131
|
132-
= note: expected values for `target_abi` are: ``, `abi64`, `abiv2`, `abiv2hf`, `eabi`, `eabihf`, `fortanix`, `ilp32`, `ilp32e`, `llvm`, `macabi`, `sim`, `softfloat`, `spe`, `uwp`, `vec-extabi`, and `x32`
132+
= note: expected values for `target_abi` are: ``, `abi64`, `abiv2`, `abiv2hf`, `eabi`, `eabihf`, `elfv1`, `elfv2`, `fortanix`, `ilp32`, `ilp32e`, `llvm`, `macabi`, `sim`, `softfloat`, `spe`, `uwp`, `vec-extabi`, and `x32`
133133
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
134134

135135
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`

0 commit comments

Comments
 (0)