summaryrefslogtreecommitdiff
path: root/user/rust/0013-Add-foxkit-target-specs.patch
blob: c0e8cd4a2477fea43c586c5b73452bd6ec8f3e92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
From fcf56fefa4b75f24430f69477d8cca8ee758fa41 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 02:29:06 +0000
Subject: [PATCH 13/13] Add foxkit target specs

---
 .../spec/aarch64_foxkit_linux_musl.rs               | 11 +++++++++++
 .../spec/armv7_foxkit_linux_musleabihf.rs           | 11 +++++++++++
 src/librustc_target/spec/i586_foxkit_linux_musl.rs  | 13 +++++++++++++
 src/librustc_target/spec/mod.rs                     |  7 +++++++
 .../spec/powerpc64_foxkit_linux_musl.rs             | 11 +++++++++++
 .../spec/powerpc_foxkit_linux_musl.rs               | 13 +++++++++++++
 .../spec/x86_64_foxkit_linux_musl.rs                | 11 +++++++++++
 7 files changed, 77 insertions(+)
 create mode 100644 src/librustc_target/spec/aarch64_foxkit_linux_musl.rs
 create mode 100644 src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs
 create mode 100644 src/librustc_target/spec/i586_foxkit_linux_musl.rs
 create mode 100644 src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs
 create mode 100644 src/librustc_target/spec/powerpc_foxkit_linux_musl.rs
 create mode 100644 src/librustc_target/spec/x86_64_foxkit_linux_musl.rs

diff --git a/src/librustc_target/spec/aarch64_foxkit_linux_musl.rs b/src/librustc_target/spec/aarch64_foxkit_linux_musl.rs
new file mode 100644
index 0000000000..9ba8bc1deb
--- /dev/null
+++ b/src/librustc_target/spec/aarch64_foxkit_linux_musl.rs
@@ -0,0 +1,11 @@
+use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
+    let mut base = super::aarch64_unknown_linux_musl::target()?;
+
+    base.llvm_target = "aarch64-foxkit-linux-musl".to_string();
+    base.target_vendor = "foxkit".to_string();
+    base.options.crt_static_default = false;
+
+    Ok(base)
+}
diff --git a/src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs b/src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs
new file mode 100644
index 0000000000..5a88f77896
--- /dev/null
+++ b/src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs
@@ -0,0 +1,11 @@
+use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
+    let mut base = super::armv7_unknown_linux_musleabihf::target()?;
+
+    base.llvm_target = "armv7-foxkit-linux-musleabihf".to_string();
+    base.target_vendor = "foxkit".to_string();
+    base.options.crt_static_default = false;
+
+    Ok(base)
+}
diff --git a/src/librustc_target/spec/i586_foxkit_linux_musl.rs b/src/librustc_target/spec/i586_foxkit_linux_musl.rs
new file mode 100644
index 0000000000..f0c4ffbf58
--- /dev/null
+++ b/src/librustc_target/spec/i586_foxkit_linux_musl.rs
@@ -0,0 +1,13 @@
+use crate::spec::{LinkerFlavor, TargetResult};
+
+pub fn target() -> TargetResult {
+    let mut base = super::i586_unknown_linux_musl::target()?;
+
+    base.llvm_target = "i586-foxkit-linux-musl".to_string();
+    base.target_vendor = "foxkit".to_string();
+    base.options.crt_static_default = false;
+    base.options.post_link_args.insert(LinkerFlavor::Gcc,
+        vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
+
+    Ok(base)
+}
diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs
index 46fefd78f4..7cdcb319c6 100644
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
@@ -329,6 +329,13 @@ macro_rules! supported_targets {
 }
 
 supported_targets! {
+    ("aarch64-foxkit-linux-musl", aarch64_foxkit_linux_musl),
+    ("armv7-foxkit-linux-musleabihf", armv7_foxkit_linux_musleabihf),
+    ("i586-foxkit-linux-musl", i586_foxkit_linux_musl),
+    ("powerpc-foxkit-linux-musl", powerpc_foxkit_linux_musl),
+    ("powerpc64-foxkit-linux-musl", powerpc64_foxkit_linux_musl),
+    ("x86_64-foxkit-linux-musl", x86_64_foxkit_linux_musl),
+
     ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
     ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
     ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
diff --git a/src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs b/src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs
new file mode 100644
index 0000000000..b105aa247e
--- /dev/null
+++ b/src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs
@@ -0,0 +1,11 @@
+use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
+    let mut base = super::powerpc64_unknown_linux_musl::target()?;
+
+    base.llvm_target = "powerpc64-foxkit-linux-musl".to_string();
+    base.target_vendor = "foxkit".to_string();
+    base.options.crt_static_default = false;
+
+    Ok(base)
+}
diff --git a/src/librustc_target/spec/powerpc_foxkit_linux_musl.rs b/src/librustc_target/spec/powerpc_foxkit_linux_musl.rs
new file mode 100644
index 0000000000..a425f472aa
--- /dev/null
+++ b/src/librustc_target/spec/powerpc_foxkit_linux_musl.rs
@@ -0,0 +1,13 @@
+use crate::spec::{LinkerFlavor, TargetResult};
+
+pub fn target() -> TargetResult {
+    let mut base = super::powerpc_unknown_linux_musl::target()?;
+
+    base.llvm_target = "powerpc-foxkit-linux-musl".to_string();
+    base.target_vendor = "foxkit".to_string();
+    base.options.crt_static_default = false;
+    base.options.post_link_args.insert(LinkerFlavor::Gcc,
+        vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
+
+    Ok(base)
+}
diff --git a/src/librustc_target/spec/x86_64_foxkit_linux_musl.rs b/src/librustc_target/spec/x86_64_foxkit_linux_musl.rs
new file mode 100644
index 0000000000..40adbd77b3
--- /dev/null
+++ b/src/librustc_target/spec/x86_64_foxkit_linux_musl.rs
@@ -0,0 +1,11 @@
+use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
+    let mut base = super::x86_64_unknown_linux_musl::target()?;
+
+    base.llvm_target = "x86_64-foxkit-linux-musl".to_string();
+    base.target_vendor = "foxkit".to_string();
+    base.options.crt_static_default = false;
+
+    Ok(base)
+}
-- 
2.21.0