@@ -1,57 +0,0 @@
1−From c97759699264c6b1fa0e88420cd3c720df25e594 Mon Sep 17 00:00:00 2001
2−From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
3−Date: Tue, 11 Aug 2015 01:09:21 +0200
4−Subject: [PATCH] rustc_back: add configure options for default linker and ar
5−
6−Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7−---
8− configure | 4 ++++
9− mk/target.mk | 4 ++++
10− src/librustc_back/target/mod.rs | 4 ++--
11− 3 files changed, 10 insertions(+), 2 deletions(-)
12−
13−diff --git a/configure b/configure
14−index 071788c..dc9d7d7 100755
15−--- a/configure
16−+++ b/configure
17−@@ -607,6 +607,10 @@ valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
18− valopt release-channel "dev" "the name of the release channel to build"
19− valopt musl-root "/usr/local" "MUSL root installation directory"
20−
21−+# Used on systems where "cc" and "ar" are unavailable
22−+valopt default-linker "cc" "the default linker"
23−+valopt default-ar "ar" "the default ar"
24−+
25− # Many of these are saved below during the "writing configuration" step
26− # (others are conditionally saved).
27− opt_nosave manage-submodules 1 "let the build manage the git submodules"
28−diff --git a/mk/target.mk b/mk/target.mk
29−index aae66c4..408ab96 100644
30−--- a/mk/target.mk
31−+++ b/mk/target.mk
32−@@ -13,6 +13,10 @@
33− # this exists can be found on issue #2400
34− export CFG_COMPILER_HOST_TRIPLE
35−
36−+# Used as defaults for the runtime ar and cc tools
37−+export CFG_DEFAULT_LINKER
38−+export CFG_DEFAULT_AR
39−+
40− # The standard libraries should be held up to a higher standard than any old
41− # code, make sure that these common warnings are denied by default. These can
42− # be overridden during development temporarily. For stage0, we allow warnings
43−diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
44−index d9cfdaa..542791a 100644
45−--- a/src/librustc_back/target/mod.rs
46−+++ b/src/librustc_back/target/mod.rs
47−@@ -185,8 +185,8 @@ impl Default for TargetOptions {
48− fn default() -> TargetOptions {
49− TargetOptions {
50− data_layout: String::new(),
51−- linker: "cc".to_string(),
52−- ar: "ar".to_string(),
53−+ linker: option_env!("CFG_DEFAULT_LINKER").unwrap_or("cc").to_string(),
54−+ ar: option_env!("CFG_DEFAULT_AR").unwrap_or("ar").to_string(),
55− pre_link_args: Vec::new(),
56− post_link_args: Vec::new(),
57− cpu: "generic".to_string(),