package/rust: set musl-root for musl toolchains
Without musl-root in config.toml the build stop with the following error: thread 'main' panicked at 'couldn't find libc.a in musl libdir: output/host/arm-buildroot-linux-musleabihf/sysroot/lib/lib', src/bootstrap/sanity.rs:192:25 musl-root is needed to provide the path to libc.a and libunwind.a because rust link them statically into the standard library and liblibc [1]. For other libc, musl-root is not used and ignored [2]. [1]cd980b3bee
[2] https://github.com/rust-lang/rust/blob/1.58.1/src/bootstrap/sanity.rs#L181 Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> (cherry picked from commita41b0f31de
) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
44db0dba59
commit
46c073662b
@ -56,6 +56,7 @@ define HOST_RUST_CONFIGURE_CMDS
|
||||
echo 'sysconfdir = "$(HOST_DIR)/etc"'; \
|
||||
echo '[rust]'; \
|
||||
echo 'channel = "stable"'; \
|
||||
echo 'musl-root = "$(STAGING_DIR)"' ; \
|
||||
echo '[target.$(RUSTC_TARGET_NAME)]'; \
|
||||
echo 'cc = "$(TARGET_CROSS)gcc"'; \
|
||||
echo '[llvm]'; \
|
||||
|
Loading…
Reference in New Issue
Block a user