Use more accurate ELF flags on MIPS
This commit is contained in:
@@ -3567,7 +3567,14 @@ impl Target {
|
||||
"x86" => (Architecture::I386, None),
|
||||
"s390x" => (Architecture::S390x, None),
|
||||
"mips" | "mips32r6" => (Architecture::Mips, None),
|
||||
"mips64" | "mips64r6" => (Architecture::Mips64, None),
|
||||
"mips64" | "mips64r6" => (
|
||||
if self.options.llvm_abiname.as_ref() == "n32" {
|
||||
Architecture::Mips64_N32
|
||||
} else {
|
||||
Architecture::Mips64
|
||||
},
|
||||
None,
|
||||
),
|
||||
"x86_64" => (
|
||||
if self.pointer_width == 32 {
|
||||
Architecture::X86_64_X32
|
||||
|
||||
@@ -27,6 +27,7 @@ pub(crate) fn target() -> Target {
|
||||
abi: "abi64".into(),
|
||||
endian: Endian::Big,
|
||||
mcount: "_mcount".into(),
|
||||
llvm_abiname: "n64".into(),
|
||||
..base
|
||||
},
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ pub(crate) fn target() -> Target {
|
||||
features: "+mips64r2,+xgot".into(),
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "_mcount".into(),
|
||||
llvm_abiname: "n64".into(),
|
||||
|
||||
..base::linux_gnu::opts()
|
||||
},
|
||||
|
||||
@@ -25,6 +25,7 @@ pub(crate) fn target() -> Target {
|
||||
mcount: "_mcount".into(),
|
||||
// FIXME(compiler-team#422): musl targets should be dynamically linked by default.
|
||||
crt_static_default: true,
|
||||
llvm_abiname: "n64".into(),
|
||||
..base
|
||||
},
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ pub(crate) fn target() -> Target {
|
||||
features: "+mips64r2,+xgot".into(),
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "_mcount".into(),
|
||||
llvm_abiname: "n64".into(),
|
||||
|
||||
..base::linux_gnu::opts()
|
||||
},
|
||||
|
||||
@@ -19,6 +19,11 @@ pub(crate) fn target() -> Target {
|
||||
pointer_width: 64,
|
||||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
|
||||
arch: "mips64".into(),
|
||||
options: TargetOptions { abi: "abi64".into(), mcount: "_mcount".into(), ..base },
|
||||
options: TargetOptions {
|
||||
abi: "abi64".into(),
|
||||
mcount: "_mcount".into(),
|
||||
llvm_abiname: "n64".into(),
|
||||
..base
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ pub(crate) fn target() -> Target {
|
||||
features: "+mips64r6".into(),
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "_mcount".into(),
|
||||
llvm_abiname: "n64".into(),
|
||||
|
||||
..base::linux_gnu::opts()
|
||||
},
|
||||
|
||||
@@ -19,6 +19,7 @@ pub(crate) fn target() -> Target {
|
||||
features: "+mips64r6".into(),
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "_mcount".into(),
|
||||
llvm_abiname: "n64".into(),
|
||||
|
||||
..base::linux_gnu::opts()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user