2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-07-16 20:52:28 +00:00
repo/testing/rust/patches/0030-libc-linkage.patch
Muhammad Herdiansyah 46134fa86e rust: update to 1.36.0
build (finally) works!
2019-07-30 02:02:13 +00:00

28 lines
1.1 KiB
Diff

--- rustc-1.36.0-src/vendor/libc/src/lib.rs
+++ rustc-1.36.0-src/vendor/libc/src/lib.rs
@@ -26,6 +26,7 @@
#![deny(missing_copy_implementations, safe_packed_borrows)]
#![no_std]
#![cfg_attr(feature = "rustc-dep-of-std", no_core)]
+#![cfg_attr(feature = "rustc-dep-of-std", feature(static_nobundle))]
#[macro_use]
mod macros;
--- rustc-1.36.0-src/vendor/libc/src/unix/mod.rs
+++ rustc-1.36.0-src/vendor/libc/src/unix/mod.rs
@@ -307,11 +307,11 @@ cfg_if! {
// cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs.
} else if #[cfg(target_env = "musl")] {
+ #[link(name = "c")]
+ extern {}
#[cfg_attr(feature = "rustc-dep-of-std",
- link(name = "c", kind = "static",
+ link(name = "gcc", kind = "static-nobundle",
cfg(target_feature = "crt-static")))]
- #[cfg_attr(feature = "rustc-dep-of-std",
- link(name = "c", cfg(not(target_feature = "crt-static"))))]
extern {}
} else if #[cfg(target_os = "emscripten")] {
#[link(name = "c")]