Skip to content

Commit 450afac

Browse files
committed
Add rustc-abi field to target spec JSON
The Rust compiler now requires an explicit `rustc-abi: x86-softfloat` field when using the soft-float target feature. This was added in rust-lang/rust#136146 and is part of the latest nightlies. I updated the post branches in commit 688a21e
1 parent 8b341c9 commit 450afac

File tree

7 files changed

+57
-7
lines changed

7 files changed

+57
-7
lines changed

blog/content/edition-2/posts/02-minimal-rust-kernel/index.fa.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ rtl = true
197197

198198
For more information, see our post on [disabling SIMD](@/edition-2/posts/02-minimal-rust-kernel/disable-simd/index.md).
199199

200+
```json
201+
"rustc-abi": "x86-softfloat"
202+
```
203+
204+
As we want to use the `soft-float` feature, we also need to tell the Rust compiler `rustc` that we want to use the corresponding ABI. We can do that by setting the `x86-softfloat` field to `x86-softfloat`.
205+
200206
#### کنار هم قرار دادن
201207
فایل مشخصات هدف ما اکنون به این شکل است:
202208

@@ -214,7 +220,8 @@ For more information, see our post on [disabling SIMD](@/edition-2/posts/02-mini
214220
"linker": "rust-lld",
215221
"panic-strategy": "abort",
216222
"disable-redzone": true,
217-
"features": "-mmx,-sse,+soft-float"
223+
"features": "-mmx,-sse,+soft-float",
224+
"rustc-abi": "x86-softfloat"
218225
}
219226
```
220227

blog/content/edition-2/posts/02-minimal-rust-kernel/index.fr.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ Un problème avec la désactivation de SIMD est que les opérations sur les nomb
194194

195195
Pour plus d'informations, voir notre article sur la [désactivation de SIMD](@/edition-2/posts/02-minimal-rust-kernel/disable-simd/index.md).
196196

197+
```json
198+
"rustc-abi": "x86-softfloat"
199+
```
200+
201+
As we want to use the `soft-float` feature, we also need to tell the Rust compiler `rustc` that we want to use the corresponding ABI. We can do that by setting the `x86-softfloat` field to `x86-softfloat`.
202+
197203
#### Assembler le tout
198204
Notre fichier de spécification de cible ressemble maintenant à ceci :
199205

@@ -211,7 +217,8 @@ Notre fichier de spécification de cible ressemble maintenant à ceci :
211217
"linker": "rust-lld",
212218
"panic-strategy": "abort",
213219
"disable-redzone": true,
214-
"features": "-mmx,-sse,+soft-float"
220+
"features": "-mmx,-sse,+soft-float",
221+
"rustc-abi": "x86-softfloat"
215222
}
216223
```
217224

blog/content/edition-2/posts/02-minimal-rust-kernel/index.ja.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@ SIMDを無効化することによる問題に、`x86_64`における浮動小
191191

192192
より詳しくは、[SIMDを無効化する](@/edition-2/posts/02-minimal-rust-kernel/disable-simd/index.md)ことに関する私達の記事を読んでください。
193193

194+
```json
195+
"rustc-abi": "x86-softfloat"
196+
```
197+
198+
As we want to use the `soft-float` feature, we also need to tell the Rust compiler `rustc` that we want to use the corresponding ABI. We can do that by setting the `x86-softfloat` field to `x86-softfloat`.
199+
200+
194201
#### まとめると
195202
私達のターゲット仕様ファイルは今このようになっているはずです。
196203

