rustc_target: Move target env "gnu" from linux_base
to linux_gnu_base
This commit is contained in:
parent
38030ffb4e
commit
ca17a91fb7
32 changed files with 35 additions and 30 deletions
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{Target, TargetOptions};
|
use crate::spec::{Target, TargetOptions};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.max_atomic_width = Some(128);
|
base.max_atomic_width = Some(128);
|
||||||
|
|
||||||
Target {
|
Target {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{LinkerFlavor, TargetOptions};
|
use crate::spec::{LinkerFlavor, TargetOptions};
|
||||||
|
|
||||||
pub fn opts() -> TargetOptions {
|
pub fn opts() -> TargetOptions {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.os = "android".to_string();
|
base.os = "android".to_string();
|
||||||
// Many of the symbols defined in compiler-rt are also defined in libgcc.
|
// Many of the symbols defined in compiler-rt are also defined in libgcc.
|
||||||
// Android's linker doesn't like that by default.
|
// Android's linker doesn't like that by default.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{Target, TargetOptions};
|
use crate::spec::{Target, TargetOptions};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "arm-unknown-linux-gnueabi".to_string(),
|
llvm_target: "arm-unknown-linux-gnueabi".to_string(),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{Target, TargetOptions};
|
use crate::spec::{Target, TargetOptions};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "arm-unknown-linux-gnueabihf".to_string(),
|
llvm_target: "arm-unknown-linux-gnueabihf".to_string(),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{Target, TargetOptions};
|
use crate::spec::{Target, TargetOptions};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let base = super::linux_base::opts();
|
let base = super::linux_gnu_base::opts();
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "armv4t-unknown-linux-gnueabi".to_string(),
|
llvm_target: "armv4t-unknown-linux-gnueabi".to_string(),
|
||||||
pointer_width: 32,
|
pointer_width: 32,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{Target, TargetOptions};
|
use crate::spec::{Target, TargetOptions};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let base = super::linux_base::opts();
|
let base = super::linux_gnu_base::opts();
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "armv5te-unknown-linux-gnueabi".to_string(),
|
llvm_target: "armv5te-unknown-linux-gnueabi".to_string(),
|
||||||
pointer_width: 32,
|
pointer_width: 32,
|
||||||
|
|
|
@ -4,7 +4,7 @@ use crate::spec::{Target, TargetOptions};
|
||||||
// hardfloat.
|
// hardfloat.
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let base = super::linux_base::opts();
|
let base = super::linux_gnu_base::opts();
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "armv7-unknown-linux-gnueabi".to_string(),
|
llvm_target: "armv7-unknown-linux-gnueabi".to_string(),
|
||||||
pointer_width: 32,
|
pointer_width: 32,
|
||||||
|
|
|
@ -4,7 +4,7 @@ use crate::spec::{Target, TargetOptions};
|
||||||
// thumb-mode. See the thumbv7neon variant for enabling both.
|
// thumb-mode. See the thumbv7neon variant for enabling both.
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let base = super::linux_base::opts();
|
let base = super::linux_gnu_base::opts();
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
|
llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
|
||||||
pointer_width: 32,
|
pointer_width: 32,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{LinkerFlavor, Target};
|
use crate::spec::{LinkerFlavor, Target};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.cpu = "pentium4".to_string();
|
base.cpu = "pentium4".to_string();
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
|
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
|
||||||
|
|
|
@ -20,7 +20,6 @@ pub fn opts() -> TargetOptions {
|
||||||
|
|
||||||
TargetOptions {
|
TargetOptions {
|
||||||
os: "linux".to_string(),
|
os: "linux".to_string(),
|
||||||
env: "gnu".to_string(),
|
|
||||||
dynamic_linking: true,
|
dynamic_linking: true,
|
||||||
executables: true,
|
executables: true,
|
||||||
os_family: Some("unix".to_string()),
|
os_family: Some("unix".to_string()),
|
||||||
|
|
5
compiler/rustc_target/src/spec/linux_gnu_base.rs
Normal file
5
compiler/rustc_target/src/spec/linux_gnu_base.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
use crate::spec::TargetOptions;
|
||||||
|
|
||||||
|
pub fn opts() -> TargetOptions {
|
||||||
|
TargetOptions { env: "gnu".to_string(), ..super::linux_base::opts() }
|
||||||
|
}
|
|
@ -14,7 +14,7 @@ pub fn target() -> Target {
|
||||||
max_atomic_width: Some(64),
|
max_atomic_width: Some(64),
|
||||||
mcount: "_mcount".to_string(),
|
mcount: "_mcount".to_string(),
|
||||||
|
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub fn target() -> Target {
|
||||||
max_atomic_width: Some(64),
|
max_atomic_width: Some(64),
|
||||||
mcount: "_mcount".to_string(),
|
mcount: "_mcount".to_string(),
|
||||||
|
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub fn target() -> Target {
|
||||||
max_atomic_width: Some(32),
|
max_atomic_width: Some(32),
|
||||||
mcount: "_mcount".to_string(),
|
mcount: "_mcount".to_string(),
|
||||||
|
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub fn target() -> Target {
|
||||||
max_atomic_width: Some(32),
|
max_atomic_width: Some(32),
|
||||||
mcount: "_mcount".to_string(),
|
mcount: "_mcount".to_string(),
|
||||||
|
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub fn target() -> Target {
|
||||||
max_atomic_width: Some(32),
|
max_atomic_width: Some(32),
|
||||||
mcount: "_mcount".to_string(),
|
mcount: "_mcount".to_string(),
|
||||||
|
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub fn target() -> Target {
|
||||||
max_atomic_width: Some(32),
|
max_atomic_width: Some(32),
|
||||||
mcount: "_mcount".to_string(),
|
mcount: "_mcount".to_string(),
|
||||||
|
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ pub fn target() -> Target {
|
||||||
max_atomic_width: Some(64),
|
max_atomic_width: Some(64),
|
||||||
mcount: "_mcount".to_string(),
|
mcount: "_mcount".to_string(),
|
||||||
|
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub fn target() -> Target {
|
||||||
max_atomic_width: Some(64),
|
max_atomic_width: Some(64),
|
||||||
mcount: "_mcount".to_string(),
|
mcount: "_mcount".to_string(),
|
||||||
|
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@ mod hermit_kernel_base;
|
||||||
mod illumos_base;
|
mod illumos_base;
|
||||||
mod l4re_base;
|
mod l4re_base;
|
||||||
mod linux_base;
|
mod linux_base;
|
||||||
|
mod linux_gnu_base;
|
||||||
mod linux_kernel_base;
|
mod linux_kernel_base;
|
||||||
mod linux_musl_base;
|
mod linux_musl_base;
|
||||||
mod linux_uclibc_base;
|
mod linux_uclibc_base;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions};
|
use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.cpu = "ppc64".to_string();
|
base.cpu = "ppc64".to_string();
|
||||||
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
|
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{LinkerFlavor, Target, TargetOptions};
|
use crate::spec::{LinkerFlavor, Target, TargetOptions};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.cpu = "ppc64le".to_string();
|
base.cpu = "ppc64le".to_string();
|
||||||
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
|
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{LinkerFlavor, Target, TargetOptions};
|
use crate::spec::{LinkerFlavor, Target, TargetOptions};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
|
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
|
||||||
base.max_atomic_width = Some(32);
|
base.max_atomic_width = Some(32);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{LinkerFlavor, Target, TargetOptions};
|
use crate::spec::{LinkerFlavor, Target, TargetOptions};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mspe".to_string());
|
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mspe".to_string());
|
||||||
base.max_atomic_width = Some(32);
|
base.max_atomic_width = Some(32);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub fn target() -> Target {
|
||||||
features: "+m,+a,+f,+d,+c".to_string(),
|
features: "+m,+a,+f,+d,+c".to_string(),
|
||||||
llvm_abiname: "ilp32d".to_string(),
|
llvm_abiname: "ilp32d".to_string(),
|
||||||
max_atomic_width: Some(32),
|
max_atomic_width: Some(32),
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub fn target() -> Target {
|
||||||
features: "+m,+a,+f,+d,+c".to_string(),
|
features: "+m,+a,+f,+d,+c".to_string(),
|
||||||
llvm_abiname: "lp64d".to_string(),
|
llvm_abiname: "lp64d".to_string(),
|
||||||
max_atomic_width: Some(64),
|
max_atomic_width: Some(64),
|
||||||
..super::linux_base::opts()
|
..super::linux_gnu_base::opts()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::Target;
|
use crate::spec::Target;
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.endian = "big".to_string();
|
base.endian = "big".to_string();
|
||||||
// z10 is the oldest CPU supported by LLVM
|
// z10 is the oldest CPU supported by LLVM
|
||||||
base.cpu = "z10".to_string();
|
base.cpu = "z10".to_string();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::Target;
|
use crate::spec::Target;
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.endian = "big".to_string();
|
base.endian = "big".to_string();
|
||||||
base.cpu = "v9".to_string();
|
base.cpu = "v9".to_string();
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{LinkerFlavor, Target};
|
use crate::spec::{LinkerFlavor, Target};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.endian = "big".to_string();
|
base.endian = "big".to_string();
|
||||||
base.cpu = "v9".to_string();
|
base.cpu = "v9".to_string();
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
|
|
|
@ -7,7 +7,7 @@ use crate::spec::{Target, TargetOptions};
|
||||||
// https://static.docs.arm.com/ddi0406/cd/DDI0406C_d_armv7ar_arm.pdf
|
// https://static.docs.arm.com/ddi0406/cd/DDI0406C_d_armv7ar_arm.pdf
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let base = super::linux_base::opts();
|
let base = super::linux_gnu_base::opts();
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
|
llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
|
||||||
pointer_width: 32,
|
pointer_width: 32,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{LinkerFlavor, Target};
|
use crate::spec::{LinkerFlavor, Target};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.cpu = "x86-64".to_string();
|
base.cpu = "x86-64".to_string();
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
|
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::spec::{LinkerFlavor, Target};
|
use crate::spec::{LinkerFlavor, Target};
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let mut base = super::linux_base::opts();
|
let mut base = super::linux_gnu_base::opts();
|
||||||
base.cpu = "x86-64".to_string();
|
base.cpu = "x86-64".to_string();
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mx32".to_string());
|
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mx32".to_string());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue