--- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -197,7 +197,7 @@ DependencyType::TargetSelfContained, ); } - for &obj in &["crtbegin.o", "crtbeginS.o", "crtend.o", "crtendS.o"] { + for &obj in &["clang_rt.crtbegin-x86_64.o", "clang_rt.crtend-x86_64.o"] { let src = compiler_file(builder, builder.cc(target), target, obj); let target = libdir_self_contained.join(obj); builder.copy(&src, &target); --- a/compiler/rustc_target/src/spec/crt_objects.rs +++ a/compiler/rustc_target/src/spec/crt_objects.rs @@ -64,12 +64,12 @@ 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"]), + (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o", "clang_rt.crtbegin-x86_64.o"]), + (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o", "clang_rt.crtbegin-x86_64.o"]), + (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o", "clang_rt.crtbegin-x86_64.o"]), + (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o", "clang_rt.crtbegin-x86_64.o"]), + (LinkOutputKind::DynamicDylib, &["crti.o", "clang_rt.crtbegin-x86_64.o"]), + (LinkOutputKind::StaticDylib, &["crti.o", "clang_rt.crtbegin-x86_64.o"]), ]) }