@@ -208,7 +215,8 @@ SIMDを無効化することによる問題に、`x86_64`における浮動小
208215
"linker": "rust-lld",
209216
"panic-strategy": "abort",
210217
"disable-redzone": true,
211-
"features": "-mmx,-sse,+soft-float"
218+
"features": "-mmx,-sse,+soft-float",
219+
"rustc-abi": "x86-softfloat"
212220
}
213221
```
214222

blog/content/edition-2/posts/02-minimal-rust-kernel/index.ko.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ SIMD 레지스터 값들을 메모리에 백업하고 또 다시 복구하는
202202

203203
더 자세히 알고 싶으시다면, 저희가 작성한 [SIMD 기능 해제](@/edition-2/posts/02-minimal-rust-kernel/disable-simd/index.ko.md)에 관한 포스트를 확인해주세요.
204204

205+
```json
206+
"rustc-abi": "x86-softfloat"
207+
```
208+
209+
As we want to use the `soft-float` feature, we also need to tell the Rust compiler `rustc` that we want to use the corresponding ABI. We can do that by setting the `x86-softfloat` field to `x86-softfloat`.
210+
205211
#### 요약
206212
컴파일 대상 환경 설정 파일을 아래와 같이 작성합니다:
207213

@@ -219,7 +225,8 @@ SIMD 레지스터 값들을 메모리에 백업하고 또 다시 복구하는
219225
"linker": "rust-lld",
220226
"panic-strategy": "abort",
221227
"disable-redzone": true,
222-
"features": "-mmx,-sse,+soft-float"
228+
"features": "-mmx,-sse,+soft-float",
229+
"rustc-abi": "x86-softfloat"
223230
}
224231
```
225232

blog/content/edition-2/posts/02-minimal-rust-kernel/index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ A problem with disabling SIMD is that floating point operations on `x86_64` requ
189189

190190
For more information, see our post on [disabling SIMD](@/edition-2/posts/02-minimal-rust-kernel/disable-simd/index.md).
191191

192+
```json
193+
"rustc-abi": "x86-softfloat"
194+
```
195+
196+
As we want to use the `soft-float` feature, we also need to tell the Rust compiler `rustc` that we want to use the corresponding ABI. We can do that by setting the `x86-softfloat` field to `x86-softfloat`.
197+
192198
#### Putting it Together
193199
Our target specification file now looks like this:
194200

@@ -206,7 +212,8 @@ Our target specification file now looks like this:
206212
"linker": "rust-lld",
207213
"panic-strategy": "abort",
208214
"disable-redzone": true,
209-
"features": "-mmx,-sse,+soft-float"
215+
"features": "-mmx,-sse,+soft-float",
216+
"rustc-abi": "x86-softfloat"
210217
}
211218
```
212219

blog/content/edition-2/posts/02-minimal-rust-kernel/index.ru.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ Cargo поддерживает различные целевые системы
194194

195195
Для получения дополнительной информации см. наш пост об [отключении SIMD](@/edition-2/posts/02-minimal-rust-kernel/disable-simd/index.ru.md).
196196

197+
```json
198+
"rustc-abi": "x86-softfloat"
199+
```
200+
201+
As we want to use the `soft-float` feature, we also need to tell the Rust compiler `rustc` that we want to use the corresponding ABI. We can do that by setting the `x86-softfloat` field to `x86-softfloat`.
202+
197203
#### Соединяем все вместе
198204

199205
Наша спецификация целовой платформы выглядит следующим образом:
@@ -212,7 +218,8 @@ Cargo поддерживает различные целевые системы
212218
"linker": "rust-lld",
213219
"panic-strategy": "abort",
214220
"disable-redzone": true,
215-
"features": "-mmx,-sse,+soft-float"
221+
"features": "-mmx,-sse,+soft-float",
222+
"rustc-abi": "x86-softfloat"
216223
}
217224
```
218225

blog/content/edition-2/posts/02-minimal-rust-kernel/index.zh-CN.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ Nightly 版本的编译器允许我们在源码的开头插入**特性标签**
161161

162162
[disabling SIMD]: @/edition-2/posts/02-minimal-rust-kernel/disable-simd/index.zh-CN.md
163163

164+
```json
165+
"rustc-abi": "x86-softfloat"
166+
```
167+
168+
As we want to use the `soft-float` feature, we also need to tell the Rust compiler `rustc` that we want to use the corresponding ABI. We can do that by setting the `x86-softfloat` field to `x86-softfloat`.
169+
164170
现在,我们将各个配置项整合在一起。我们的目标配置清单应该长这样:
165171

166172
```json
@@ -177,7 +183,8 @@ Nightly 版本的编译器允许我们在源码的开头插入**特性标签**
177183
"linker": "rust-lld",
178184
"panic-strategy": "abort",
179185
"disable-redzone": true,
180-
"features": "-mmx,-sse,+soft-float"
186+
"features": "-mmx,-sse,+soft-float",
187+
"rustc-abi": "x86-softfloat"
181188
}
182189
```
183190

0 commit comments

Comments
 (0)