Don't link against lib{c,rt} on Rumprun for libstd
The Rumprun linker wrapper already includes -lc when linking. Passing it twice unfortunately causes binutils to crash with an assertion failure. Rumprun does currently not provide librt.
This commit is contained in:
parent
5d514b6c6a
commit
37d4bb95f2
@ -74,7 +74,7 @@
|
||||
))]
|
||||
|
||||
// Attributes needed when building as part of the standard library
|
||||
#![cfg_attr(stdbuild, feature(no_std, core, core_slice_ext, staged_api, custom_attribute))]
|
||||
#![cfg_attr(stdbuild, feature(no_std, core, core_slice_ext, staged_api, custom_attribute, cfg_target_vendor))]
|
||||
#![cfg_attr(stdbuild, no_std)]
|
||||
#![cfg_attr(stdbuild, staged_api)]
|
||||
#![cfg_attr(stdbuild, allow(warnings))]
|
||||
|
@ -143,6 +143,12 @@ cfg_if! {
|
||||
} else if #[cfg(target_os = "emscripten")] {
|
||||
#[link(name = "c")]
|
||||
extern {}
|
||||
} else if #[cfg(all(target_vendor = "rumprun", target_os = "netbsd"))] {
|
||||
// Since we don't use -nodefaultlibs on Rumprun, libc is always pulled in
|
||||
// automatically by the linker. We avoid passing it explicitly, as it
|
||||
// causes some versions of binutils to crash with an assertion failure.
|
||||
#[link(name = "m")]
|
||||
extern {}
|
||||
} else if #[cfg(any(target_os = "macos",
|
||||
target_os = "ios",
|
||||
target_os = "android",
|
||||
|
Loading…
Reference in New Issue
Block a user