diff options
| author | bors <bors@rust-lang.org> | 2021-10-10 08:16:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-10 08:16:22 +0000 |
| commit | 9e8356c6adf119f983651d533d2b307544086cf9 (patch) | |
| tree | 8f23bff6053a3e2c58b5ca6befa475ad225f9762 /library/std/src/sys | |
| parent | c1cb97481a633bdfdf3d6b57c6dcebfdfadbcfdf (diff) | |
| parent | bd821729cb2020aabbb16616af5cf32b1ba30ab4 (diff) | |
| download | rust-9e8356c6adf119f983651d533d2b307544086cf9.tar.gz rust-9e8356c6adf119f983651d533d2b307544086cf9.zip | |
Auto merge of #88952 - skrap:add-armv7-uclibc, r=nagisa
Add new tier-3 target: armv7-unknown-linux-uclibceabihf This change adds a new tier-3 target: armv7-unknown-linux-uclibceabihf This target is primarily used in embedded linux devices where system resources are slim and glibc is deemed too heavyweight. Cross compilation C toolchains are available [here](https://toolchains.bootlin.com/) or via [buildroot](https://buildroot.org). The change is based largely on a previous PR #79380 with a few minor modifications. The author of that PR was unable to push the PR forward, and graciously allowed me to take it over. Per the [target tier 3 policy](https://github.com/rust-lang/rfcs/blob/master/text/2803-target-tier-policy.md), I volunteer to be the "target maintainer". This is my first PR to Rust itself, so I apologize if I've missed things!
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/unix/mod.rs | 3 | ||||
| -rw-r--r-- | library/std/src/sys/unix/thread.rs | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs index 1c37f4ee498..2ba6c8d830e 100644 --- a/library/std/src/sys/unix/mod.rs +++ b/library/std/src/sys/unix/mod.rs @@ -307,6 +307,9 @@ cfg_if::cfg_if! { #[link(name = "zircon")] #[link(name = "fdio")] extern "C" {} + } else if #[cfg(all(target_os = "linux", target_env = "uclibc"))] { + #[link(name = "dl")] + extern "C" {} } } diff --git a/library/std/src/sys/unix/thread.rs b/library/std/src/sys/unix/thread.rs index 891f3413e91..6f4863057ab 100644 --- a/library/std/src/sys/unix/thread.rs +++ b/library/std/src/sys/unix/thread.rs @@ -594,7 +594,8 @@ pub mod guard { Some(stackaddr - guardsize..stackaddr) } else if cfg!(all(target_os = "linux", target_env = "musl")) { Some(stackaddr - guardsize..stackaddr) - } else if cfg!(all(target_os = "linux", target_env = "gnu")) { + } else if cfg!(all(target_os = "linux", any(target_env = "gnu", target_env = "uclibc"))) + { // glibc used to include the guard area within the stack, as noted in the BUGS // section of `man pthread_attr_getguardsize`. This has been corrected starting // with glibc 2.27, and in some distro backports, so the guard is now placed at the |
