From 1757a8701dfbc8627cce3a2f3624e39f525b8275 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Tue, 22 Aug 2017 16:24:29 -0500 Subject: [PATCH] Improve explanation of musl_root --- src/bootstrap/compile.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 78bc225447b..5b03608f687 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -210,7 +210,10 @@ fn run(self, builder: &Builder) { /// Copies the crt(1,i,n).o startup objects /// -/// Only required for musl targets that statically link to libc +/// Since musl supports fully static linking, we can cross link for it even +/// with a glibc-targeting toolchain, given we have the appropriate startup +/// files. As those shipped with glibc won't work, copy the ones provided by +/// musl so we have them on linux-gnu hosts. fn copy_musl_third_party_objects(build: &Build, target: Interned, into: &Path) { for &obj in &["crt1.o", "crti.o", "crtn.o"] { copy(&build.musl_root(target).unwrap().join("lib").join(obj), &into.join(obj)); -- 2.44.0