Projects
openEuler:24.03:SP1:Everything
rust
_service:tar_scm:0001-add-support-for-ppc64le.p...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0001-add-support-for-ppc64le.patch of Package rust
From 85c7f9262e9d4fbfdaa5d7bc22a85eb5300fcca0 Mon Sep 17 00:00:00 2001 From: jcf <chunfu.jian@shingroup.cn> 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
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2