compiler: target: Add squiid target
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
7d4df2d30e
commit
31f1b59264
6 changed files with 42 additions and 4 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -27,8 +27,8 @@
|
||||||
url = https://github.com/rust-lang/edition-guide.git
|
url = https://github.com/rust-lang/edition-guide.git
|
||||||
[submodule "src/llvm-project"]
|
[submodule "src/llvm-project"]
|
||||||
path = src/llvm-project
|
path = src/llvm-project
|
||||||
url = https://github.com/rust-lang/llvm-project.git
|
url = git@github.com:squiid-os/llvm-project.git
|
||||||
branch = rustc/15.0-2022-12-07
|
branch = target/squiid/rustc/15.0-2022-12-07
|
||||||
[submodule "src/doc/embedded-book"]
|
[submodule "src/doc/embedded-book"]
|
||||||
path = src/doc/embedded-book
|
path = src/doc/embedded-book
|
||||||
url = https://github.com/rust-embedded/book.git
|
url = https://github.com/rust-embedded/book.git
|
||||||
|
|
|
@ -2337,7 +2337,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.138"
|
version = "0.2.137"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|
|
@ -79,6 +79,7 @@ mod openbsd_base;
|
||||||
mod redox_base;
|
mod redox_base;
|
||||||
mod solaris_base;
|
mod solaris_base;
|
||||||
mod solid_base;
|
mod solid_base;
|
||||||
|
mod squiid_base;
|
||||||
mod thumb_base;
|
mod thumb_base;
|
||||||
mod uefi_msvc_base;
|
mod uefi_msvc_base;
|
||||||
mod vxworks_base;
|
mod vxworks_base;
|
||||||
|
@ -1256,6 +1257,8 @@ supported_targets! {
|
||||||
|
|
||||||
("aarch64-unknown-nto-qnx710", aarch64_unknown_nto_qnx_710),
|
("aarch64-unknown-nto-qnx710", aarch64_unknown_nto_qnx_710),
|
||||||
("x86_64-pc-nto-qnx710", x86_64_pc_nto_qnx710),
|
("x86_64-pc-nto-qnx710", x86_64_pc_nto_qnx710),
|
||||||
|
|
||||||
|
("x86_64-unknown-squiid", x86_64_unknown_squiid),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cow-Vec-Str: Cow<'static, [Cow<'static, str>]>
|
/// Cow-Vec-Str: Cow<'static, [Cow<'static, str>]>
|
||||||
|
|
17
compiler/rustc_target/src/spec/squiid_base.rs
Normal file
17
compiler/rustc_target/src/spec/squiid_base.rs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
use crate::spec::{cvs, LinkerFlavor, Cc, Lld, RelroLevel, TargetOptions};
|
||||||
|
|
||||||
|
pub fn opts() -> TargetOptions {
|
||||||
|
TargetOptions {
|
||||||
|
os: "squiid".into(),
|
||||||
|
dynamic_linking: true,
|
||||||
|
executables: true,
|
||||||
|
families: cvs!["unix"],
|
||||||
|
has_rpath: true,
|
||||||
|
has_thread_local: true,
|
||||||
|
position_independent_executables: true,
|
||||||
|
linker: Some("x86_64-squiid-gcc".into()),
|
||||||
|
linker_flavor: LinkerFlavor::Gnu(Cc::Yes, Lld::Yes),
|
||||||
|
relro_level: RelroLevel::Full,
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
18
compiler/rustc_target/src/spec/x86_64_unknown_squiid.rs
Normal file
18
compiler/rustc_target/src/spec/x86_64_unknown_squiid.rs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
// use crate::spec::{LinkerFlavor, Target};
|
||||||
|
use crate::spec::Target;
|
||||||
|
|
||||||
|
pub fn target() -> Target {
|
||||||
|
let mut base = super::squiid_base::opts();
|
||||||
|
base.cpu = "x86-64".into();
|
||||||
|
base.max_atomic_width = Some(64);
|
||||||
|
// base.add_pre_link_args(LinkerFlavor::Gnu(), &["-m64"]);
|
||||||
|
|
||||||
|
Target {
|
||||||
|
llvm_target: "x86_64-unknown-squiid".into(),
|
||||||
|
pointer_width: 64,
|
||||||
|
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||||
|
.into(),
|
||||||
|
arch: "x86_64".into(),
|
||||||
|
options: base,
|
||||||
|
}
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
Subproject commit 477e7285b12f876ad105188cfcfc8adda7dc29aa
|
Subproject commit 67e44efaf423c351abca987f12e3c1441031475a
|
Loading…
Reference in a new issue