mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 18:26:44 +02:00
https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html * base.crt_static_default from linux_musl.rs in musl-fix-linux_musl_base.patch, was moved to the indivdual targets (which we already do in alpine-target.patch)9c37c14aa2
* Target JSON (de)serialization was moved from compiler/rustc_target/src/spec/mod.rs to compiler/rustc_target/src/spec/json.rs (need-rpath.patch)77080d8eb3
50 lines
2 KiB
Diff
50 lines
2 KiB
Diff
From: Jakub Jirutka <jakub@jirutka.cz>
|
|
Date: Sat, 08 Aug 2016 15:06:00 +0200
|
|
Subject: [PATCH] Fix linux_musl_base for native musl host
|
|
|
|
See https://github.com/rust-lang/rust/pull/40113
|
|
|
|
--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
|
|
+++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
|
|
@@ -4,9 +4,6 @@ pub(crate) fn opts() -> TargetOptions {
|
|
let mut base = base::linux::opts();
|
|
|
|
base.env = "musl".into();
|
|
- base.pre_link_objects_self_contained = crt_objects::pre_musl_self_contained();
|
|
- base.post_link_objects_self_contained = crt_objects::post_musl_self_contained();
|
|
- base.link_self_contained = LinkSelfContainedDefault::InferredForMusl;
|
|
|
|
base
|
|
}
|
|
|
|
--- a/compiler/rustc_target/src/spec/crt_objects.rs
|
|
+++ b/compiler/rustc_target/src/spec/crt_objects.rs
|
|
@@ -59,28 +62,6 @@
|
|
(LinkOutputKind::StaticPicExe, &[obj]),
|
|
(LinkOutputKind::DynamicDylib, &[obj]),
|
|
(LinkOutputKind::StaticDylib, &[obj]),
|
|
- ])
|
|
-}
|
|
-
|
|
-pub(super) fn pre_musl_self_contained() -> 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"]),
|
|
- ])
|
|
-}
|
|
-
|
|
-pub(super) fn post_musl_self_contained() -> 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"]),
|
|
])
|
|
}
|
|
|