iglunix/base/rust/llvm_crt.patch

46 lines
2.1 KiB
Diff
Raw Normal View History

2021-04-19 09:12:13 +00:00
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
2021-07-31 11:32:52 +00:00
@@ -185,7 +185,7 @@
// to using gcc from a glibc-targeting toolchain for linking.
// To do that we have to distribute musl startup objects as a part of Rust toolchain
// and link with them manually in the self-contained mode.
- if target.contains("musl") {
+ if false {
let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
});
2021-04-19 09:12:13 +00:00
--- a/compiler/rustc_target/src/spec/crt_objects.rs
+++ b/compiler/rustc_target/src/spec/crt_objects.rs
2021-03-14 00:37:52 +00:00
@@ -64,24 +64,17 @@
2021-03-13 22:00:56 +00:00
pub(super) fn pre_musl_fallback() -> CrtObjects {
new(&[
- (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]),
- (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o", "crtbeginS.o"]),
- (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]),
- (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o", "crtbeginS.o"]),
- (LinkOutputKind::DynamicDylib, &["crti.o", "crtbeginS.o"]),
- (LinkOutputKind::StaticDylib, &["crti.o", "crtbeginS.o"]),
2021-03-14 00:37:52 +00:00
+ (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o"]),
+ (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o"]),
+ (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o"]),
+ (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o"]),
+ (LinkOutputKind::DynamicDylib, &["crti.o"]),
+ (LinkOutputKind::StaticDylib, &["crti.o"]),
2021-03-13 22:00:56 +00:00
])
}
2021-03-14 00:37:52 +00:00
pub(super) fn post_musl_fallback() -> CrtObjects {
- new(&[
- (LinkOutputKind::DynamicNoPicExe, &["crtend.o", "crtn.o"]),
- (LinkOutputKind::DynamicPicExe, &["crtendS.o", "crtn.o"]),
- (LinkOutputKind::StaticNoPicExe, &["crtend.o", "crtn.o"]),
- (LinkOutputKind::StaticPicExe, &["crtendS.o", "crtn.o"]),
- (LinkOutputKind::DynamicDylib, &["crtendS.o", "crtn.o"]),
- (LinkOutputKind::StaticDylib, &["crtendS.o", "crtn.o"]),
- ])
+ all("crtn.o")
}
pub(super) fn pre_mingw_fallback() -> CrtObjects {