-
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 #102293 - ecnelises:aix.initial, r=davidtwco
Add powerpc64-ibm-aix as Tier-3 target This is part of the effort mentioned in rust-lang/compiler-team#553. A reference to these options are definitions from [clang](https://github.com/llvm/llvm-project/blob/ad6fe32032a6229e0c40510e9bed419a01c695b3/clang/lib/Basic/Targets/PPC.h#L414-L448) and [llvm](https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp). AIX has a system `ld` but [its options and behaviors](https://www.ibm.com/docs/en/aix/7.3?topic=l-ld-command) are different from GNU ld. Thanks to ``@bzEq`` for contributing the linking args.
- Loading branch information
Showing
5 changed files
with
65 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use crate::abi::Endian; | ||
use crate::spec::{crt_objects, cvs, Cc, CodeModel, LinkOutputKind, LinkerFlavor, TargetOptions}; | ||
|
||
pub fn opts() -> TargetOptions { | ||
TargetOptions { | ||
abi: "vec-extabi".into(), | ||
code_model: Some(CodeModel::Small), | ||
cpu: "pwr7".into(), | ||
os: "aix".into(), | ||
vendor: "ibm".into(), | ||
dynamic_linking: true, | ||
endian: Endian::Big, | ||
executables: true, | ||
archive_format: "aix_big".into(), | ||
families: cvs!["unix"], | ||
has_rpath: false, | ||
has_thread_local: true, | ||
crt_static_respected: true, | ||
linker_flavor: LinkerFlavor::Unix(Cc::No), | ||
linker: Some("ld".into()), | ||
eh_frame_header: false, | ||
is_like_aix: true, | ||
default_dwarf_version: 3, | ||
function_sections: true, | ||
pre_link_objects: crt_objects::new(&[ | ||
(LinkOutputKind::DynamicNoPicExe, &["/usr/lib/crt0_64.o", "/usr/lib/crti_64.o"]), | ||
(LinkOutputKind::DynamicPicExe, &["/usr/lib/crt0_64.o", "/usr/lib/crti_64.o"]), | ||
]), | ||
dll_suffix: ".a".into(), | ||
..Default::default() | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use crate::spec::{Cc, LinkerFlavor, Target}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::aix_base::opts(); | ||
base.max_atomic_width = Some(64); | ||
base.add_pre_link_args( | ||
LinkerFlavor::Unix(Cc::No), | ||
&[ | ||
"-b64".into(), | ||
"-bpT:0x100000000".into(), | ||
"-bpD:0x110000000".into(), | ||
"-bcdtors:all:0:s".into(), | ||
], | ||
); | ||
|
||
Target { | ||
llvm_target: "powerpc64-ibm-aix".into(), | ||
pointer_width: 64, | ||
data_layout: "E-m:a-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(), | ||
arch: "powerpc64".into(), | ||
options: base, | ||
} | ||
} |
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