Drop noarch from embedded x86_64 targets and use lld
This commit is contained in:
parent
9f66968c10
commit
b2411fce72
@ -1,26 +0,0 @@
|
||||
From 37cb177eb53145103ae72b67562884782dde01c3 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Mironov <mironov.ivan@gmail.com>
|
||||
Date: Sun, 8 Dec 2019 17:23:08 +0500
|
||||
Subject: [PATCH] Use lld provided by system for wasm
|
||||
|
||||
---
|
||||
compiler/rustc_target/src/spec/wasm_base.rs | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||
index 528a84a8b37c..353d742161d1 100644
|
||||
--- a/compiler/rustc_target/src/spec/wasm_base.rs
|
||||
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||
@@ -89,8 +89,7 @@ macro_rules! args {
|
||||
// arguments just yet
|
||||
limit_rdylib_exports: false,
|
||||
|
||||
- // we use the LLD shipped with the Rust toolchain by default
|
||||
- linker: Some("rust-lld".into()),
|
||||
+ linker: Some("lld".into()),
|
||||
linker_flavor: LinkerFlavor::WasmLld(Cc::No),
|
||||
|
||||
pre_link_args,
|
||||
--
|
||||
2.38.1
|
||||
|
39
0001-Use-lld-provided-by-system.patch
Normal file
39
0001-Use-lld-provided-by-system.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||
index 341763aadbaf..ee6358e72955 100644
|
||||
--- a/compiler/rustc_target/src/spec/wasm_base.rs
|
||||
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||
@@ -89,8 +89,7 @@ macro_rules! args {
|
||||
// arguments just yet
|
||||
limit_rdylib_exports: false,
|
||||
|
||||
- // we use the LLD shipped with the Rust toolchain by default
|
||||
- linker: Some("rust-lld".into()),
|
||||
+ linker: Some("lld".into()),
|
||||
linker_flavor: LinkerFlavor::WasmLld(Cc::No),
|
||||
|
||||
pre_link_args,
|
||||
diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_none.rs b/compiler/rustc_target/src/spec/x86_64_unknown_none.rs
|
||||
index fe3b24f2d4af..1f1731d202ca 100644
|
||||
--- a/compiler/rustc_target/src/spec/x86_64_unknown_none.rs
|
||||
+++ b/compiler/rustc_target/src/spec/x86_64_unknown_none.rs
|
||||
@@ -17,7 +17,7 @@ pub fn target() -> Target {
|
||||
static_position_independent_executables: true,
|
||||
relro_level: RelroLevel::Full,
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
- linker: Some("rust-lld".into()),
|
||||
+ linker: Some("lld".into()),
|
||||
features:
|
||||
"-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float"
|
||||
.into(),
|
||||
diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs
|
||||
index 67664a74710a..53153cd120a3 100644
|
||||
--- a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs
|
||||
+++ b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs
|
||||
@@ -12,6 +12,7 @@ pub fn target() -> Target {
|
||||
base.cpu = "x86-64".into();
|
||||
base.plt_by_default = false;
|
||||
base.max_atomic_width = Some(64);
|
||||
+ base.linker = Some("lld".into());
|
||||
|
||||
// We disable MMX and SSE for now, even though UEFI allows using them. Problem is, you have to
|
||||
// enable these CPU features explicitly before their first use, otherwise their instructions
|
@ -104,8 +104,8 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
||||
Source1: %{wasi_libc_source}
|
||||
# Sources for bootstrap_arches are inserted by lua below
|
||||
|
||||
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
|
||||
Patch1: 0001-Use-lld-provided-by-system-for-wasm.patch
|
||||
# By default, rust tries to use "rust-lld" as a linker for some targets.
|
||||
Patch1: 0001-Use-lld-provided-by-system.patch
|
||||
|
||||
# Set a substitute-path in rust-gdb for standard library sources.
|
||||
Patch2: rustc-1.70.0-rust-gdb-substitute-path.patch
|
||||
@ -443,7 +443,6 @@ end}
|
||||
|
||||
%package std-static-{{triple}}
|
||||
Summary: Standard library for Rust {{triple}}
|
||||
BuildArch: noarch
|
||||
Requires: {{name}} = {{verrel}}
|
||||
Requires: lld >= 8.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user