代码拉取完成,页面将自动刷新
同步操作将从 jchzhou/rust3 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 85c7f9262e9d4fbfdaa5d7bc22a85eb5300fcca0 Mon Sep 17 00:00:00 2001
From: jcf <[email protected]>
Date: Wed, 12 Jun 2024 09:14:32 +0000
Subject: [PATCH] add support for ppc64le
---
compiler/rustc_target/src/spec/mod.rs | 2 ++
.../spec/targets/ppc64le_unknown_freebsd.rs | 23 +++++++++++++++++++
.../spec/targets/ppc64le_unknown_linux_gnu.rs | 23 +++++++++++++++++++
.../targets/ppc64le_unknown_linux_musl.rs | 23 +++++++++++++++++++
src/bootstrap/configure.py | 2 ++
vendor/openssl-src-111.28.1+1.1.1w/src/lib.rs | 3 +++
vendor/target-lexicon-0.12.14/src/targets.rs | 3 +++
7 files changed, 79 insertions(+)
create mode 100644 compiler/rustc_target/src/spec/targets/ppc64le_unknown_freebsd.rs
create mode 100644 compiler/rustc_target/src/spec/targets/ppc64le_unknown_linux_gnu.rs
create mode 100644 compiler/rustc_target/src/spec/targets/ppc64le_unknown_linux_musl.rs
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 291a761..e6e80a1 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -1513,6 +1513,8 @@ supported_targets! {
("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl),
("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
("powerpc64le-unknown-linux-musl", powerpc64le_unknown_linux_musl),
+ ("ppc64le-unknown-linux-gnu", ppc64le_unknown_linux_gnu),
+ ("ppc64le-unknown-linux-musl", ppc64le_unknown_linux_musl),
("s390x-unknown-linux-gnu", s390x_unknown_linux_gnu),
("s390x-unknown-linux-musl", s390x_unknown_linux_musl),
("sparc-unknown-linux-gnu", sparc_unknown_linux_gnu),
diff --git a/compiler/rustc_target/src/spec/targets/ppc64le_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/ppc64le_unknown_freebsd.rs
new file mode 100644
index 0000000..615bb67
--- /dev/null
+++ b/compiler/rustc_target/src/spec/targets/ppc64le_unknown_freebsd.rs
@@ -0,0 +1,23 @@
+use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions};
+
+pub fn target() -> Target {
+ let mut base = base::freebsd::opts();
+ base.cpu = "ppc64le".into();
+ base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
+ base.max_atomic_width = Some(64);
+ base.stack_probes = StackProbeType::Inline;
+
+ Target {
+ llvm_target: "ppc64le-unknown-freebsd".into(),
+ metadata: crate::spec::TargetMetadata {
+ description: None,
+ tier: None,
+ host_tools: None,
+ std: None,
+ },
+ pointer_width: 64,
+ data_layout: "e-m:e-Fn32-i64:64-n32:64".into(),
+ arch: "powerpc64".into(),
+ options: TargetOptions { mcount: "_mcount".into(), ..base },
+ }
+}
diff --git a/compiler/rustc_target/src/spec/targets/ppc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/ppc64le_unknown_linux_gnu.rs
new file mode 100644
index 0000000..5ff45e2
--- /dev/null
+++ b/compiler/rustc_target/src/spec/targets/ppc64le_unknown_linux_gnu.rs
@@ -0,0 +1,23 @@
+use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions};
+
+pub fn target() -> Target {
+ let mut base = base::linux_gnu::opts();
+ base.cpu = "ppc64le".into();
+ base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
+ base.max_atomic_width = Some(64);
+ base.stack_probes = StackProbeType::Inline;
+
+ Target {
+ llvm_target: "ppc64le-unknown-linux-gnu".into(),
+ metadata: crate::spec::TargetMetadata {
+ description: None,
+ tier: None,
+ host_tools: None,
+ std: None,
+ },
+ pointer_width: 64,
+ data_layout: "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
+ arch: "powerpc64".into(),
+ options: TargetOptions { mcount: "_mcount".into(), ..base },
+ }
+}
diff --git a/compiler/rustc_target/src/spec/targets/ppc64le_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/ppc64le_unknown_linux_musl.rs
new file mode 100644
index 0000000..2b612e7
--- /dev/null
+++ b/compiler/rustc_target/src/spec/targets/ppc64le_unknown_linux_musl.rs
@@ -0,0 +1,23 @@
+use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOptions};
+
+pub fn target() -> Target {
+ let mut base = base::linux_musl::opts();
+ base.cpu = "ppc64le".into();
+ base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
+ base.max_atomic_width = Some(64);
+ base.stack_probes = StackProbeType::Inline;
+
+ Target {
+ llvm_target: "ppc64le-unknown-linux-musl".into(),
+ metadata: crate::spec::TargetMetadata {
+ description: None,
+ tier: None,
+ host_tools: None,
+ std: None,
+ },
+ pointer_width: 64,
+ data_layout: "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
+ arch: "powerpc64".into(),
+ options: TargetOptions { mcount: "_mcount".into(), ..base },
+ }
+}
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index 768aac9..155f21e 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -127,6 +127,8 @@ v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root",
"mips64-unknown-linux-muslabi64 install directory")
v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root",
"mips64el-unknown-linux-muslabi64 install directory")
+v("musl-root-ppc64le", "target.ppc64le-unknown-linux-musl.musl-root",
+ "ppc64le-unknown-linux-musl install directory")
v("musl-root-riscv32gc", "target.riscv32gc-unknown-linux-musl.musl-root",
"riscv32gc-unknown-linux-musl install directory")
v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root",
diff --git a/vendor/openssl-src-111.28.2+1.1.1w/src/lib.rs b/vendor/openssl-src-111.28.2+1.1.1w/src/lib.rs
index 1264742..14427a7 100644
--- a/vendor/openssl-src-111.28.2+1.1.1w/src/lib.rs
+++ b/vendor/openssl-src-111.28.2+1.1.1w/src/lib.rs
@@ -282,6 +282,9 @@ impl Build {
"powerpc64le-unknown-freebsd" => "BSD-generic64",
"powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
"powerpc64le-unknown-linux-musl" => "linux-ppc64le",
+ "ppc64le-unknown-freebsd" => "BSD-generic64",
+ "ppc64le-unknown-linux-gnu" => "linux-ppc64le",
+ "ppc64le-unknown-linux-musl" => "linux-ppc64le",
"riscv64gc-unknown-linux-gnu" => "linux-generic64",
"s390x-unknown-linux-gnu" => "linux64-s390x",
"s390x-unknown-linux-musl" => "linux64-s390x",
diff --git a/vendor/target-lexicon-0.12.14/src/targets.rs b/vendor/target-lexicon-0.12.14/src/targets.rs
index f764b34..e150f84 100644
--- a/vendor/target-lexicon-0.12.14/src/targets.rs
+++ b/vendor/target-lexicon-0.12.14/src/targets.rs
@@ -1639,6 +1639,9 @@ mod tests {
"powerpc64le-unknown-freebsd",
"powerpc64le-unknown-linux-gnu",
"powerpc64le-unknown-linux-musl",
+ "ppc64le-unknown-freebsd",
+ "ppc64le-unknown-linux-gnu",
+ "ppc64le-unknown-linux-musl",
"powerpc64-ibm-aix",
"powerpc64-unknown-freebsd",
"powerpc64-unknown-linux-gnu",
--
2.44.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。