-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #101025 - semarie:openbsd-archs, r=petrochenkov
Add tier-3 support for powerpc64 and riscv64 openbsd # powerpc64 - MCP for [powerpc64-unknown-openbsd tier-3 support](rust-lang/compiler-team#551) - only need to add spec definition in rustc_target # riscv64 - MCP for [riscv64-unknown-openbsd tier-3 support](rust-lang/compiler-team#552) - add spec definition in rustc_target - follow freebsd about avoiding linking with `libatomic`
- Loading branch information
Showing
7 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
compiler/rustc_target/src/spec/powerpc64_unknown_openbsd.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use crate::abi::Endian; | ||
use crate::spec::{LinkerFlavor, Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::openbsd_base::opts(); | ||
base.cpu = "ppc64".into(); | ||
base.add_pre_link_args(LinkerFlavor::Gcc, &["-m64"]); | ||
base.max_atomic_width = Some(64); | ||
|
||
Target { | ||
llvm_target: "powerpc64-unknown-openbsd".into(), | ||
pointer_width: 64, | ||
data_layout: "E-m:e-i64:64-n32:64".into(), | ||
arch: "powerpc64".into(), | ||
options: TargetOptions { endian: Endian::Big, mcount: "_mcount".into(), ..base }, | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
compiler/rustc_target/src/spec/riscv64gc_unknown_openbsd.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use crate::spec::{CodeModel, Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
Target { | ||
llvm_target: "riscv64-unknown-openbsd".into(), | ||
pointer_width: 64, | ||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(), | ||
arch: "riscv64".into(), | ||
options: TargetOptions { | ||
code_model: Some(CodeModel::Medium), | ||
cpu: "generic-rv64".into(), | ||
features: "+m,+a,+f,+d,+c".into(), | ||
llvm_abiname: "lp64d".into(), | ||
max_atomic_width: Some(64), | ||
..super::openbsd_base::opts() | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters