Add L4Bender as linker variant
This commit is contained in:
parent
84e918971d
commit
d98428711e
5 changed files with 183 additions and 17 deletions
|
@ -1,16 +1,5 @@
|
|||
use crate::spec::{LinkerFlavor, PanicStrategy, TargetOptions};
|
||||
//use std::process::Command;
|
||||
|
||||
// Use GCC to locate code for crt* libraries from the host, not from L4Re. Note
|
||||
// that a few files also come from L4Re, for these, the function shouldn't be
|
||||
// used. This uses GCC for the location of the file, but GCC is required for L4Re anyway.
|
||||
//fn get_path_or(filename: &str) -> String {
|
||||
// let child = Command::new("gcc")
|
||||
// .arg(format!("-print-file-name={}", filename)).output()
|
||||
// .expect("Failed to execute GCC");
|
||||
// String::from_utf8(child.stdout)
|
||||
// .expect("Couldn't read path from GCC").trim().into()
|
||||
//}
|
||||
use crate::spec::{LinkArgs, LinkerFlavor, PanicStrategy, TargetOptions};
|
||||
use std::default::Default;
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
|
@ -19,9 +8,9 @@ pub fn opts() -> TargetOptions {
|
|||
linker_flavor: LinkerFlavor::Ld,
|
||||
executables: true,
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
linker: Some("ld".to_string()),
|
||||
linker_is_gnu: false,
|
||||
families: vec!["unix".to_string()],
|
||||
linker: Some("l4-bender".to_string()),
|
||||
pre_link_args: args,
|
||||
os_family: Some("unix".to_string()),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ mod windows_uwp_msvc_base;
|
|||
pub enum LinkerFlavor {
|
||||
Em,
|
||||
Gcc,
|
||||
L4Bender,
|
||||
Ld,
|
||||
Msvc,
|
||||
Lld(LldFlavor),
|
||||
|
@ -160,6 +161,7 @@ macro_rules! flavor_mappings {
|
|||
flavor_mappings! {
|
||||
((LinkerFlavor::Em), "em"),
|
||||
((LinkerFlavor::Gcc), "gcc"),
|
||||
((LinkerFlavor::L4Bender), "l4-bender"),
|
||||
((LinkerFlavor::Ld), "ld"),
|
||||
((LinkerFlavor::Msvc), "msvc"),
|
||||
((LinkerFlavor::PtxLinker), "ptx-linker"),
|
||||
|
|
|
@ -11,6 +11,10 @@ pub fn target() -> Target {
|
|||
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
.to_string(),
|
||||
arch: "x86_64".to_string(),
|
||||
target_os: "l4re".to_string(),
|
||||
target_env: "uclibc".to_string(),
|
||||
target_vendor: "unknown".to_string(),
|
||||
linker_flavor: LinkerFlavor::L4Bender,
|
||||
options: base,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue