diff options
Diffstat (limited to 'user/rust')
36 files changed, 5710 insertions, 0 deletions
diff --git a/user/rust/0001-Require-static-native-libraries-when-linking-static-.patch b/user/rust/0001-Require-static-native-libraries-when-linking-static-.patch new file mode 100644 index 000000000..a9638ee75 --- /dev/null +++ b/user/rust/0001-Require-static-native-libraries-when-linking-static-.patch @@ -0,0 +1,44 @@ +From 9cee7b92ea492f9a879c88ae0ca2c1f791bdec97 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Fri, 8 Sep 2017 00:05:18 -0500 +Subject: [PATCH 01/29] Require static native libraries when linking static + executables + +--- + src/librustc_codegen_llvm/back/link.rs | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs +index 845a66c6e4..f61318affc 100644 +--- a/src/librustc_codegen_llvm/back/link.rs ++++ b/src/librustc_codegen_llvm/back/link.rs +@@ -1551,8 +1551,8 @@ fn add_upstream_rust_crates(cmd: &mut dyn Linker, + } + } + +-// Link in all of our upstream crates' native dependencies. Remember that +-// all of these upstream native dependencies are all non-static ++// Link in all of our upstream crates' native dependencies. Remember that when ++// linking libraries, these upstream native dependencies are all non-static + // dependencies. We've got two cases then: + // + // 1. The upstream crate is an rlib. In this case we *must* link in the +@@ -1596,7 +1596,14 @@ fn add_upstream_native_libraries(cmd: &mut dyn Linker, + continue + } + match lib.kind { +- NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()), ++ NativeLibraryKind::NativeUnknown => { ++ // When creating executables, match library linkage to that of the executable. ++ if crate_type == config::CrateTypeExecutable && sess.crt_static() { ++ cmd.link_staticlib(&name.as_str()) ++ } else { ++ cmd.link_dylib(&name.as_str()) ++ } ++ }, + NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()), + NativeLibraryKind::NativeStaticNobundle => { + // Link "static-nobundle" native libs only if the crate they originate from +-- +2.18.0 + diff --git a/user/rust/0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch b/user/rust/0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch new file mode 100644 index 000000000..6b9bcb876 --- /dev/null +++ b/user/rust/0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch @@ -0,0 +1,36 @@ +From 8523832491df1889d9c226bef0cc76ed7b1a8d33 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Wed, 10 Jan 2018 13:36:41 -0600 +Subject: [PATCH 02/29] Don't pass CFLAGS to the C++ compiler + +--- + src/bootstrap/builder.rs | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs +index dc0b0aaf0b..257d369750 100644 +--- a/src/bootstrap/builder.rs ++++ b/src/bootstrap/builder.rs +@@ -966,7 +966,7 @@ impl<'a> Builder<'a> { + let cflags = self.cflags(target).join(" "); + cargo + .env(format!("CFLAGS_{}", target), cflags.clone()) +- .env("CFLAGS", cflags.clone()); ++ .env("CFLAGS", cflags); + + if let Some(ar) = self.ar(target) { + let ranlib = format!("{} s", ar.display()); +@@ -981,9 +981,7 @@ impl<'a> Builder<'a> { + let cxx = ccacheify(&cxx); + cargo + .env(format!("CXX_{}", target), &cxx) +- .env("CXX", &cxx) +- .env(format!("CXXFLAGS_{}", target), cflags.clone()) +- .env("CXXFLAGS", cflags); ++ .env("CXX", &cxx); + } + } + +-- +2.18.0 + diff --git a/user/rust/0003-Fix-LLVM-build.patch b/user/rust/0003-Fix-LLVM-build.patch new file mode 100644 index 000000000..72108f0ae --- /dev/null +++ b/user/rust/0003-Fix-LLVM-build.patch @@ -0,0 +1,26 @@ +From f8878714f01309b99cae990f390431929a37c2c8 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Fri, 8 Sep 2017 00:04:29 -0500 +Subject: [PATCH 03/29] Fix LLVM build + +--- + src/bootstrap/lib.rs | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs +index 1efff19dfb..e6ac847afe 100644 +--- a/src/bootstrap/lib.rs ++++ b/src/bootstrap/lib.rs +@@ -742,7 +742,8 @@ impl Build { + // cc-rs because the build scripts will determine that for themselves. + let mut base = self.cc[&target].args().iter() + .map(|s| s.to_string_lossy().into_owned()) +- .filter(|s| !s.starts_with("-O") && !s.starts_with("/O")) ++ .filter(|s| !s.starts_with("-O") && !s.starts_with("/O") ++ && !s.starts_with("-static")) + .collect::<Vec<_>>(); + + // If we're compiling on macOS then we add a few unconditional flags +-- +2.18.0 + diff --git a/user/rust/0004-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch b/user/rust/0004-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch new file mode 100644 index 000000000..a28fc39b0 --- /dev/null +++ b/user/rust/0004-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch @@ -0,0 +1,25 @@ +From 898e72085351cae381669960fcc4d20b8afeeb78 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Mon, 17 Sep 2018 01:32:20 +0000 +Subject: [PATCH 04/29] test/sysroot-crates-are-unstable: Fix test when rpath + is disabled + +Without this environment var, the test can't run rustc to find +the sysroot path. +--- + .../run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile +index a35174b3c2..9e77070685 100644 +--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile ++++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile +@@ -1,2 +1,4 @@ ++-include ../tools.mk ++ + all: +- python2.7 test.py ++ env '$(HOST_RPATH_ENV)' python2.7 test.py +-- +2.18.0 + diff --git a/user/rust/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/user/rust/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch new file mode 100644 index 000000000..eda99398c --- /dev/null +++ b/user/rust/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch @@ -0,0 +1,444 @@ +From 1b47e0a7cfc3fd6572d939aa894e3a23522ed4c0 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Fri, 8 Sep 2017 22:11:14 -0500 +Subject: [PATCH 05/29] Remove -nostdlib and musl_root from musl targets + +--- + config.toml.example | 6 --- + src/bootstrap/bin/rustc.rs | 10 ----- + src/bootstrap/cc_detect.rs | 27 ++---------- + src/bootstrap/compile.rs | 31 -------------- + src/bootstrap/config.rs | 7 ---- + src/bootstrap/configure.py | 22 ---------- + src/bootstrap/lib.rs | 8 ---- + src/bootstrap/sanity.rs | 30 +------------- + .../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 - + src/ci/docker/dist-various-1/Dockerfile | 7 ---- + src/ci/docker/dist-x86_64-musl/Dockerfile | 1 - + src/librustc_target/spec/linux_musl_base.rs | 41 ------------------- + 12 files changed, 4 insertions(+), 188 deletions(-) + +diff --git a/config.toml.example b/config.toml.example +index 9907341633..6f8b52e235 100644 +--- a/config.toml.example ++++ b/config.toml.example +@@ -409,12 +409,6 @@ + # only use static libraries. If unset, the target's default linkage is used. + #crt-static = false + +-# The root location of the MUSL installation directory. The library directory +-# will also need to contain libunwind.a for an unwinding implementation. Note +-# that this option only makes sense for MUSL targets that produce statically +-# linked binaries +-#musl-root = "..." +- + # Used in testing for configuring where the QEMU images are located, you + # probably don't want to use this. + #qemu-rootfs = "..." +diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs +index 7192cae895..71435f9306 100644 +--- a/src/bootstrap/bin/rustc.rs ++++ b/src/bootstrap/bin/rustc.rs +@@ -30,7 +30,6 @@ + extern crate bootstrap; + + use std::env; +-use std::ffi::OsString; + use std::io; + use std::path::PathBuf; + use std::process::Command; +@@ -126,15 +125,6 @@ fn main() { + cmd.arg("-Cprefer-dynamic"); + } + +- // Help the libc crate compile by assisting it in finding the MUSL +- // native libraries. +- if let Some(s) = env::var_os("MUSL_ROOT") { +- let mut root = OsString::from("native="); +- root.push(&s); +- root.push("/lib"); +- cmd.arg("-L").arg(&root); +- } +- + // Override linker if necessary. + if let Ok(target_linker) = env::var("RUSTC_TARGET_LINKER") { + cmd.arg(format!("-Clinker={}", target_linker)); +diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs +index 698903f128..629cedf019 100644 +--- a/src/bootstrap/cc_detect.rs ++++ b/src/bootstrap/cc_detect.rs +@@ -95,7 +95,7 @@ pub fn find(build: &mut Build) { + if let Some(cc) = config.and_then(|c| c.cc.as_ref()) { + cfg.compiler(cc); + } else { +- set_compiler(&mut cfg, Language::C, target, config, build); ++ set_compiler(&mut cfg, Language::C, target, config); + } + + let compiler = cfg.get_compiler(); +@@ -124,7 +124,7 @@ pub fn find(build: &mut Build) { + if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) { + cfg.compiler(cxx); + } else { +- set_compiler(&mut cfg, Language::CPlusPlus, host, config, build); ++ set_compiler(&mut cfg, Language::CPlusPlus, host, config); + } + let compiler = cfg.get_compiler(); + build.verbose(&format!("CXX_{} = {:?}", host, compiler.path())); +@@ -135,8 +135,7 @@ pub fn find(build: &mut Build) { + fn set_compiler(cfg: &mut cc::Build, + compiler: Language, + target: Interned<String>, +- config: Option<&Target>, +- build: &Build) { ++ config: Option<&Target>) { + match &*target { + // When compiling for android we may have the NDK configured in the + // config.toml in which case we look there. Otherwise the default +@@ -173,26 +172,6 @@ fn set_compiler(cfg: &mut cc::Build, + } + } + +- "mips-unknown-linux-musl" => { +- if cfg.get_compiler().path().to_str() == Some("gcc") { +- cfg.compiler("mips-linux-musl-gcc"); +- } +- } +- "mipsel-unknown-linux-musl" => { +- if cfg.get_compiler().path().to_str() == Some("gcc") { +- cfg.compiler("mipsel-linux-musl-gcc"); +- } +- } +- +- t if t.contains("musl") => { +- if let Some(root) = build.musl_root(target) { +- let guess = root.join("bin/musl-gcc"); +- if guess.exists() { +- cfg.compiler(guess); +- } +- } +- } +- + _ => {} + } + } +diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs +index 04e8e133b0..7767956cd8 100644 +--- a/src/bootstrap/compile.rs ++++ b/src/bootstrap/compile.rs +@@ -87,13 +87,6 @@ impl Step for Std { + }); + builder.info(&format!("Uplifting stage1 std ({} -> {})", from.host, target)); + +- // Even if we're not building std this stage, the new sysroot must +- // still contain the musl startup objects. +- if target.contains("musl") { +- let libdir = builder.sysroot_libdir(compiler, target); +- copy_musl_third_party_objects(builder, target, &libdir); +- } +- + builder.ensure(StdLink { + compiler: from, + target_compiler: compiler, +@@ -102,11 +95,6 @@ impl Step for Std { + return; + } + +- if target.contains("musl") { +- let libdir = builder.sysroot_libdir(compiler, target); +- copy_musl_third_party_objects(builder, target, &libdir); +- } +- + let out_dir = builder.cargo_out(compiler, Mode::Std, target); + builder.clear_if_dirty(&out_dir, &builder.rustc(compiler)); + let mut cargo = builder.cargo(compiler, Mode::Std, target, "build"); +@@ -128,20 +116,6 @@ impl Step for Std { + } + } + +-/// Copies the crt(1,i,n).o startup objects +-/// +-/// 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(builder: &Builder, +- target: Interned<String>, +- into: &Path) { +- for &obj in &["crt1.o", "crti.o", "crtn.o"] { +- builder.copy(&builder.musl_root(target).unwrap().join("lib").join(obj), &into.join(obj)); +- } +-} +- + /// Configure cargo to compile the standard library, adding appropriate env vars + /// and such. + pub fn std_cargo(builder: &Builder, +@@ -196,11 +170,6 @@ pub fn std_cargo(builder: &Builder, + cargo.env("JEMALLOC_OVERRIDE", jemalloc); + } + } +- if target.contains("musl") { +- if let Some(p) = builder.musl_root(target) { +- cargo.env("MUSL_ROOT", p); +- } +- } + } + } + +diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs +index 0a8a5c87d0..9fdf8690c5 100644 +--- a/src/bootstrap/config.rs ++++ b/src/bootstrap/config.rs +@@ -131,8 +131,6 @@ pub struct Config { + pub save_toolstates: Option<PathBuf>, + pub print_step_timings: bool, + +- // Fallback musl-root for all targets +- pub musl_root: Option<PathBuf>, + pub prefix: Option<PathBuf>, + pub sysconfdir: Option<PathBuf>, + pub datadir: Option<PathBuf>, +@@ -165,7 +163,6 @@ pub struct Target { + pub linker: Option<PathBuf>, + pub ndk: Option<PathBuf>, + pub crt_static: Option<bool>, +- pub musl_root: Option<PathBuf>, + pub qemu_rootfs: Option<PathBuf>, + pub no_std: bool, + } +@@ -294,7 +291,6 @@ struct Rust { + backtrace: Option<bool>, + default_linker: Option<String>, + channel: Option<String>, +- musl_root: Option<String>, + rpath: Option<bool>, + optimize_tests: Option<bool>, + debuginfo_tests: Option<bool>, +@@ -328,7 +324,6 @@ struct TomlTarget { + linker: Option<String>, + android_ndk: Option<String>, + crt_static: Option<bool>, +- musl_root: Option<String>, + qemu_rootfs: Option<String>, + } + +@@ -541,7 +536,6 @@ impl Config { + set(&mut config.llvm_tools_enabled, rust.llvm_tools); + config.rustc_parallel_queries = rust.experimental_parallel_queries.unwrap_or(false); + config.rustc_default_linker = rust.default_linker.clone(); +- config.musl_root = rust.musl_root.clone().map(PathBuf::from); + config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from); + set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings)); + set(&mut config.backtrace_on_ice, rust.backtrace_on_ice); +@@ -580,7 +574,6 @@ impl Config { + target.ar = cfg.ar.clone().map(PathBuf::from); + target.linker = cfg.linker.clone().map(PathBuf::from); + target.crt_static = cfg.crt_static.clone(); +- target.musl_root = cfg.musl_root.clone().map(PathBuf::from); + target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from); + + config.target_config.insert(INTERNER.intern_string(triple.clone()), target); +diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py +index 9fdba044f4..513935e4c8 100755 +--- a/src/bootstrap/configure.py ++++ b/src/bootstrap/configure.py +@@ -108,28 +108,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk", + "aarch64-linux-android NDK standalone path") + v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk", + "x86_64-linux-android NDK standalone path") +-v("musl-root", "target.x86_64-unknown-linux-musl.musl-root", +- "MUSL root installation directory (deprecated)") +-v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root", +- "x86_64-unknown-linux-musl install directory") +-v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root", +- "i586-unknown-linux-musl install directory") +-v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root", +- "i686-unknown-linux-musl install directory") +-v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root", +- "arm-unknown-linux-musleabi install directory") +-v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root", +- "arm-unknown-linux-musleabihf install directory") +-v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root", +- "armv5te-unknown-linux-musleabi install directory") +-v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root", +- "armv7-unknown-linux-musleabihf install directory") +-v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root", +- "aarch64-unknown-linux-musl install directory") +-v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root", +- "mips-unknown-linux-musl install directory") +-v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root", +- "mipsel-unknown-linux-musl install directory") + v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs", + "rootfs in qemu testing, you probably don't want to use this") + v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs", +diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs +index e6ac847afe..dd785124d2 100644 +--- a/src/bootstrap/lib.rs ++++ b/src/bootstrap/lib.rs +@@ -803,14 +803,6 @@ impl Build { + } + } + +- /// Returns the "musl root" for this `target`, if defined +- fn musl_root(&self, target: Interned<String>) -> Option<&Path> { +- self.config.target_config.get(&target) +- .and_then(|t| t.musl_root.as_ref()) +- .or(self.config.musl_root.as_ref()) +- .map(|p| &**p) +- } +- + /// Returns true if this is a no-std `target`, if defined + fn no_std(&self, target: Interned<String>) -> Option<bool> { + self.config.target_config.get(&target) +diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs +index c7f514da93..617a3c2399 100644 +--- a/src/bootstrap/sanity.rs ++++ b/src/bootstrap/sanity.rs +@@ -21,7 +21,7 @@ + use std::collections::HashMap; + use std::env; + use std::ffi::{OsString, OsStr}; +-use std::fs::{self, File}; ++use std::fs::File; + use std::io::Read; + use std::path::PathBuf; + use std::process::Command; +@@ -186,34 +186,6 @@ pub fn check(build: &mut Build) { + } + } + +- // Make sure musl-root is valid +- if target.contains("musl") { +- // If this is a native target (host is also musl) and no musl-root is given, +- // fall back to the system toolchain in /usr before giving up +- if build.musl_root(*target).is_none() && build.config.build == *target { +- let target = build.config.target_config.entry(target.clone()) +- .or_insert(Default::default()); +- target.musl_root = Some("/usr".into()); +- } +- match build.musl_root(*target) { +- Some(root) => { +- if fs::metadata(root.join("lib/libc.a")).is_err() { +- panic!("couldn't find libc.a in musl dir: {}", +- root.join("lib").display()); +- } +- if fs::metadata(root.join("lib/libunwind.a")).is_err() { +- panic!("couldn't find libunwind.a in musl dir: {}", +- root.join("lib").display()); +- } +- } +- None => { +- panic!("when targeting MUSL either the rust.musl-root \ +- option or the target.$TARGET.musl-root option must \ +- be specified in config.toml") +- } +- } +- } +- + if target.contains("msvc") { + // There are three builds of cmake on windows: MSVC, MinGW, and + // Cygwin. The Cygwin build does not have generators for Visual +diff --git a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile +index ba2d32a929..412c37fdd1 100644 +--- a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile ++++ b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile +@@ -30,8 +30,6 @@ COPY scripts/sccache.sh /scripts/ + RUN sh /scripts/sccache.sh + + ENV RUST_CONFIGURE_ARGS \ +- --musl-root-i586=/musl-i586 \ +- --musl-root-i686=/musl-i686 \ + --enable-extended \ + --disable-docs + +diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile +index 6302f55009..e04fdaa226 100644 +--- a/src/ci/docker/dist-various-1/Dockerfile ++++ b/src/ci/docker/dist-various-1/Dockerfile +@@ -109,13 +109,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \ + CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc + + ENV RUST_CONFIGURE_ARGS \ +- --musl-root-armv5te=/musl-armv5te \ +- --musl-root-arm=/musl-arm \ +- --musl-root-armhf=/musl-armhf \ +- --musl-root-armv7=/musl-armv7 \ +- --musl-root-aarch64=/musl-aarch64 \ +- --musl-root-mips=/musl-mips \ +- --musl-root-mipsel=/musl-mipsel \ + --enable-emscripten \ + --disable-docs + +diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile +index 06f8a2fbba..f5dd379528 100644 +--- a/src/ci/docker/dist-x86_64-musl/Dockerfile ++++ b/src/ci/docker/dist-x86_64-musl/Dockerfile +@@ -30,7 +30,6 @@ COPY scripts/sccache.sh /scripts/ + RUN sh /scripts/sccache.sh + + ENV RUST_CONFIGURE_ARGS \ +- --musl-root-x86_64=/musl-x86_64 \ + --enable-extended \ + --disable-docs + +diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs +index 7a3f3c2a51..32fe2f880a 100644 +--- a/src/librustc_target/spec/linux_musl_base.rs ++++ b/src/librustc_target/spec/linux_musl_base.rs +@@ -13,53 +13,12 @@ use spec::{LinkerFlavor, TargetOptions}; + pub fn opts() -> TargetOptions { + let mut base = super::linux_base::opts(); + +- // Make sure that the linker/gcc really don't pull in anything, including +- // default objects, libs, etc. +- base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new()); +- base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string()); +- + // At least when this was tested, the linker would not add the + // `GNU_EH_FRAME` program header to executables generated, which is required + // when unwinding to locate the unwinding information. I'm not sure why this + // argument is *not* necessary for normal builds, but it can't hurt! + base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string()); + +- // There's a whole bunch of circular dependencies when dealing with MUSL +- // unfortunately. To put this in perspective libc is statically linked to +- // liblibc and libunwind is statically linked to libstd: +- // +- // * libcore depends on `fmod` which is in libc (transitively in liblibc). +- // liblibc, however, depends on libcore. +- // * compiler-rt has personality symbols that depend on libunwind, but +- // libunwind is in libstd which depends on compiler-rt. +- // +- // Recall that linkers discard libraries and object files as much as +- // possible, and with all the static linking and archives flying around with +- // MUSL the linker is super aggressively stripping out objects. For example +- // the first case has fmod stripped from liblibc (it's in its own object +- // file) so it's not there when libcore needs it. In the second example all +- // the unused symbols from libunwind are stripped (each is in its own object +- // file in libstd) before we end up linking compiler-rt which depends on +- // those symbols. +- // +- // To deal with these circular dependencies we just force the compiler to +- // link everything as a group, not stripping anything out until everything +- // is processed. The linker will still perform a pass to strip out object +- // files but it won't do so until all objects/archives have been processed. +- base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,-(".to_string()); +- base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-Wl,-)".to_string()]); +- +- // When generating a statically linked executable there's generally some +- // small setup needed which is listed in these files. These are provided by +- // a musl toolchain and are linked by default by the `musl-gcc` script. Note +- // that `gcc` also does this by default, it just uses some different files. +- // +- // Each target directory for musl has these object files included in it so +- // they'll be included from there. +- base.pre_link_objects_exe_crt.push("crt1.o".to_string()); +- base.pre_link_objects_exe_crt.push("crti.o".to_string()); +- base.post_link_objects_crt.push("crtn.o".to_string()); +- + // These targets statically link libc by default + base.crt_static_default = true; + // These targets allow the user to choose between static and dynamic linking. +-- +2.18.0 + diff --git a/user/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/user/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch new file mode 100644 index 000000000..5a2b6c422 --- /dev/null +++ b/user/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch @@ -0,0 +1,24 @@ +From e3b90583112fd59255406f245db1856e0c21dab3 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sat, 9 Sep 2017 00:14:16 -0500 +Subject: [PATCH 06/29] Prefer libgcc_eh over libunwind for musl + +--- + src/libunwind/lib.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs +index 2b3c19c067..8233beada0 100644 +--- a/src/libunwind/lib.rs ++++ b/src/libunwind/lib.rs +@@ -35,6 +35,6 @@ cfg_if! { + } + + #[cfg(target_env = "musl")] +-#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))] ++#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))] + #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))] + extern {} +-- +2.18.0 + diff --git a/user/rust/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch b/user/rust/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch new file mode 100644 index 000000000..745c5a45f --- /dev/null +++ b/user/rust/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch @@ -0,0 +1,37 @@ +From d77940e640855aed389af02a95db7958375785e1 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sun, 16 Sep 2018 16:40:04 +0000 +Subject: [PATCH 07/29] runtest: Fix proc-macro tests on musl hosts + +--- + src/tools/compiletest/src/runtest.rs | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs +index ce7828144c..ec48fd2d85 100644 +--- a/src/tools/compiletest/src/runtest.rs ++++ b/src/tools/compiletest/src/runtest.rs +@@ -1509,7 +1509,6 @@ impl<'test> TestCx<'test> { + None + } else if self.config.target.contains("cloudabi") + || self.config.target.contains("emscripten") +- || (self.config.target.contains("musl") && !aux_props.force_host) + || self.config.target.contains("wasm32") + { + // We primarily compile all auxiliary libraries as dynamic libraries +@@ -1517,10 +1516,8 @@ impl<'test> TestCx<'test> { + // for the test suite (otherwise including libstd statically in all + // executables takes up quite a bit of space). + // +- // For targets like MUSL or Emscripten, however, there is no support for +- // dynamic libraries so we just go back to building a normal library. Note, +- // however, that for MUSL if the library is built with `force_host` then +- // it's ok to be a dylib as the host should always support dylibs. ++ // For targets like Emscripten, however, there is no support for ++ // dynamic libraries so we just go back to building a normal library. + Some("lib") + } else { + Some("dylib") +-- +2.18.0 + diff --git a/user/rust/0008-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch b/user/rust/0008-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch new file mode 100644 index 000000000..a3caa20f5 --- /dev/null +++ b/user/rust/0008-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch @@ -0,0 +1,36 @@ +From 3028ae603ea6f08fd6bc1c64a7fe28628a1232e9 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sat, 2 Dec 2017 17:25:44 -0600 +Subject: [PATCH 08/29] Allow rustdoc to work when cross-compiling on musl + +musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH. +--- + src/bootstrap/bin/rustdoc.rs | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs +index a54e58665c..fc0cf940e2 100644 +--- a/src/bootstrap/bin/rustdoc.rs ++++ b/src/bootstrap/bin/rustdoc.rs +@@ -34,9 +34,6 @@ fn main() { + Err(_) => 0, + }; + +- let mut dylib_path = bootstrap::util::dylib_path(); +- dylib_path.insert(0, PathBuf::from(libdir.clone())); +- + let mut cmd = Command::new(rustdoc); + cmd.args(&args) + .arg("--cfg") +@@ -46,7 +43,7 @@ fn main() { + .arg("--sysroot") + .arg(sysroot) + .env(bootstrap::util::dylib_path_var(), +- env::join_paths(&dylib_path).unwrap()); ++ PathBuf::from(libdir.clone())); + + // Force all crates compiled by this compiler to (a) be unstable and (b) + // allow the `rustc_private` feature to link to other unstable crates +-- +2.18.0 + diff --git a/user/rust/0009-Add-missing-OpenSSL-configurations-for-musl-targets.patch b/user/rust/0009-Add-missing-OpenSSL-configurations-for-musl-targets.patch new file mode 100644 index 000000000..6ae697151 --- /dev/null +++ b/user/rust/0009-Add-missing-OpenSSL-configurations-for-musl-targets.patch @@ -0,0 +1,42 @@ +From 7595533dfe8121a2dcaec6de1653c3fb40349985 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Mon, 11 Sep 2017 11:21:56 -0500 +Subject: [PATCH 09/29] Add missing OpenSSL configurations for musl targets + +--- + src/bootstrap/native.rs | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs +index 9aeb4e0eda..18c3dba233 100644 +--- a/src/bootstrap/native.rs ++++ b/src/bootstrap/native.rs +@@ -610,9 +610,13 @@ impl Step for Openssl { + "arm-linux-androideabi" => "android", + "arm-unknown-linux-gnueabi" => "linux-armv4", + "arm-unknown-linux-gnueabihf" => "linux-armv4", ++ "arm-unknown-linux-musleabi" => "linux-armv4", ++ "arm-unknown-linux-musleabihf" => "linux-armv4", ++ "armv5te-unknown-linux-musleabi" => "linux-armv4", + "armv6-unknown-netbsd-eabihf" => "BSD-generic32", + "armv7-linux-androideabi" => "android-armv7", + "armv7-unknown-linux-gnueabihf" => "linux-armv4", ++ "armv7-unknown-linux-musleabihf" => "linux-armv4", + "armv7-unknown-netbsd-eabihf" => "BSD-generic32", + "i586-unknown-linux-gnu" => "linux-elf", + "i586-unknown-linux-musl" => "linux-elf", +@@ -623,9 +627,11 @@ impl Step for Openssl { + "i686-unknown-linux-musl" => "linux-elf", + "i686-unknown-netbsd" => "BSD-x86-elf", + "mips-unknown-linux-gnu" => "linux-mips32", ++ "mips-unknown-linux-musl" => "linux-mips32", + "mips64-unknown-linux-gnuabi64" => "linux64-mips64", + "mips64el-unknown-linux-gnuabi64" => "linux64-mips64", + "mipsel-unknown-linux-gnu" => "linux-mips32", ++ "mipsel-unknown-linux-musl" => "linux-mips32", + "powerpc-unknown-linux-gnu" => "linux-ppc", + "powerpc-unknown-linux-gnuspe" => "linux-ppc", + "powerpc-unknown-netbsd" => "BSD-generic32", +-- +2.18.0 + diff --git a/user/rust/0010-test-linkage-visibility-dlsym-only-sees-exported-sym.patch b/user/rust/0010-test-linkage-visibility-dlsym-only-sees-exported-sym.patch new file mode 100644 index 000000000..15f431e5a --- /dev/null +++ b/user/rust/0010-test-linkage-visibility-dlsym-only-sees-exported-sym.patch @@ -0,0 +1,26 @@ +From 289d2f3ceb6226c385f3784d310465f375dc0c00 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sun, 16 Sep 2018 16:35:41 +0000 +Subject: [PATCH 10/29] test/linkage-visibility: dlsym only sees exported + symbols + +--- + src/test/run-pass-fulldeps/auxiliary/linkage-visibility.rs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/test/run-pass-fulldeps/auxiliary/linkage-visibility.rs b/src/test/run-pass-fulldeps/auxiliary/linkage-visibility.rs +index 7a15a4cb3a..853d97670d 100644 +--- a/src/test/run-pass-fulldeps/auxiliary/linkage-visibility.rs ++++ b/src/test/run-pass-fulldeps/auxiliary/linkage-visibility.rs +@@ -8,6 +8,8 @@ + // option. This file may not be copied, modified, or distributed + // except according to those terms. + ++// compile-flags: -C link-arg=-Wl,--export-dynamic ++ + #![feature(rustc_private)] + + // We're testing linkage visibility; the compiler warns us, but we want to +-- +2.18.0 + diff --git a/user/rust/0011-test-invalid_const_promotion-Accept-SIGTRAP-as-a-val.patch b/user/rust/0011-test-invalid_const_promotion-Accept-SIGTRAP-as-a-val.patch new file mode 100644 index 000000000..58db71538 --- /dev/null +++ b/user/rust/0011-test-invalid_const_promotion-Accept-SIGTRAP-as-a-val.patch @@ -0,0 +1,25 @@ +From 097f992e9ef62963f5e938e9a21171253a72b36a Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sun, 16 Sep 2018 16:37:09 +0000 +Subject: [PATCH 11/29] test/invalid_const_promotion: Accept SIGTRAP as a valid + death signal + +--- + src/test/run-pass/invalid_const_promotion.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/test/run-pass/invalid_const_promotion.rs b/src/test/run-pass/invalid_const_promotion.rs +index 53cb4c4b00..dc4c0a51dd 100644 +--- a/src/test/run-pass/invalid_const_promotion.rs ++++ b/src/test/run-pass/invalid_const_promotion.rs +@@ -33,6 +33,7 @@ fn check_status(status: std::process::ExitStatus) + use std::os::unix::process::ExitStatusExt; + + assert!(status.signal() == Some(libc::SIGILL) ++ || status.signal() == Some(libc::SIGTRAP) + || status.signal() == Some(libc::SIGABRT)); + } + +-- +2.18.0 + diff --git a/user/rust/0015-flock-Fix-F_SETLK-F_SETLKW-on-32-bit-O_LARGEFILE.patch b/user/rust/0015-flock-Fix-F_SETLK-F_SETLKW-on-32-bit-O_LARGEFILE.patch new file mode 100644 index 000000000..de9661d3a --- /dev/null +++ b/user/rust/0015-flock-Fix-F_SETLK-F_SETLKW-on-32-bit-O_LARGEFILE.patch @@ -0,0 +1,27 @@ +From 9c13dec5a526a4a66dc45453ab1808ab9a1bb10b Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Tue, 9 Oct 2018 04:15:48 +0000 +Subject: [PATCH 15/29] flock: Fix F_SETLK/F_SETLKW on 32-bit O_LARGEFILE + +--- + src/librustc_data_structures/flock.rs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs +index ff1ebb11b7..d85017ec50 100644 +--- a/src/librustc_data_structures/flock.rs ++++ b/src/librustc_data_structures/flock.rs +@@ -46,8 +46,8 @@ mod imp { + pub const F_RDLCK: libc::c_short = 0; + pub const F_WRLCK: libc::c_short = 1; + pub const F_UNLCK: libc::c_short = 2; +- pub const F_SETLK: libc::c_int = 6; +- pub const F_SETLKW: libc::c_int = 7; ++ pub const F_SETLK: libc::c_int = libc::F_SETLK; ++ pub const F_SETLKW: libc::c_int = libc::F_SETLKW; + } + + #[cfg(target_os = "freebsd")] +-- +2.18.0 + diff --git a/user/rust/0016-Add-powerpc-unknown-linux-musl-target.patch b/user/rust/0016-Add-powerpc-unknown-linux-musl-target.patch new file mode 100644 index 000000000..1bafb8dd5 --- /dev/null +++ b/user/rust/0016-Add-powerpc-unknown-linux-musl-target.patch @@ -0,0 +1,92 @@ +From 763b30d1e146fc04f7de2a8b1d6b17dcd94e3e0f Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Mon, 10 Sep 2018 01:35:35 +0000 +Subject: [PATCH 16/29] Add powerpc-unknown-linux-musl target + +--- + src/bootstrap/native.rs | 1 + + src/librustc_target/spec/mod.rs | 1 + + .../spec/powerpc_unknown_linux_musl.rs | 34 +++++++++++++++++++ + src/tools/build-manifest/src/main.rs | 1 + + 4 files changed, 37 insertions(+) + create mode 100644 src/librustc_target/spec/powerpc_unknown_linux_musl.rs + +diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs +index 18c3dba233..7c32b8b546 100644 +--- a/src/bootstrap/native.rs ++++ b/src/bootstrap/native.rs +@@ -634,6 +634,7 @@ impl Step for Openssl { + "mipsel-unknown-linux-musl" => "linux-mips32", + "powerpc-unknown-linux-gnu" => "linux-ppc", + "powerpc-unknown-linux-gnuspe" => "linux-ppc", ++ "powerpc-unknown-linux-musl" => "linux-ppc", + "powerpc-unknown-netbsd" => "BSD-generic32", + "powerpc64-unknown-linux-gnu" => "linux-ppc64", + "powerpc64le-unknown-linux-gnu" => "linux-ppc64le", +diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs +index c5d21cdc46..f09e5a7465 100644 +--- a/src/librustc_target/spec/mod.rs ++++ b/src/librustc_target/spec/mod.rs +@@ -272,6 +272,7 @@ supported_targets! { + ("mipsel-unknown-linux-gnu", mipsel_unknown_linux_gnu), + ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu), + ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe), ++ ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl), + ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu), + ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu), + ("powerpc64le-unknown-linux-musl", powerpc64le_unknown_linux_musl), +diff --git a/src/librustc_target/spec/powerpc_unknown_linux_musl.rs b/src/librustc_target/spec/powerpc_unknown_linux_musl.rs +new file mode 100644 +index 0000000000..48340da514 +--- /dev/null ++++ b/src/librustc_target/spec/powerpc_unknown_linux_musl.rs +@@ -0,0 +1,34 @@ ++// Copyright 2018 The Rust Project Developers. See the COPYRIGHT ++// file at the top-level directory of this distribution and at ++// http://rust-lang.org/COPYRIGHT. ++// ++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your ++// option. This file may not be copied, modified, or distributed ++// except according to those terms. ++ ++use spec::{LinkerFlavor, Target, TargetResult}; ++ ++pub fn target() -> TargetResult { ++ let mut base = super::linux_musl_base::opts(); ++ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string()); ++ base.max_atomic_width = Some(32); ++ ++ // see #36994 ++ base.exe_allocation_crate = None; ++ ++ Ok(Target { ++ llvm_target: "powerpc-unknown-linux-musl".to_string(), ++ target_endian: "big".to_string(), ++ target_pointer_width: "32".to_string(), ++ target_c_int_width: "32".to_string(), ++ data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), ++ arch: "powerpc".to_string(), ++ target_os: "linux".to_string(), ++ target_env: "musl".to_string(), ++ target_vendor: "unknown".to_string(), ++ linker_flavor: LinkerFlavor::Gcc, ++ options: base, ++ }) ++} +diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs +index 83b2895e1d..7659d24f47 100644 +--- a/src/tools/build-manifest/src/main.rs ++++ b/src/tools/build-manifest/src/main.rs +@@ -86,6 +86,7 @@ static TARGETS: &'static [&'static str] = &[ + "mipsel-unknown-linux-musl", + "powerpc-unknown-linux-gnu", + "powerpc-unknown-linux-gnuspe", ++ "powerpc-unknown-linux-musl", + "powerpc64-unknown-linux-gnu", + "powerpc64le-unknown-linux-gnu", + "powerpc64le-unknown-linux-musl", +-- +2.18.0 + diff --git a/user/rust/0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch b/user/rust/0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch new file mode 100644 index 000000000..dd11dd568 --- /dev/null +++ b/user/rust/0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch @@ -0,0 +1,43 @@ +From e1214a04a9f8a30b67665ef353e3934e15e24a16 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Wed, 8 Aug 2018 22:06:18 -0500 +Subject: [PATCH 17/29] Use the ELFv2 ABI on powerpc64 musl + +--- + src/librustc_target/abi/call/powerpc64.rs | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/librustc_target/abi/call/powerpc64.rs b/src/librustc_target/abi/call/powerpc64.rs +index 0c5ec77a39..4851b25fe7 100644 +--- a/src/librustc_target/abi/call/powerpc64.rs ++++ b/src/librustc_target/abi/call/powerpc64.rs +@@ -14,6 +14,7 @@ + + use abi::call::{FnType, ArgType, Reg, RegKind, Uniform}; + use abi::{Align, Endian, HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods}; ++use spec::HasTargetSpec; + + #[derive(Debug, Clone, Copy, PartialEq)] + enum ABI { +@@ -136,11 +137,14 @@ fn classify_arg_ty<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>, abi: ABI) + + pub fn compute_abi_info<'a, Ty, C>(cx: C, fty: &mut FnType<'a, Ty>) + where Ty: TyLayoutMethods<'a, C> + Copy, +- C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout ++ C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec + { +- let abi = match cx.data_layout().endian { +- Endian::Big => ELFv1, +- Endian::Little => ELFv2, ++ let abi = match cx.target_spec().target_env { ++ "musl" => ELFv2, ++ _ => match cx.data_layout().endian { ++ Endian::Big => ELFv1, ++ Endian::Little => ELFv2 ++ } + }; + + if !fty.ret.is_ignore() { +-- +2.18.0 + diff --git a/user/rust/0018-Fix-powerpc64-ELFv2-big-endian-struct-passing-ABI.patch b/user/rust/0018-Fix-powerpc64-ELFv2-big-endian-struct-passing-ABI.patch new file mode 100644 index 000000000..d1a6daa16 --- /dev/null +++ b/user/rust/0018-Fix-powerpc64-ELFv2-big-endian-struct-passing-ABI.patch @@ -0,0 +1,93 @@ +From c99f30986f8486cc24dda5630b685dd932d510d4 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sun, 16 Sep 2018 16:34:15 +0000 +Subject: [PATCH 18/29] Fix powerpc64 ELFv2 big-endian struct-passing ABI + +The requirements here are not "ELFv1" requirements, but big-endian +requirements, as the extension or non-extension of the argument is +necessary to put the argument in the correct half of the register. +Parameter passing in the ELFv2 ABI needs these same transformations. +Since this code makes no difference on little-endian machines, simplify +it to use the same code path everywhere. +--- + src/librustc_target/abi/call/powerpc64.rs | 36 ++++++++++------------- + src/librustc_target/abi/mod.rs | 2 +- + 2 files changed, 17 insertions(+), 21 deletions(-) + +diff --git a/src/librustc_target/abi/call/powerpc64.rs b/src/librustc_target/abi/call/powerpc64.rs +index 4851b25fe7..9e616c034e 100644 +--- a/src/librustc_target/abi/call/powerpc64.rs ++++ b/src/librustc_target/abi/call/powerpc64.rs +@@ -76,7 +76,9 @@ fn classify_ret_ty<'a, Ty, C>(cx: C, ret: &mut ArgType<'a, Ty>, abi: ABI) + let size = ret.layout.size; + let bits = size.bits(); + if bits <= 128 { +- let unit = if bits <= 8 { ++ let unit = if cx.data_layout().endian == Endian::Big { ++ Reg { kind: RegKind::Integer, size } ++ } else if bits <= 8 { + Reg::i8() + } else if bits <= 16 { + Reg::i16() +@@ -111,22 +113,15 @@ fn classify_arg_ty<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>, abi: ABI) + } + + let size = arg.layout.size; +- let (unit, total) = match abi { +- ELFv1 => { +- // In ELFv1, aggregates smaller than a doubleword should appear in +- // the least-significant bits of the parameter doubleword. The rest +- // should be padded at their tail to fill out multiple doublewords. +- if size.bits() <= 64 { +- (Reg { kind: RegKind::Integer, size }, size) +- } else { +- let align = Align::from_bits(64, 64).unwrap(); +- (Reg::i64(), size.abi_align(align)) +- } +- }, +- ELFv2 => { +- // In ELFv2, we can just cast directly. +- (Reg::i64(), size) +- }, ++ let (unit, total) = if size.bits() <= 64 { ++ // Aggregates smaller than a doubleword should appear in ++ // the least-significant bits of the parameter doubleword. ++ (Reg { kind: RegKind::Integer, size }, size) ++ } else { ++ // Aggregates larger than a doubleword should be padded ++ // at the tail to fill out a whole number of doublewords. ++ let align = Align::from_bits(64, 64).unwrap(); ++ (Reg::i64(), size.abi_align(align)) + }; + + arg.cast_to(Uniform { +@@ -139,9 +134,10 @@ pub fn compute_abi_info<'a, Ty, C>(cx: C, fty: &mut FnType<'a, Ty>) + where Ty: TyLayoutMethods<'a, C> + Copy, + C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec + { +- let abi = match cx.target_spec().target_env { +- "musl" => ELFv2, +- _ => match cx.data_layout().endian { ++ let abi = if cx.target_spec().target_env == "musl" { ++ ELFv2 ++ } else { ++ match cx.data_layout().endian { + Endian::Big => ELFv1, + Endian::Little => ELFv2 + } +diff --git a/src/librustc_target/abi/mod.rs b/src/librustc_target/abi/mod.rs +index dac4738e2b..35b1ceb967 100644 +--- a/src/librustc_target/abi/mod.rs ++++ b/src/librustc_target/abi/mod.rs +@@ -214,7 +214,7 @@ impl<'a> HasDataLayout for &'a TargetDataLayout { + } + + /// Endianness of the target, which must match cfg(target-endian). +-#[derive(Copy, Clone)] ++#[derive(Copy, Clone, PartialEq)] + pub enum Endian { + Little, + Big +-- +2.18.0 + diff --git a/user/rust/0019-Add-powerpc64-unknown-linux-musl-target.patch b/user/rust/0019-Add-powerpc64-unknown-linux-musl-target.patch new file mode 100644 index 000000000..de0f2bc82 --- /dev/null +++ b/user/rust/0019-Add-powerpc64-unknown-linux-musl-target.patch @@ -0,0 +1,118 @@ +From 914179b27fdabbbd42da8206f46621a006e54180 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Tue, 7 Aug 2018 21:59:15 -0500 +Subject: [PATCH 19/29] Add powerpc64-unknown-linux-musl target + +--- + src/bootstrap/native.rs | 5 +++ + src/librustc_target/abi/call/powerpc64.rs | 2 +- + src/librustc_target/spec/mod.rs | 1 + + .../spec/powerpc64_unknown_linux_musl.rs | 35 +++++++++++++++++++ + src/tools/build-manifest/src/main.rs | 1 + + 5 files changed, 43 insertions(+), 1 deletion(-) + create mode 100644 src/librustc_target/spec/powerpc64_unknown_linux_musl.rs + +diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs +index 7c32b8b546..186ef75189 100644 +--- a/src/bootstrap/native.rs ++++ b/src/bootstrap/native.rs +@@ -637,6 +637,7 @@ impl Step for Openssl { + "powerpc-unknown-linux-musl" => "linux-ppc", + "powerpc-unknown-netbsd" => "BSD-generic32", + "powerpc64-unknown-linux-gnu" => "linux-ppc64", ++ "powerpc64-unknown-linux-musl" => "linux-ppc64", + "powerpc64le-unknown-linux-gnu" => "linux-ppc64le", + "powerpc64le-unknown-linux-musl" => "linux-ppc64le", + "s390x-unknown-linux-gnu" => "linux64-s390x", +@@ -664,6 +665,10 @@ impl Step for Openssl { + configure.arg("-mandroid"); + configure.arg("-fomit-frame-pointer"); + } ++ // OpenSSL ships incompatible ELFv1 ABI assembly code ++ if target == "powerpc64-unknown-linux-musl" { ++ configure.arg("no-asm"); ++ } + if target == "sparc64-unknown-netbsd" { + // Need -m64 to get assembly generated correctly for sparc64. + configure.arg("-m64"); +diff --git a/src/librustc_target/abi/call/powerpc64.rs b/src/librustc_target/abi/call/powerpc64.rs +index 9e616c034e..18d14495e2 100644 +--- a/src/librustc_target/abi/call/powerpc64.rs ++++ b/src/librustc_target/abi/call/powerpc64.rs +@@ -19,7 +19,7 @@ use spec::HasTargetSpec; + #[derive(Debug, Clone, Copy, PartialEq)] + enum ABI { + ELFv1, // original ABI used for powerpc64 (big-endian) +- ELFv2, // newer ABI used for powerpc64le ++ ELFv2, // newer ABI used for powerpc64le and musl (both endians) + } + use self::ABI::*; + +diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs +index f09e5a7465..94aa07abb6 100644 +--- a/src/librustc_target/spec/mod.rs ++++ b/src/librustc_target/spec/mod.rs +@@ -274,6 +274,7 @@ supported_targets! { + ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe), + ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl), + ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu), ++ ("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl), + ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu), + ("powerpc64le-unknown-linux-musl", powerpc64le_unknown_linux_musl), + ("s390x-unknown-linux-gnu", s390x_unknown_linux_gnu), +diff --git a/src/librustc_target/spec/powerpc64_unknown_linux_musl.rs b/src/librustc_target/spec/powerpc64_unknown_linux_musl.rs +new file mode 100644 +index 0000000000..24ff9e0ecd +--- /dev/null ++++ b/src/librustc_target/spec/powerpc64_unknown_linux_musl.rs +@@ -0,0 +1,35 @@ ++// Copyright 2018 The Rust Project Developers. See the COPYRIGHT ++// file at the top-level directory of this distribution and at ++// http://rust-lang.org/COPYRIGHT. ++// ++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your ++// option. This file may not be copied, modified, or distributed ++// except according to those terms. ++ ++use spec::{LinkerFlavor, Target, TargetResult}; ++ ++pub fn target() -> TargetResult { ++ let mut base = super::linux_musl_base::opts(); ++ base.cpu = "ppc64".to_string(); ++ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string()); ++ base.max_atomic_width = Some(64); ++ ++ // see #36994 ++ base.exe_allocation_crate = None; ++ ++ Ok(Target { ++ llvm_target: "powerpc64-unknown-linux-musl".to_string(), ++ target_endian: "big".to_string(), ++ target_pointer_width: "64".to_string(), ++ target_c_int_width: "32".to_string(), ++ data_layout: "E-m:e-i64:64-n32:64".to_string(), ++ arch: "powerpc64".to_string(), ++ target_os: "linux".to_string(), ++ target_env: "musl".to_string(), ++ target_vendor: "unknown".to_string(), ++ linker_flavor: LinkerFlavor::Gcc, ++ options: base, ++ }) ++} +diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs +index 7659d24f47..e20f9fe216 100644 +--- a/src/tools/build-manifest/src/main.rs ++++ b/src/tools/build-manifest/src/main.rs +@@ -88,6 +88,7 @@ static TARGETS: &'static [&'static str] = &[ + "powerpc-unknown-linux-gnuspe", + "powerpc-unknown-linux-musl", + "powerpc64-unknown-linux-gnu", ++ "powerpc64-unknown-linux-musl", + "powerpc64le-unknown-linux-gnu", + "powerpc64le-unknown-linux-musl", + "s390x-unknown-linux-gnu", +-- +2.18.0 + diff --git a/user/rust/0020-run-pass-const-endianness-negate-before-to_le.patch b/user/rust/0020-run-pass-const-endianness-negate-before-to_le.patch new file mode 100644 index 000000000..151b3f419 --- /dev/null +++ b/user/rust/0020-run-pass-const-endianness-negate-before-to_le.patch @@ -0,0 +1,29 @@ +From 72c7e78b400c1ad96d84b254b51dcc9f2baea3e1 Mon Sep 17 00:00:00 2001 +From: Josh Stone <jistone@redhat.com> +Date: Mon, 30 Jul 2018 13:08:56 -0700 +Subject: [PATCH 20/29] run-pass/const-endianness: negate before to_le() + +`const LE_I128` needs parentheses to negate the value *before* calling +`to_le()`, otherwise it doesn't match the operations performed in the +black-boxed part of the test. This only makes a tangible difference on +big-endian targets. +--- + src/test/run-pass/const-endianess.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/test/run-pass/const-endianess.rs b/src/test/run-pass/const-endianess.rs +index fa34b49210..95c738d3ec 100644 +--- a/src/test/run-pass/const-endianess.rs ++++ b/src/test/run-pass/const-endianess.rs +@@ -25,7 +25,7 @@ fn main() { + #[cfg(not(target_arch = "asmjs"))] + { + const BE_U128: u128 = 999999u128.to_be(); +- const LE_I128: i128 = -999999i128.to_le(); ++ const LE_I128: i128 = (-999999i128).to_le(); + assert_eq!(BE_U128, b(999999u128).to_be()); + assert_eq!(LE_I128, b(-999999i128).to_le()); + } +-- +2.18.0 + diff --git a/user/rust/0021-Fix-double_check-tests-on-big-endian-targets.patch b/user/rust/0021-Fix-double_check-tests-on-big-endian-targets.patch new file mode 100644 index 000000000..720db7d10 --- /dev/null +++ b/user/rust/0021-Fix-double_check-tests-on-big-endian-targets.patch @@ -0,0 +1,75 @@ +From 55549ca3d760200dc6037fecc7e5b8816558c5b1 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sun, 16 Sep 2018 16:37:58 +0000 +Subject: [PATCH 21/29] Fix double_check tests on big-endian targets + +Since the enums get optimized down to 1 byte long, the bits +set in the usize member don't align with the enums on big-endian +machines. Avoid this issue by shrinking the integer member to the +same size as the enums. +--- + src/test/ui/const-eval/double_check.rs | 8 ++++---- + src/test/ui/const-eval/double_check2.rs | 8 ++++---- + src/test/ui/const-eval/double_check2.stderr | 4 ++-- + 3 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/test/ui/const-eval/double_check.rs b/src/test/ui/const-eval/double_check.rs +index 81f6e7ddd2..76f9276c05 100644 +--- a/src/test/ui/const-eval/double_check.rs ++++ b/src/test/ui/const-eval/double_check.rs +@@ -21,12 +21,12 @@ enum Bar { + union Union { + foo: &'static Foo, + bar: &'static Bar, +- usize: &'static usize, ++ u8: &'static u8, + } +-static BAR: usize = 42; ++static BAR: u8 = 42; + static FOO: (&Foo, &Bar) = unsafe {( +- Union { usize: &BAR }.foo, +- Union { usize: &BAR }.bar, ++ Union { u8: &BAR }.foo, ++ Union { u8: &BAR }.bar, + )}; + + fn main() {} +diff --git a/src/test/ui/const-eval/double_check2.rs b/src/test/ui/const-eval/double_check2.rs +index b661ee9247..701632362c 100644 +--- a/src/test/ui/const-eval/double_check2.rs ++++ b/src/test/ui/const-eval/double_check2.rs +@@ -19,12 +19,12 @@ enum Bar { + union Union { + foo: &'static Foo, + bar: &'static Bar, +- usize: &'static usize, ++ u8: &'static u8, + } +-static BAR: usize = 5; ++static BAR: u8 = 5; + static FOO: (&Foo, &Bar) = unsafe {( //~ undefined behavior +- Union { usize: &BAR }.foo, +- Union { usize: &BAR }.bar, ++ Union { u8: &BAR }.foo, ++ Union { u8: &BAR }.bar, + )}; + + fn main() {} +diff --git a/src/test/ui/const-eval/double_check2.stderr b/src/test/ui/const-eval/double_check2.stderr +index 2a0a674e23..d0f44a627b 100644 +--- a/src/test/ui/const-eval/double_check2.stderr ++++ b/src/test/ui/const-eval/double_check2.stderr +@@ -2,8 +2,8 @@ error[E0080]: this static likely exhibits undefined behavior + --> $DIR/double_check2.rs:25:1 + | + LL | / static FOO: (&Foo, &Bar) = unsafe {( //~ undefined behavior +-LL | | Union { usize: &BAR }.foo, +-LL | | Union { usize: &BAR }.bar, ++LL | | Union { u8: &BAR }.foo, ++LL | | Union { u8: &BAR }.bar, + LL | | )}; + | |___^ type validation failed: encountered 5 at (*.1).TAG, but expected something in the range 42..=99 + | +-- +2.18.0 + diff --git a/user/rust/0022-x.py-Use-python3-instead-of-python.patch b/user/rust/0022-x.py-Use-python3-instead-of-python.patch new file mode 100644 index 000000000..e23de6cef --- /dev/null +++ b/user/rust/0022-x.py-Use-python3-instead-of-python.patch @@ -0,0 +1,22 @@ +From 2a14cfeafd57037b4063e411f8e90f09bbe29fa4 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Mon, 10 Sep 2018 01:36:00 +0000 +Subject: [PATCH 22/29] x.py: Use python3 instead of python + +--- + x.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/x.py b/x.py +index e277ab98be..a75176a3f9 100755 +--- a/x.py ++++ b/x.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # Copyright 2016 The Rust Project Developers. See the COPYRIGHT + # file at the top-level directory of this distribution and at + # http://rust-lang.org/COPYRIGHT. +-- +2.18.0 + diff --git a/user/rust/0023-test-target-feature-gate-Only-run-on-relevant-target.patch b/user/rust/0023-test-target-feature-gate-Only-run-on-relevant-target.patch new file mode 100644 index 000000000..0bfa28fe9 --- /dev/null +++ b/user/rust/0023-test-target-feature-gate-Only-run-on-relevant-target.patch @@ -0,0 +1,37 @@ +From beb589601f0ca9dd762aaa9f52a440bbef68e943 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sun, 16 Sep 2018 16:39:46 +0000 +Subject: [PATCH 23/29] test/target-feature-gate: Only run on relevant targets + +--- + src/test/ui/target-feature-gate.rs | 2 ++ + src/test/ui/target-feature-gate.stderr | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/test/ui/target-feature-gate.rs b/src/test/ui/target-feature-gate.rs +index 69208f1513..59c5708b0c 100644 +--- a/src/test/ui/target-feature-gate.rs ++++ b/src/test/ui/target-feature-gate.rs +@@ -10,6 +10,8 @@ + + // ignore-arm + // ignore-aarch64 ++// ignore-powerpc ++// ignore-powerpc64 + // ignore-wasm + // ignore-emscripten + // gate-test-sse4a_target_feature +diff --git a/src/test/ui/target-feature-gate.stderr b/src/test/ui/target-feature-gate.stderr +index a6f794a1a1..24141d0064 100644 +--- a/src/test/ui/target-feature-gate.stderr ++++ b/src/test/ui/target-feature-gate.stderr +@@ -1,5 +1,5 @@ + error[E0658]: the target feature `avx512bw` is currently unstable (see issue #44839) +- --> $DIR/target-feature-gate.rs:26:18 ++ --> $DIR/target-feature-gate.rs:28:18 + | + LL | #[target_feature(enable = "avx512bw")] + | ^^^^^^^^^^^^^^^^^^^ +-- +2.18.0 + diff --git a/user/rust/0024-test-use-extern-for-plugins-Don-t-assume-multilib.patch b/user/rust/0024-test-use-extern-for-plugins-Don-t-assume-multilib.patch new file mode 100644 index 000000000..c033bb558 --- /dev/null +++ b/user/rust/0024-test-use-extern-for-plugins-Don-t-assume-multilib.patch @@ -0,0 +1,30 @@ +From 0fbfd4524768afad009e8e94c8824adfd7bd3b00 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sat, 6 Oct 2018 04:01:48 +0000 +Subject: [PATCH 24/29] test/use-extern-for-plugins: Don't assume multilib + +--- + src/test/run-make-fulldeps/use-extern-for-plugins/Makefile | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile +index cc7bc176f4..36553f1e44 100644 +--- a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile ++++ b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile +@@ -4,12 +4,7 @@ SKIP_OS := 'FreeBSD OpenBSD Bitrig SunOS' + + ifneq ($(UNAME),$(findstring $(UNAME),$(SKIP_OS))) + +-HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //') +-ifeq ($(findstring i686,$(HOST)),i686) +-TARGET := $(subst i686,x86_64,$(HOST)) +-else +-TARGET := $(subst x86_64,i686,$(HOST)) +-endif ++TARGET := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //') + + all: + $(RUSTC) foo.rs -C extra-filename=-host +-- +2.18.0 + diff --git a/user/rust/0025-Ignore-broken-and-non-applicable-tests.patch b/user/rust/0025-Ignore-broken-and-non-applicable-tests.patch new file mode 100644 index 000000000..12c3e46dd --- /dev/null +++ b/user/rust/0025-Ignore-broken-and-non-applicable-tests.patch @@ -0,0 +1,48 @@ +From 72a9bf3841f3c07db121f6d41ccd448d73aa1c01 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sun, 16 Sep 2018 16:38:48 +0000 +Subject: [PATCH 25/29] Ignore broken and non-applicable tests + +long-linker-command-lines: takes >10 minutes to run (but still passes) +sparc-struct-abi: no sparc target +sysroot-crates-are-unstable: can't run rustc without rpath +--- + src/test/codegen/sparc-struct-abi.rs | 1 + + src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 1 - + src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 +- + 3 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs +index d3b7a5cd59..5e0f94cdf9 100644 +--- a/src/test/codegen/sparc-struct-abi.rs ++++ b/src/test/codegen/sparc-struct-abi.rs +@@ -12,6 +12,7 @@ + // See issue #52638. + + // compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib ++// ignore-test + #![feature(no_core, lang_items)] + #![no_core] + +diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile +index 5876fbc94b..e9f5c33b77 100644 +--- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile ++++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile +@@ -2,4 +2,3 @@ + + all: + $(RUSTC) foo.rs -g -O +- RUSTC="$(RUSTC_ORIGINAL)" $(call RUN,foo) +diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile +index 9e77070685..7784230b46 100644 +--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile ++++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile +@@ -1,4 +1,4 @@ + -include ../tools.mk + + all: +- env '$(HOST_RPATH_ENV)' python2.7 test.py ++ true +-- +2.18.0 + diff --git a/user/rust/0026-Link-stage-2-tools-dynamically-to-libstd.patch b/user/rust/0026-Link-stage-2-tools-dynamically-to-libstd.patch new file mode 100644 index 000000000..ffd3e8342 --- /dev/null +++ b/user/rust/0026-Link-stage-2-tools-dynamically-to-libstd.patch @@ -0,0 +1,27 @@ +From 29df88cb3f1bdaac8e6a0049f8f1c1e335954509 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Mon, 24 Sep 2018 23:42:23 +0000 +Subject: [PATCH 26/29] Link stage 2 tools dynamically to libstd + +--- + src/bootstrap/tool.rs | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs +index 5e68b797b3..6a4c53f9a1 100644 +--- a/src/bootstrap/tool.rs ++++ b/src/bootstrap/tool.rs +@@ -261,7 +261,9 @@ pub fn prepare_tool_cargo( + + // We don't want to build tools dynamically as they'll be running across + // stages and such and it's just easier if they're not dynamically linked. +- cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); ++ if compiler.stage < 2 { ++ cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); ++ } + + if source_type == SourceType::Submodule { + cargo.env("RUSTC_EXTERNAL_TOOL", "1"); +-- +2.18.0 + diff --git a/user/rust/0027-Move-debugger-scripts-to-usr-share-rust.patch b/user/rust/0027-Move-debugger-scripts-to-usr-share-rust.patch new file mode 100644 index 000000000..81c649eaf --- /dev/null +++ b/user/rust/0027-Move-debugger-scripts-to-usr-share-rust.patch @@ -0,0 +1,53 @@ +From d8c25e109fbf44a3dc18ae0ea8da50cc6ee6b312 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Mon, 17 Sep 2018 02:09:10 +0000 +Subject: [PATCH 27/29] Move debugger scripts to /usr/share/rust + +--- + src/bootstrap/dist.rs | 2 +- + src/etc/rust-gdb | 2 +- + src/etc/rust-lldb | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs +index c6b39a52ae..ca21e87c9d 100644 +--- a/src/bootstrap/dist.rs ++++ b/src/bootstrap/dist.rs +@@ -575,7 +575,7 @@ impl Step for DebuggerScripts { + fn run(self, builder: &Builder) { + let host = self.host; + let sysroot = self.sysroot; +- let dst = sysroot.join("lib/rustlib/etc"); ++ let dst = sysroot.join("share/rust"); + t!(fs::create_dir_all(&dst)); + let cp_debugger_script = |file: &str| { + builder.install(&builder.src.join("src/etc/").join(file), &dst, 0o644); +diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb +index 6835d6aa90..dbdee6af31 100755 +--- a/src/etc/rust-gdb ++++ b/src/etc/rust-gdb +@@ -14,7 +14,7 @@ set -e + + # Find out where the pretty printer Python module is + RUSTC_SYSROOT=`rustc --print=sysroot` +-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc" ++GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust" + + # Run GDB with the additional arguments that load the pretty printers + # Set the environment variable `RUST_GDB` to overwrite the call to a +diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb +index f70ab65bce..621546bd3f 100755 +--- a/src/etc/rust-lldb ++++ b/src/etc/rust-lldb +@@ -33,7 +33,7 @@ trap "rm -f $TMPFILE; exit" INT TERM EXIT + RUSTC_SYSROOT=`rustc --print sysroot` + + # Write the LLDB script to the tempfile +-echo "command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\"" >> $TMPFILE ++echo "command script import \"$RUSTC_SYSROOT/share/rust/lldb_rust_formatters.py\"" >> $TMPFILE + echo "type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust" >> $TMPFILE + echo "type category enable Rust" >> $TMPFILE + +-- +2.18.0 + diff --git a/user/rust/0028-Add-foxkit-target-specs.patch b/user/rust/0028-Add-foxkit-target-specs.patch new file mode 100644 index 000000000..46a255a3c --- /dev/null +++ b/user/rust/0028-Add-foxkit-target-specs.patch @@ -0,0 +1,240 @@ +From a6da366371be1d8a1c55de52d9a53f93b9951cd0 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Mon, 17 Sep 2018 02:29:06 +0000 +Subject: [PATCH 28/29] Add foxkit target specs + +--- + src/bootstrap/native.rs | 10 +++++++-- + .../spec/aarch64_foxkit_linux_musl.rs | 21 +++++++++++++++++++ + .../spec/armv7_foxkit_linux_musleabihf.rs | 21 +++++++++++++++++++ + .../spec/i586_foxkit_linux_musl.rs | 21 +++++++++++++++++++ + src/librustc_target/spec/mod.rs | 7 +++++++ + .../spec/powerpc64_foxkit_linux_musl.rs | 21 +++++++++++++++++++ + .../spec/powerpc_foxkit_linux_musl.rs | 21 +++++++++++++++++++ + .../spec/x86_64_foxkit_linux_musl.rs | 21 +++++++++++++++++++ + 8 files changed, 141 insertions(+), 2 deletions(-) + create mode 100644 src/librustc_target/spec/aarch64_foxkit_linux_musl.rs + create mode 100644 src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs + create mode 100644 src/librustc_target/spec/i586_foxkit_linux_musl.rs + create mode 100644 src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs + create mode 100644 src/librustc_target/spec/powerpc_foxkit_linux_musl.rs + create mode 100644 src/librustc_target/spec/x86_64_foxkit_linux_musl.rs + +diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs +index 186ef75189..9122eeb785 100644 +--- a/src/bootstrap/native.rs ++++ b/src/bootstrap/native.rs +@@ -652,6 +652,12 @@ impl Step for Openssl { + "x86_64-unknown-linux-gnux32" => "linux-x32", + "x86_64-unknown-linux-musl" => "linux-x86_64", + "x86_64-unknown-netbsd" => "BSD-x86_64", ++ "aarch64-foxkit-linux-musl" => "linux-aarch64", ++ "armv7-foxkit-linux-musleabihf" => "linux-armv4", ++ "i586-foxkit-linux-musl" => "linux-elf", ++ "powerpc-foxkit-linux-musl" => "linux-ppc", ++ "powerpc64-foxkit-linux-musl" => "linux-ppc64", ++ "x86_64-foxkit-linux-musl" => "linux-x86_64", + _ => panic!("don't know how to configure OpenSSL for {}", target), + }; + configure.arg(os); +@@ -666,7 +672,7 @@ impl Step for Openssl { + configure.arg("-fomit-frame-pointer"); + } + // OpenSSL ships incompatible ELFv1 ABI assembly code +- if target == "powerpc64-unknown-linux-musl" { ++ if target == "powerpc64-unknown-linux-musl" || target == "powerpc64-foxkit-linux-musl" { + configure.arg("no-asm"); + } + if target == "sparc64-unknown-netbsd" { +@@ -681,7 +687,7 @@ impl Step for Openssl { + // Make PIE binaries + // Non-PIE linker support was removed in Lollipop + // https://source.android.com/security/enhancements/enhancements50 +- if target == "i686-linux-android" { ++ if target == "i686-linux-android" || target == "i586-foxkit-linux-musl" { + configure.arg("no-asm"); + } + configure.current_dir(&obj); +diff --git a/src/librustc_target/spec/aarch64_foxkit_linux_musl.rs b/src/librustc_target/spec/aarch64_foxkit_linux_musl.rs +new file mode 100644 +index 0000000000..18ad2c2f31 +--- /dev/null ++++ b/src/librustc_target/spec/aarch64_foxkit_linux_musl.rs +@@ -0,0 +1,21 @@ ++// Copyright 2018 The Rust Project Developers. See the COPYRIGHT ++// file at the top-level directory of this distribution and at ++// http://rust-lang.org/COPYRIGHT. ++// ++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your ++// option. This file may not be copied, modified, or distributed ++// except according to those terms. ++ ++use spec::TargetResult; ++ ++pub fn target() -> TargetResult { ++ let mut base = super::aarch64_unknown_linux_musl::target()?; ++ ++ base.llvm_target = "aarch64-foxkit-linux-musl".to_string(); ++ base.target_vendor = "foxkit".to_string(); ++ base.options.crt_static_default = false; ++ ++ Ok(base) ++} +diff --git a/src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs b/src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs +new file mode 100644 +index 0000000000..facfd5d363 +--- /dev/null ++++ b/src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs +@@ -0,0 +1,21 @@ ++// Copyright 2018 The Rust Project Developers. See the COPYRIGHT ++// file at the top-level directory of this distribution and at ++// http://rust-lang.org/COPYRIGHT. ++// ++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your ++// option. This file may not be copied, modified, or distributed ++// except according to those terms. ++ ++use spec::TargetResult; ++ ++pub fn target() -> TargetResult { ++ let mut base = super::armv7_unknown_linux_musleabihf::target()?; ++ ++ base.llvm_target = "armv7-foxkit-linux-musleabihf".to_string(); ++ base.target_vendor = "foxkit".to_string(); ++ base.options.crt_static_default = false; ++ ++ Ok(base) ++} +diff --git a/src/librustc_target/spec/i586_foxkit_linux_musl.rs b/src/librustc_target/spec/i586_foxkit_linux_musl.rs +new file mode 100644 +index 0000000000..cd6280e586 +--- /dev/null ++++ b/src/librustc_target/spec/i586_foxkit_linux_musl.rs +@@ -0,0 +1,21 @@ ++// Copyright 2018 The Rust Project Developers. See the COPYRIGHT ++// file at the top-level directory of this distribution and at ++// http://rust-lang.org/COPYRIGHT. ++// ++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your ++// option. This file may not be copied, modified, or distributed ++// except according to those terms. ++ ++use spec::TargetResult; ++ ++pub fn target() -> TargetResult { ++ let mut base = super::i586_unknown_linux_musl::target()?; ++ ++ base.llvm_target = "i586-foxkit-linux-musl".to_string(); ++ base.target_vendor = "foxkit".to_string(); ++ base.options.crt_static_default = false; ++ ++ Ok(base) ++} +diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs +index 94aa07abb6..1187afbb60 100644 +--- a/src/librustc_target/spec/mod.rs ++++ b/src/librustc_target/spec/mod.rs +@@ -375,6 +375,13 @@ supported_targets! { + ("armv7-unknown-cloudabi-eabihf", armv7_unknown_cloudabi_eabihf), + ("i686-unknown-cloudabi", i686_unknown_cloudabi), + ("x86_64-unknown-cloudabi", x86_64_unknown_cloudabi), ++ ++ ("aarch64-foxkit-linux-musl", aarch64_foxkit_linux_musl), ++ ("armv7-foxkit-linux-musleabihf", armv7_foxkit_linux_musleabihf), ++ ("i586-foxkit-linux-musl", i586_foxkit_linux_musl), ++ ("powerpc-foxkit-linux-musl", powerpc_foxkit_linux_musl), ++ ("powerpc64-foxkit-linux-musl", powerpc64_foxkit_linux_musl), ++ ("x86_64-foxkit-linux-musl", x86_64_foxkit_linux_musl), + } + + /// Everything `rustc` knows about how to compile for a specific target. +diff --git a/src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs b/src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs +new file mode 100644 +index 0000000000..b7202ee0fc +--- /dev/null ++++ b/src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs +@@ -0,0 +1,21 @@ ++// Copyright 2018 The Rust Project Developers. See the COPYRIGHT ++// file at the top-level directory of this distribution and at ++// http://rust-lang.org/COPYRIGHT. ++// ++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your ++// option. This file may not be copied, modified, or distributed ++// except according to those terms. ++ ++use spec::TargetResult; ++ ++pub fn target() -> TargetResult { ++ let mut base = super::powerpc64_unknown_linux_musl::target()?; ++ ++ base.llvm_target = "powerpc64-foxkit-linux-musl".to_string(); ++ base.target_vendor = "foxkit".to_string(); ++ base.options.crt_static_default = false; ++ ++ Ok(base) ++} +diff --git a/src/librustc_target/spec/powerpc_foxkit_linux_musl.rs b/src/librustc_target/spec/powerpc_foxkit_linux_musl.rs +new file mode 100644 +index 0000000000..4daa96d3ce +--- /dev/null ++++ b/src/librustc_target/spec/powerpc_foxkit_linux_musl.rs +@@ -0,0 +1,21 @@ ++// Copyright 2018 The Rust Project Developers. See the COPYRIGHT ++// file at the top-level directory of this distribution and at ++// http://rust-lang.org/COPYRIGHT. ++// ++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your ++// option. This file may not be copied, modified, or distributed ++// except according to those terms. ++ ++use spec::TargetResult; ++ ++pub fn target() -> TargetResult { ++ let mut base = super::powerpc_unknown_linux_musl::target()?; ++ ++ base.llvm_target = "powerpc-foxkit-linux-musl".to_string(); ++ base.target_vendor = "foxkit".to_string(); ++ base.options.crt_static_default = false; ++ ++ Ok(base) ++} +diff --git a/src/librustc_target/spec/x86_64_foxkit_linux_musl.rs b/src/librustc_target/spec/x86_64_foxkit_linux_musl.rs +new file mode 100644 +index 0000000000..801dd8d6f4 +--- /dev/null ++++ b/src/librustc_target/spec/x86_64_foxkit_linux_musl.rs +@@ -0,0 +1,21 @@ ++// Copyright 2018 The Rust Project Developers. See the COPYRIGHT ++// file at the top-level directory of this distribution and at ++// http://rust-lang.org/COPYRIGHT. ++// ++// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ++// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ++// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your ++// option. This file may not be copied, modified, or distributed ++// except according to those terms. ++ ++use spec::TargetResult; ++ ++pub fn target() -> TargetResult { ++ let mut base = super::x86_64_unknown_linux_musl::target()?; ++ ++ base.llvm_target = "x86_64-foxkit-linux-musl".to_string(); ++ base.target_vendor = "foxkit".to_string(); ++ base.options.crt_static_default = false; ++ ++ Ok(base) ++} +-- +2.18.0 + diff --git a/user/rust/0029-Work-around-libbacktrace-built-with-fstack-protector.patch b/user/rust/0029-Work-around-libbacktrace-built-with-fstack-protector.patch new file mode 100644 index 000000000..29a31508d --- /dev/null +++ b/user/rust/0029-Work-around-libbacktrace-built-with-fstack-protector.patch @@ -0,0 +1,47 @@ +From 22bb29c2b807180ed0522d9c930e14c327582571 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Sat, 6 Oct 2018 04:17:14 +0000 +Subject: [PATCH 29/29] Work around libbacktrace built with -fstack-protector + +On 32-bit x86 and ppc, gcc generates calls to __stack_chk_fail_local, +which must be a hidden function in every DSO. gcc provides the +implementation in libssp_nonshared. libbacktrace is built in hosted +mode, where Adelie's compiler enables -fstack-protector by default. +However, rustc passes -nodefaultlibs, inhibiting gcc from linking +libssp_nonshared. +--- + src/libpanic_unwind/Cargo.toml | 1 + + src/libpanic_unwind/build.rs | 10 ++++++++++ + 2 files changed, 11 insertions(+) + create mode 100644 src/libpanic_unwind/build.rs + +diff --git a/src/libpanic_unwind/Cargo.toml b/src/libpanic_unwind/Cargo.toml +index 74aaa4d5ae..c1b66aeefe 100644 +--- a/src/libpanic_unwind/Cargo.toml ++++ b/src/libpanic_unwind/Cargo.toml +@@ -1,5 +1,6 @@ + [package] + authors = ["The Rust Project Developers"] ++build = "build.rs" + name = "panic_unwind" + version = "0.0.0" + +diff --git a/src/libpanic_unwind/build.rs b/src/libpanic_unwind/build.rs +new file mode 100644 +index 0000000000..0d9a14b64c +--- /dev/null ++++ b/src/libpanic_unwind/build.rs +@@ -0,0 +1,10 @@ ++use std::env; ++ ++fn main() { ++ let target = env::var("TARGET").unwrap(); ++ match target.as_ref() { ++ "i586-foxkit-linux-musl" => println!("cargo:rustc-link-lib=ssp_nonshared"), ++ "powerpc-foxkit-linux-musl" => println!("cargo:rustc-link-lib=ssp_nonshared"), ++ _ => {}, ++ }; ++} +-- +2.18.0 + diff --git a/user/rust/0030-liblibc-linkage.patch b/user/rust/0030-liblibc-linkage.patch new file mode 100644 index 000000000..4daa0e48f --- /dev/null +++ b/user/rust/0030-liblibc-linkage.patch @@ -0,0 +1,17 @@ +diff --git a/src/liblibc/src/unix/mod.rs b/src/liblibc/src/unix/mod.rs +index 9c68178a..1ae270e9 100644 +--- a/src/liblibc/src/unix/mod.rs ++++ b/src/liblibc/src/unix/mod.rs +@@ -287,11 +287,7 @@ 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")] { +- #[cfg_attr(feature = "stdbuild", +- link(name = "c", kind = "static", +- cfg(target_feature = "crt-static")))] +- #[cfg_attr(feature = "stdbuild", +- link(name = "c", cfg(not(target_feature = "crt-static"))))] ++ #[link(name = "c")] + extern {} + } else if #[cfg(target_os = "emscripten")] { + #[link(name = "c")] diff --git a/user/rust/0031-liblibc-0163a7ce20b5.patch b/user/rust/0031-liblibc-0163a7ce20b5.patch new file mode 100644 index 000000000..6c2268a53 --- /dev/null +++ b/user/rust/0031-liblibc-0163a7ce20b5.patch @@ -0,0 +1,1343 @@ +From 0163a7ce20b5f4c8d8f725811e48e1f268b0253e Mon Sep 17 00:00:00 2001 +From: Marek Benc <dusxmt@gmx.com> +Date: Thu, 5 Jul 2018 15:51:38 +0200 +Subject: [PATCH] Add linux musl powerpc (32-bit) support + +--- + src/unix/notbsd/linux/musl/b32/arm.rs | 85 +++ + src/unix/notbsd/linux/musl/b32/mips.rs | 85 +++ + src/unix/notbsd/linux/musl/b32/mod.rs | 88 +-- + src/unix/notbsd/linux/musl/b32/powerpc.rs | 866 ++++++++++++++++++++++ + src/unix/notbsd/linux/musl/b32/x86.rs | 85 +++ + src/unix/notbsd/linux/musl/mod.rs | 3 +- + 6 files changed, 1127 insertions(+), 85 deletions(-) + create mode 100644 src/unix/notbsd/linux/musl/b32/powerpc.rs + +diff --git a/src/liblibc/src/unix/notbsd/linux/musl/b32/arm.rs b/src/liblibc/src/unix/notbsd/linux/musl/b32/arm.rs +index 22bf16c1fda..20fa33a3f77 100644 +--- a/src/liblibc/src/unix/notbsd/linux/musl/b32/arm.rs ++++ b/src/liblibc/src/unix/notbsd/linux/musl/b32/arm.rs +@@ -52,6 +52,18 @@ s! { + pub ss_size: ::size_t + } + ++ pub struct ipc_perm { ++ pub __ipc_perm_key: ::key_t, ++ pub uid: ::uid_t, ++ pub gid: ::gid_t, ++ pub cuid: ::uid_t, ++ pub cgid: ::gid_t, ++ pub mode: ::mode_t, ++ pub __seq: ::c_int, ++ __unused1: ::c_long, ++ __unused2: ::c_long ++ } ++ + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, +@@ -151,6 +163,9 @@ s! { + } + } + ++pub const SIGSTKSZ: ::size_t = 8192; ++pub const MINSIGSTKSZ: ::size_t = 2048; ++ + pub const O_DIRECT: ::c_int = 0x10000; + pub const O_DIRECTORY: ::c_int = 0x4000; + pub const O_NOFOLLOW: ::c_int = 0x8000; +@@ -165,6 +180,76 @@ pub const RLIMIT_NOFILE: ::c_int = 7; + pub const RLIMIT_AS: ::c_int = 9; + pub const RLIMIT_NPROC: ::c_int = 6; + pub const RLIMIT_MEMLOCK: ::c_int = 8; ++pub const RLIMIT_NLIMITS: ::c_int = 16; ++ ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++pub const CBAUD: ::tcflag_t = 0o0010017; ++pub const TAB1: ::c_int = 0x00000800; ++pub const TAB2: ::c_int = 0x00001000; ++pub const TAB3: ::c_int = 0x00001800; ++pub const CR1: ::c_int = 0x00000200; ++pub const CR2: ::c_int = 0x00000400; ++pub const CR3: ::c_int = 0x00000600; ++pub const FF1: ::c_int = 0x00008000; ++pub const BS1: ::c_int = 0x00002000; ++pub const VT1: ::c_int = 0x00004000; ++pub const VWERASE: usize = 14; ++pub const VREPRINT: usize = 12; ++pub const VSUSP: usize = 10; ++pub const VSTART: usize = 8; ++pub const VSTOP: usize = 9; ++pub const VDISCARD: usize = 13; ++pub const VTIME: usize = 5; ++pub const IXON: ::tcflag_t = 0x00000400; ++pub const IXOFF: ::tcflag_t = 0x00001000; ++pub const ONLCR: ::tcflag_t = 0x4; ++pub const CSIZE: ::tcflag_t = 0x00000030; ++pub const CS6: ::tcflag_t = 0x00000010; ++pub const CS7: ::tcflag_t = 0x00000020; ++pub const CS8: ::tcflag_t = 0x00000030; ++pub const CSTOPB: ::tcflag_t = 0x00000040; ++pub const CREAD: ::tcflag_t = 0x00000080; ++pub const PARENB: ::tcflag_t = 0x00000100; ++pub const PARODD: ::tcflag_t = 0x00000200; ++pub const HUPCL: ::tcflag_t = 0x00000400; ++pub const CLOCAL: ::tcflag_t = 0x00000800; ++pub const ECHOKE: ::tcflag_t = 0x00000800; ++pub const ECHOE: ::tcflag_t = 0x00000010; ++pub const ECHOK: ::tcflag_t = 0x00000020; ++pub const ECHONL: ::tcflag_t = 0x00000040; ++pub const ECHOPRT: ::tcflag_t = 0x00000400; ++pub const ECHOCTL: ::tcflag_t = 0x00000200; ++pub const ISIG: ::tcflag_t = 0x00000001; ++pub const ICANON: ::tcflag_t = 0x00000002; ++pub const PENDIN: ::tcflag_t = 0x00004000; ++pub const NOFLSH: ::tcflag_t = 0x00000080; ++pub const CIBAUD: ::tcflag_t = 0o02003600000; ++pub const CBAUDEX: ::tcflag_t = 0o010000; ++pub const VSWTC: usize = 7; ++pub const OLCUC: ::tcflag_t = 0o000002; ++pub const NLDLY: ::tcflag_t = 0o000400; ++pub const CRDLY: ::tcflag_t = 0o003000; ++pub const TABDLY: ::tcflag_t = 0o014000; ++pub const BSDLY: ::tcflag_t = 0o020000; ++pub const FFDLY: ::tcflag_t = 0o100000; ++pub const VTDLY: ::tcflag_t = 0o040000; ++pub const XTABS: ::tcflag_t = 0o014000; ++pub const B57600: ::speed_t = 0o010001; ++pub const B115200: ::speed_t = 0o010002; ++pub const B230400: ::speed_t = 0o010003; ++pub const B460800: ::speed_t = 0o010004; ++pub const B500000: ::speed_t = 0o010005; ++pub const B576000: ::speed_t = 0o010006; ++pub const B921600: ::speed_t = 0o010007; ++pub const B1000000: ::speed_t = 0o010010; ++pub const B1152000: ::speed_t = 0o010011; ++pub const B1500000: ::speed_t = 0o010012; ++pub const B2000000: ::speed_t = 0o010013; ++pub const B2500000: ::speed_t = 0o010014; ++pub const B3000000: ::speed_t = 0o010015; ++pub const B3500000: ::speed_t = 0o010016; ++pub const B4000000: ::speed_t = 0o010017; + + pub const O_APPEND: ::c_int = 1024; + pub const O_CREAT: ::c_int = 64; +diff --git a/src/liblibc/src/unix/notbsd/linux/musl/b32/mips.rs b/src/liblibc/src/unix/notbsd/linux/musl/b32/mips.rs +index 89231a0c751..bfde73c563d 100644 +--- a/src/liblibc/src/unix/notbsd/linux/musl/b32/mips.rs ++++ b/src/liblibc/src/unix/notbsd/linux/musl/b32/mips.rs +@@ -54,6 +54,18 @@ s! { + pub ss_flags: ::c_int, + } + ++ pub struct ipc_perm { ++ pub __ipc_perm_key: ::key_t, ++ pub uid: ::uid_t, ++ pub gid: ::gid_t, ++ pub cuid: ::uid_t, ++ pub cgid: ::gid_t, ++ pub mode: ::mode_t, ++ pub __seq: ::c_int, ++ __unused1: ::c_long, ++ __unused2: ::c_long ++ } ++ + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, +@@ -162,6 +174,9 @@ s! { + } + } + ++pub const SIGSTKSZ: ::size_t = 8192; ++pub const MINSIGSTKSZ: ::size_t = 2048; ++ + pub const O_DIRECT: ::c_int = 0o100000; + pub const O_DIRECTORY: ::c_int = 0o200000; + pub const O_NOFOLLOW: ::c_int = 0o400000; +@@ -176,6 +191,76 @@ pub const RLIMIT_NOFILE: ::c_int = 5; + pub const RLIMIT_AS: ::c_int = 6; + pub const RLIMIT_NPROC: ::c_int = 8; + pub const RLIMIT_MEMLOCK: ::c_int = 9; ++pub const RLIMIT_NLIMITS: ::c_int = 16; ++ ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++pub const CBAUD: ::tcflag_t = 0o0010017; ++pub const TAB1: ::c_int = 0x00000800; ++pub const TAB2: ::c_int = 0x00001000; ++pub const TAB3: ::c_int = 0x00001800; ++pub const CR1: ::c_int = 0x00000200; ++pub const CR2: ::c_int = 0x00000400; ++pub const CR3: ::c_int = 0x00000600; ++pub const FF1: ::c_int = 0x00008000; ++pub const BS1: ::c_int = 0x00002000; ++pub const VT1: ::c_int = 0x00004000; ++pub const VWERASE: usize = 14; ++pub const VREPRINT: usize = 12; ++pub const VSUSP: usize = 10; ++pub const VSTART: usize = 8; ++pub const VSTOP: usize = 9; ++pub const VDISCARD: usize = 13; ++pub const VTIME: usize = 5; ++pub const IXON: ::tcflag_t = 0x00000400; ++pub const IXOFF: ::tcflag_t = 0x00001000; ++pub const ONLCR: ::tcflag_t = 0x4; ++pub const CSIZE: ::tcflag_t = 0x00000030; ++pub const CS6: ::tcflag_t = 0x00000010; ++pub const CS7: ::tcflag_t = 0x00000020; ++pub const CS8: ::tcflag_t = 0x00000030; ++pub const CSTOPB: ::tcflag_t = 0x00000040; ++pub const CREAD: ::tcflag_t = 0x00000080; ++pub const PARENB: ::tcflag_t = 0x00000100; ++pub const PARODD: ::tcflag_t = 0x00000200; ++pub const HUPCL: ::tcflag_t = 0x00000400; ++pub const CLOCAL: ::tcflag_t = 0x00000800; ++pub const ECHOKE: ::tcflag_t = 0x00000800; ++pub const ECHOE: ::tcflag_t = 0x00000010; ++pub const ECHOK: ::tcflag_t = 0x00000020; ++pub const ECHONL: ::tcflag_t = 0x00000040; ++pub const ECHOPRT: ::tcflag_t = 0x00000400; ++pub const ECHOCTL: ::tcflag_t = 0x00000200; ++pub const ISIG: ::tcflag_t = 0x00000001; ++pub const ICANON: ::tcflag_t = 0x00000002; ++pub const PENDIN: ::tcflag_t = 0x00004000; ++pub const NOFLSH: ::tcflag_t = 0x00000080; ++pub const CIBAUD: ::tcflag_t = 0o02003600000; ++pub const CBAUDEX: ::tcflag_t = 0o010000; ++pub const VSWTC: usize = 7; ++pub const OLCUC: ::tcflag_t = 0o000002; ++pub const NLDLY: ::tcflag_t = 0o000400; ++pub const CRDLY: ::tcflag_t = 0o003000; ++pub const TABDLY: ::tcflag_t = 0o014000; ++pub const BSDLY: ::tcflag_t = 0o020000; ++pub const FFDLY: ::tcflag_t = 0o100000; ++pub const VTDLY: ::tcflag_t = 0o040000; ++pub const XTABS: ::tcflag_t = 0o014000; ++pub const B57600: ::speed_t = 0o010001; ++pub const B115200: ::speed_t = 0o010002; ++pub const B230400: ::speed_t = 0o010003; ++pub const B460800: ::speed_t = 0o010004; ++pub const B500000: ::speed_t = 0o010005; ++pub const B576000: ::speed_t = 0o010006; ++pub const B921600: ::speed_t = 0o010007; ++pub const B1000000: ::speed_t = 0o010010; ++pub const B1152000: ::speed_t = 0o010011; ++pub const B1500000: ::speed_t = 0o010012; ++pub const B2000000: ::speed_t = 0o010013; ++pub const B2500000: ::speed_t = 0o010014; ++pub const B3000000: ::speed_t = 0o010015; ++pub const B3500000: ::speed_t = 0o010016; ++pub const B4000000: ::speed_t = 0o010017; + + pub const O_APPEND: ::c_int = 0o010; + pub const O_CREAT: ::c_int = 0o400; +diff --git a/src/liblibc/src/unix/notbsd/linux/musl/b32/mod.rs b/src/liblibc/src/unix/notbsd/linux/musl/b32/mod.rs +index b4a0f761636..4128a8e4da6 100644 +--- a/src/liblibc/src/unix/notbsd/linux/musl/b32/mod.rs ++++ b/src/liblibc/src/unix/notbsd/linux/musl/b32/mod.rs +@@ -32,96 +32,13 @@ s! { + pub struct sem_t { + __val: [::c_int; 4], + } +- +- pub struct ipc_perm { +- pub __ipc_perm_key: ::key_t, +- pub uid: ::uid_t, +- pub gid: ::gid_t, +- pub cuid: ::uid_t, +- pub cgid: ::gid_t, +- pub mode: ::mode_t, +- pub __seq: ::c_int, +- __unused1: ::c_long, +- __unused2: ::c_long +- } + } + +-pub const SIGSTKSZ: ::size_t = 8192; +-pub const MINSIGSTKSZ: ::size_t = 2048; +- + pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; + pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; + +-pub const RLIMIT_NLIMITS: ::c_int = 16; + pub const TIOCINQ: ::c_int = ::FIONREAD; +-pub const MCL_CURRENT: ::c_int = 0x0001; +-pub const MCL_FUTURE: ::c_int = 0x0002; +-pub const CBAUD: ::tcflag_t = 0o0010017; +-pub const TAB1: ::c_int = 0x00000800; +-pub const TAB2: ::c_int = 0x00001000; +-pub const TAB3: ::c_int = 0x00001800; +-pub const CR1: ::c_int = 0x00000200; +-pub const CR2: ::c_int = 0x00000400; +-pub const CR3: ::c_int = 0x00000600; +-pub const FF1: ::c_int = 0x00008000; +-pub const BS1: ::c_int = 0x00002000; +-pub const VT1: ::c_int = 0x00004000; +-pub const VWERASE: usize = 14; +-pub const VREPRINT: usize = 12; +-pub const VSUSP: usize = 10; +-pub const VSTART: usize = 8; +-pub const VSTOP: usize = 9; +-pub const VDISCARD: usize = 13; +-pub const VTIME: usize = 5; +-pub const IXON: ::tcflag_t = 0x00000400; +-pub const IXOFF: ::tcflag_t = 0x00001000; +-pub const ONLCR: ::tcflag_t = 0x4; +-pub const CSIZE: ::tcflag_t = 0x00000030; +-pub const CS6: ::tcflag_t = 0x00000010; +-pub const CS7: ::tcflag_t = 0x00000020; +-pub const CS8: ::tcflag_t = 0x00000030; +-pub const CSTOPB: ::tcflag_t = 0x00000040; +-pub const CREAD: ::tcflag_t = 0x00000080; +-pub const PARENB: ::tcflag_t = 0x00000100; +-pub const PARODD: ::tcflag_t = 0x00000200; +-pub const HUPCL: ::tcflag_t = 0x00000400; +-pub const CLOCAL: ::tcflag_t = 0x00000800; +-pub const ECHOKE: ::tcflag_t = 0x00000800; +-pub const ECHOE: ::tcflag_t = 0x00000010; +-pub const ECHOK: ::tcflag_t = 0x00000020; +-pub const ECHONL: ::tcflag_t = 0x00000040; +-pub const ECHOPRT: ::tcflag_t = 0x00000400; +-pub const ECHOCTL: ::tcflag_t = 0x00000200; +-pub const ISIG: ::tcflag_t = 0x00000001; +-pub const ICANON: ::tcflag_t = 0x00000002; +-pub const PENDIN: ::tcflag_t = 0x00004000; +-pub const NOFLSH: ::tcflag_t = 0x00000080; +-pub const CIBAUD: ::tcflag_t = 0o02003600000; +-pub const CBAUDEX: ::tcflag_t = 0o010000; +-pub const VSWTC: usize = 7; +-pub const OLCUC: ::tcflag_t = 0o000002; +-pub const NLDLY: ::tcflag_t = 0o000400; +-pub const CRDLY: ::tcflag_t = 0o003000; +-pub const TABDLY: ::tcflag_t = 0o014000; +-pub const BSDLY: ::tcflag_t = 0o020000; +-pub const FFDLY: ::tcflag_t = 0o100000; +-pub const VTDLY: ::tcflag_t = 0o040000; +-pub const XTABS: ::tcflag_t = 0o014000; +-pub const B57600: ::speed_t = 0o010001; +-pub const B115200: ::speed_t = 0o010002; +-pub const B230400: ::speed_t = 0o010003; +-pub const B460800: ::speed_t = 0o010004; +-pub const B500000: ::speed_t = 0o010005; +-pub const B576000: ::speed_t = 0o010006; +-pub const B921600: ::speed_t = 0o010007; +-pub const B1000000: ::speed_t = 0o010010; +-pub const B1152000: ::speed_t = 0o010011; +-pub const B1500000: ::speed_t = 0o010012; +-pub const B2000000: ::speed_t = 0o010013; +-pub const B2500000: ::speed_t = 0o010014; +-pub const B3000000: ::speed_t = 0o010015; +-pub const B3500000: ::speed_t = 0o010016; +-pub const B4000000: ::speed_t = 0o010017; ++ + extern { + pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; + } +@@ -136,6 +53,9 @@ cfg_if! { + } else if #[cfg(any(target_arch = "arm"))] { + mod arm; + pub use self::arm::*; ++ } else if #[cfg(any(target_arch = "powerpc"))] { ++ mod powerpc; ++ pub use self::powerpc::*; + } else { + // Unknown target_arch + } +diff --git a/src/liblibc/src/unix/notbsd/linux/musl/b32/powerpc.rs b/src/liblibc/src/unix/notbsd/linux/musl/b32/powerpc.rs +new file mode 100644 +index 00000000000..50b6b57ef11 +--- /dev/null ++++ b/src/liblibc/src/unix/notbsd/linux/musl/b32/powerpc.rs +@@ -0,0 +1,866 @@ ++pub type c_char = u8; ++pub type wchar_t = i32; ++ ++s! { ++ pub struct stat { ++ pub st_dev: ::dev_t, ++ pub st_ino: ::ino_t, ++ pub st_mode: ::mode_t, ++ pub st_nlink: ::nlink_t, ++ pub st_uid: ::uid_t, ++ pub st_gid: ::gid_t, ++ pub st_rdev: ::dev_t, ++ __st_rdev_padding: ::c_short, ++ pub st_size: ::off_t, ++ pub st_blksize: ::blksize_t, ++ pub st_blocks: ::blkcnt_t, ++ pub st_atime: ::time_t, ++ pub st_atime_nsec: ::c_long, ++ pub st_mtime: ::time_t, ++ pub st_mtime_nsec: ::c_long, ++ pub st_ctime: ::time_t, ++ pub st_ctime_nsec: ::c_long, ++ __unused: [::c_long; 2], ++ } ++ ++ pub struct stat64 { ++ pub st_dev: ::dev_t, ++ pub st_ino: ::ino_t, ++ pub st_mode: ::mode_t, ++ pub st_nlink: ::nlink_t, ++ pub st_uid: ::uid_t, ++ pub st_gid: ::gid_t, ++ pub st_rdev: ::dev_t, ++ __st_rdev_padding: ::c_short, ++ pub st_size: ::off_t, ++ pub st_blksize: ::blksize_t, ++ pub st_blocks: ::blkcnt_t, ++ pub st_atime: ::time_t, ++ pub st_atime_nsec: ::c_long, ++ pub st_mtime: ::time_t, ++ pub st_mtime_nsec: ::c_long, ++ pub st_ctime: ::time_t, ++ pub st_ctime_nsec: ::c_long, ++ __unused: [::c_long; 2], ++ } ++ ++ pub struct stack_t { ++ pub ss_sp: *mut ::c_void, ++ pub ss_flags: ::c_int, ++ pub ss_size: ::size_t ++ } ++ ++ pub struct ipc_perm { ++ pub __ipc_perm_key: ::key_t, ++ pub uid: ::uid_t, ++ pub gid: ::gid_t, ++ pub cuid: ::uid_t, ++ pub cgid: ::gid_t, ++ pub mode: ::mode_t, ++ pub __seq: ::c_int, ++ __pad1: ::c_int, ++ __pad2: ::c_longlong, ++ __pad3: ::c_longlong ++ } ++ ++ pub struct shmid_ds { ++ pub shm_perm: ::ipc_perm, ++ __unused1: ::c_int, ++ pub shm_atime: ::time_t, ++ __unused2: ::c_int, ++ pub shm_dtime: ::time_t, ++ __unused3: ::c_int, ++ pub shm_ctime: ::time_t, ++ __unused4: ::c_int, ++ pub shm_segsz: ::size_t, ++ pub shm_cpid: ::pid_t, ++ pub shm_lpid: ::pid_t, ++ pub shm_nattch: ::c_ulong, ++ __pad1: ::c_ulong, ++ __pad2: ::c_ulong, ++ } ++ ++ pub struct msqid_ds { ++ pub msg_perm: ::ipc_perm, ++ __unused1: ::c_int, ++ pub msg_stime: ::time_t, ++ __unused2: ::c_int, ++ pub msg_rtime: ::time_t, ++ __unused3: ::c_int, ++ pub msg_ctime: ::time_t, ++ __msg_cbytes: ::c_ulong, ++ pub msg_qnum: ::msgqnum_t, ++ pub msg_qbytes: ::msglen_t, ++ pub msg_lspid: ::pid_t, ++ pub msg_lrpid: ::pid_t, ++ __pad1: ::c_ulong, ++ __pad2: ::c_ulong, ++ } ++ ++ pub struct statfs { ++ pub f_type: ::c_ulong, ++ pub f_bsize: ::c_ulong, ++ pub f_blocks: ::fsblkcnt_t, ++ pub f_bfree: ::fsblkcnt_t, ++ pub f_bavail: ::fsblkcnt_t, ++ pub f_files: ::fsfilcnt_t, ++ pub f_ffree: ::fsfilcnt_t, ++ pub f_fsid: ::fsid_t, ++ pub f_namelen: ::c_ulong, ++ pub f_frsize: ::c_ulong, ++ pub f_flags: ::c_ulong, ++ pub f_spare: [::c_ulong; 4], ++ } ++ ++ pub struct siginfo_t { ++ pub si_signo: ::c_int, ++ pub si_errno: ::c_int, ++ pub si_code: ::c_int, ++ pub _pad: [::c_int; 29], ++ _align: [usize; 0], ++ } ++ ++ pub struct statfs64 { ++ pub f_type: ::c_ulong, ++ pub f_bsize: ::c_ulong, ++ pub f_blocks: ::fsblkcnt_t, ++ pub f_bfree: ::fsblkcnt_t, ++ pub f_bavail: ::fsblkcnt_t, ++ pub f_files: ::fsfilcnt_t, ++ pub f_ffree: ::fsfilcnt_t, ++ pub f_fsid: ::fsid_t, ++ pub f_namelen: ::c_ulong, ++ pub f_frsize: ::c_ulong, ++ pub f_flags: ::c_ulong, ++ pub f_spare: [::c_ulong; 4], ++ } ++ ++ pub struct statvfs64 { ++ pub f_bsize: ::c_ulong, ++ pub f_frsize: ::c_ulong, ++ pub f_blocks: u64, ++ pub f_bfree: u64, ++ pub f_bavail: u64, ++ pub f_files: u64, ++ pub f_ffree: u64, ++ pub f_favail: u64, ++ #[cfg(target_endian = "little")] ++ pub f_fsid: ::c_ulong, ++ __f_unused: ::c_int, ++ #[cfg(target_endian = "big")] ++ pub f_fsid: ::c_ulong, ++ pub f_flag: ::c_ulong, ++ pub f_namemax: ::c_ulong, ++ __f_spare: [::c_int; 6], ++ } ++ ++ pub struct termios2 { ++ pub c_iflag: ::tcflag_t, ++ pub c_oflag: ::tcflag_t, ++ pub c_cflag: ::tcflag_t, ++ pub c_lflag: ::tcflag_t, ++ pub c_cc: [::cc_t; 19], ++ pub c_line: ::cc_t, ++ pub c_ispeed: ::speed_t, ++ pub c_ospeed: ::speed_t, ++ } ++} ++ ++pub const SIGSTKSZ: ::size_t = 10240; ++pub const MINSIGSTKSZ: ::size_t = 4096; ++ ++pub const O_DIRECT: ::c_int = 0x20000; ++pub const O_DIRECTORY: ::c_int = 0x4000; ++pub const O_NOFOLLOW: ::c_int = 0x8000; ++pub const O_ASYNC: ::c_int = 0x2000; ++pub const O_LARGEFILE: ::c_int = 0x10000; ++ ++pub const FIOCLEX: ::c_int = 0x20006601; ++pub const FIONBIO: ::c_int = 0x8004667E; ++ ++pub const RLIMIT_RSS: ::c_int = 5; ++pub const RLIMIT_NOFILE: ::c_int = 7; ++pub const RLIMIT_AS: ::c_int = 9; ++pub const RLIMIT_NPROC: ::c_int = 6; ++pub const RLIMIT_MEMLOCK: ::c_int = 8; ++pub const RLIMIT_NLIMITS: ::c_int = 15; ++ ++pub const MCL_CURRENT: ::c_int = 0x2000; ++pub const MCL_FUTURE: ::c_int = 0x4000; ++pub const CBAUD: ::tcflag_t = 0o0000377; ++pub const TAB1: ::c_int = 0x00000400; ++pub const TAB2: ::c_int = 0x00000800; ++pub const TAB3: ::c_int = 0x00000C00; ++pub const CR1: ::c_int = 0x00001000; ++pub const CR2: ::c_int = 0x00002000; ++pub const CR3: ::c_int = 0x00003000; ++pub const FF1: ::c_int = 0x00004000; ++pub const BS1: ::c_int = 0x00008000; ++pub const VT1: ::c_int = 0x00010000; ++pub const VWERASE: usize = 10; ++pub const VREPRINT: usize = 11; ++pub const VSUSP: usize = 12; ++pub const VSTART: usize = 13; ++pub const VSTOP: usize = 14; ++pub const VDISCARD: usize = 16; ++pub const VTIME: usize = 7; ++pub const IXON: ::tcflag_t = 0x00000200; ++pub const IXOFF: ::tcflag_t = 0x00000400; ++pub const ONLCR: ::tcflag_t = 0x00000002; ++pub const CSIZE: ::tcflag_t = 0x00000300; ++pub const CS6: ::tcflag_t = 0x00000100; ++pub const CS7: ::tcflag_t = 0x00000200; ++pub const CS8: ::tcflag_t = 0x00000300; ++pub const CSTOPB: ::tcflag_t = 0x00000400; ++pub const CREAD: ::tcflag_t = 0x00000800; ++pub const PARENB: ::tcflag_t = 0x00001000; ++pub const PARODD: ::tcflag_t = 0x00002000; ++pub const HUPCL: ::tcflag_t = 0x00004000; ++pub const CLOCAL: ::tcflag_t = 0x00008000; ++pub const ECHOKE: ::tcflag_t = 0x00000001; ++pub const ECHOE: ::tcflag_t = 0x00000002; ++pub const ECHOK: ::tcflag_t = 0x00000004; ++pub const ECHONL: ::tcflag_t = 0x00000010; ++pub const ECHOPRT: ::tcflag_t = 0x00000020; ++pub const ECHOCTL: ::tcflag_t = 0x00000040; ++pub const ISIG: ::tcflag_t = 0x00000080; ++pub const ICANON: ::tcflag_t = 0x00000100; ++pub const PENDIN: ::tcflag_t = 0x20000000; ++pub const NOFLSH: ::tcflag_t = 0x80000000; ++pub const CIBAUD: ::tcflag_t = 0o00077600000; ++pub const CBAUDEX: ::tcflag_t = 0o000020; ++pub const VSWTC: usize = 9; ++pub const OLCUC: ::tcflag_t = 0o000004; ++pub const NLDLY: ::tcflag_t = 0o001400; ++pub const CRDLY: ::tcflag_t = 0o030000; ++pub const TABDLY: ::tcflag_t = 0o006000; ++pub const BSDLY: ::tcflag_t = 0o100000; ++pub const FFDLY: ::tcflag_t = 0o040000; ++pub const VTDLY: ::tcflag_t = 0o200000; ++pub const XTABS: ::tcflag_t = 0o006000; ++pub const B57600: ::speed_t = 0o000020; ++pub const B115200: ::speed_t = 0o000021; ++pub const B230400: ::speed_t = 0o000022; ++pub const B460800: ::speed_t = 0o000023; ++pub const B500000: ::speed_t = 0o000024; ++pub const B576000: ::speed_t = 0o000025; ++pub const B921600: ::speed_t = 0o000026; ++pub const B1000000: ::speed_t = 0o000027; ++pub const B1152000: ::speed_t = 0o000030; ++pub const B1500000: ::speed_t = 0o000031; ++pub const B2000000: ::speed_t = 0o000032; ++pub const B2500000: ::speed_t = 0o000033; ++pub const B3000000: ::speed_t = 0o000034; ++pub const B3500000: ::speed_t = 0o000035; ++pub const B4000000: ::speed_t = 0o000036; ++ ++pub const O_APPEND: ::c_int = 1024; ++pub const O_CREAT: ::c_int = 64; ++pub const O_EXCL: ::c_int = 128; ++pub const O_NOCTTY: ::c_int = 256; ++pub const O_NONBLOCK: ::c_int = 2048; ++pub const O_SYNC: ::c_int = 1052672; ++pub const O_RSYNC: ::c_int = 1052672; ++pub const O_DSYNC: ::c_int = 4096; ++ ++pub const SOCK_NONBLOCK: ::c_int = 2048; ++ ++pub const MAP_ANON: ::c_int = 0x0020; ++pub const MAP_GROWSDOWN: ::c_int = 0x0100; ++pub const MAP_DENYWRITE: ::c_int = 0x0800; ++pub const MAP_EXECUTABLE: ::c_int = 0x01000; ++pub const MAP_LOCKED: ::c_int = 0x00080; ++pub const MAP_NORESERVE: ::c_int = 0x00040; ++pub const MAP_POPULATE: ::c_int = 0x08000; ++pub const MAP_NONBLOCK: ::c_int = 0x010000; ++pub const MAP_STACK: ::c_int = 0x020000; ++ ++pub const SOCK_STREAM: ::c_int = 1; ++pub const SOCK_DGRAM: ::c_int = 2; ++pub const SOCK_SEQPACKET: ::c_int = 5; ++ ++pub const SOL_SOCKET: ::c_int = 1; ++ ++pub const EDEADLK: ::c_int = 35; ++pub const ENAMETOOLONG: ::c_int = 36; ++pub const ENOLCK: ::c_int = 37; ++pub const ENOSYS: ::c_int = 38; ++pub const ENOTEMPTY: ::c_int = 39; ++pub const ELOOP: ::c_int = 40; ++pub const ENOMSG: ::c_int = 42; ++pub const EIDRM: ::c_int = 43; ++pub const ECHRNG: ::c_int = 44; ++pub const EL2NSYNC: ::c_int = 45; ++pub const EL3HLT: ::c_int = 46; ++pub const EL3RST: ::c_int = 47; ++pub const ELNRNG: ::c_int = 48; ++pub const EUNATCH: ::c_int = 49; ++pub const ENOCSI: ::c_int = 50; ++pub const EL2HLT: ::c_int = 51; ++pub const EBADE: ::c_int = 52; ++pub const EBADR: ::c_int = 53; ++pub const EXFULL: ::c_int = 54; ++pub const ENOANO: ::c_int = 55; ++pub const EBADRQC: ::c_int = 56; ++pub const EBADSLT: ::c_int = 57; ++pub const EDEADLOCK: ::c_int = 58; ++pub const EMULTIHOP: ::c_int = 72; ++pub const EBADMSG: ::c_int = 74; ++pub const EOVERFLOW: ::c_int = 75; ++pub const ENOTUNIQ: ::c_int = 76; ++pub const EBADFD: ::c_int = 77; ++pub const EREMCHG: ::c_int = 78; ++pub const ELIBACC: ::c_int = 79; ++pub const ELIBBAD: ::c_int = 80; ++pub const ELIBSCN: ::c_int = 81; ++pub const ELIBMAX: ::c_int = 82; ++pub const ELIBEXEC: ::c_int = 83; ++pub const EILSEQ: ::c_int = 84; ++pub const ERESTART: ::c_int = 85; ++pub const ESTRPIPE: ::c_int = 86; ++pub const EUSERS: ::c_int = 87; ++pub const ENOTSOCK: ::c_int = 88; ++pub const EDESTADDRREQ: ::c_int = 89; ++pub const EMSGSIZE: ::c_int = 90; ++pub const EPROTOTYPE: ::c_int = 91; ++pub const ENOPROTOOPT: ::c_int = 92; ++pub const EPROTONOSUPPORT: ::c_int = 93; ++pub const ESOCKTNOSUPPORT: ::c_int = 94; ++pub const EOPNOTSUPP: ::c_int = 95; ++pub const ENOTSUP: ::c_int = EOPNOTSUPP; ++pub const EPFNOSUPPORT: ::c_int = 96; ++pub const EAFNOSUPPORT: ::c_int = 97; ++pub const EADDRINUSE: ::c_int = 98; ++pub const EADDRNOTAVAIL: ::c_int = 99; ++pub const ENETDOWN: ::c_int = 100; ++pub const ENETUNREACH: ::c_int = 101; ++pub const ENETRESET: ::c_int = 102; ++pub const ECONNABORTED: ::c_int = 103; ++pub const ECONNRESET: ::c_int = 104; ++pub const ENOBUFS: ::c_int = 105; ++pub const EISCONN: ::c_int = 106; ++pub const ENOTCONN: ::c_int = 107; ++pub const ESHUTDOWN: ::c_int = 108; ++pub const ETOOMANYREFS: ::c_int = 109; ++pub const ETIMEDOUT: ::c_int = 110; ++pub const ECONNREFUSED: ::c_int = 111; ++pub const EHOSTDOWN: ::c_int = 112; ++pub const EHOSTUNREACH: ::c_int = 113; ++pub const EALREADY: ::c_int = 114; ++pub const EINPROGRESS: ::c_int = 115; ++pub const ESTALE: ::c_int = 116; ++pub const EUCLEAN: ::c_int = 117; ++pub const ENOTNAM: ::c_int = 118; ++pub const ENAVAIL: ::c_int = 119; ++pub const EISNAM: ::c_int = 120; ++pub const EREMOTEIO: ::c_int = 121; ++pub const EDQUOT: ::c_int = 122; ++pub const ENOMEDIUM: ::c_int = 123; ++pub const EMEDIUMTYPE: ::c_int = 124; ++pub const ECANCELED: ::c_int = 125; ++pub const ENOKEY: ::c_int = 126; ++pub const EKEYEXPIRED: ::c_int = 127; ++pub const EKEYREVOKED: ::c_int = 128; ++pub const EKEYREJECTED: ::c_int = 129; ++pub const EOWNERDEAD: ::c_int = 130; ++pub const ENOTRECOVERABLE: ::c_int = 131; ++pub const ERFKILL: ::c_int = 132; ++pub const EHWPOISON: ::c_int = 133; ++ ++pub const SO_REUSEADDR: ::c_int = 2; ++pub const SO_TYPE: ::c_int = 3; ++pub const SO_ERROR: ::c_int = 4; ++pub const SO_DONTROUTE: ::c_int = 5; ++pub const SO_BROADCAST: ::c_int = 6; ++pub const SO_SNDBUF: ::c_int = 7; ++pub const SO_RCVBUF: ::c_int = 8; ++pub const SO_KEEPALIVE: ::c_int = 9; ++pub const SO_OOBINLINE: ::c_int = 10; ++pub const SO_NO_CHECK: ::c_int = 11; ++pub const SO_PRIORITY: ::c_int = 12; ++pub const SO_LINGER: ::c_int = 13; ++pub const SO_BSDCOMPAT: ::c_int = 14; ++pub const SO_REUSEPORT: ::c_int = 15; ++pub const SO_RCVLOWAT: ::c_int = 16; ++pub const SO_SNDLOWAT: ::c_int = 17; ++pub const SO_RCVTIMEO: ::c_int = 18; ++pub const SO_SNDTIMEO: ::c_int = 19; ++pub const SO_PASSCRED: ::c_int = 20; ++pub const SO_PEERCRED: ::c_int = 21; ++pub const SO_ACCEPTCONN: ::c_int = 30; ++pub const SO_SNDBUFFORCE: ::c_int = 32; ++pub const SO_RCVBUFFORCE: ::c_int = 33; ++pub const SO_PROTOCOL: ::c_int = 38; ++pub const SO_DOMAIN: ::c_int = 39; ++ ++pub const SA_ONSTACK: ::c_int = 0x08000000; ++pub const SA_SIGINFO: ::c_int = 0x00000004; ++pub const SA_NOCLDWAIT: ::c_int = 0x00000002; ++ ++pub const SIGCHLD: ::c_int = 17; ++pub const SIGBUS: ::c_int = 7; ++pub const SIGTTIN: ::c_int = 21; ++pub const SIGTTOU: ::c_int = 22; ++pub const SIGXCPU: ::c_int = 24; ++pub const SIGXFSZ: ::c_int = 25; ++pub const SIGVTALRM: ::c_int = 26; ++pub const SIGPROF: ::c_int = 27; ++pub const SIGWINCH: ::c_int = 28; ++pub const SIGUSR1: ::c_int = 10; ++pub const SIGUSR2: ::c_int = 12; ++pub const SIGCONT: ::c_int = 18; ++pub const SIGSTOP: ::c_int = 19; ++pub const SIGTSTP: ::c_int = 20; ++pub const SIGURG: ::c_int = 23; ++pub const SIGIO: ::c_int = 29; ++pub const SIGSYS: ::c_int = 31; ++pub const SIGSTKFLT: ::c_int = 16; ++pub const SIGPOLL: ::c_int = 29; ++pub const SIGPWR: ::c_int = 30; ++pub const SIG_SETMASK: ::c_int = 2; ++pub const SIG_BLOCK: ::c_int = 0x000000; ++pub const SIG_UNBLOCK: ::c_int = 0x01; ++ ++pub const EXTPROC: ::tcflag_t = 0x10000000; ++ ++pub const MAP_HUGETLB: ::c_int = 0x040000; ++ ++pub const F_GETLK: ::c_int = 12; ++pub const F_GETOWN: ::c_int = 9; ++pub const F_SETLK: ::c_int = 13; ++pub const F_SETLKW: ::c_int = 14; ++pub const F_SETOWN: ::c_int = 8; ++ ++pub const VEOF: usize = 4; ++pub const VEOL: usize = 6; ++pub const VEOL2: usize = 8; ++pub const VMIN: usize = 5; ++pub const IEXTEN: ::tcflag_t = 0x00000400; ++pub const TOSTOP: ::tcflag_t = 0x00400000; ++pub const FLUSHO: ::tcflag_t = 0x00800000; ++ ++pub const TCGETS: ::c_int = 0x402C7413; ++pub const TCSETS: ::c_int = 0x802C7414; ++pub const TCSETSW: ::c_int = 0x802C7415; ++pub const TCSETSF: ::c_int = 0x802C7416; ++pub const TCGETA: ::c_int = 0x40147417; ++pub const TCSETA: ::c_int = 0x80147418; ++pub const TCSETAW: ::c_int = 0x80147419; ++pub const TCSETAF: ::c_int = 0x8014741C; ++pub const TCSBRK: ::c_int = 0x2000741D; ++pub const TCXONC: ::c_int = 0x2000741E; ++pub const TCFLSH: ::c_int = 0x2000741F; ++pub const TIOCGSOFTCAR: ::c_int = 0x5419; ++pub const TIOCSSOFTCAR: ::c_int = 0x541A; ++pub const TIOCLINUX: ::c_int = 0x541C; ++pub const TIOCGSERIAL: ::c_int = 0x541E; ++pub const TIOCEXCL: ::c_int = 0x540C; ++pub const TIOCNXCL: ::c_int = 0x540D; ++pub const TIOCSCTTY: ::c_int = 0x540E; ++pub const TIOCGPGRP: ::c_int = 0x40047477; ++pub const TIOCSPGRP: ::c_int = 0x80047476; ++pub const TIOCOUTQ: ::c_int = 0x40047473; ++pub const TIOCSTI: ::c_int = 0x5412; ++pub const TIOCGWINSZ: ::c_int = 0x40087468; ++pub const TIOCSWINSZ: ::c_int = 0x80087467; ++pub const TIOCMGET: ::c_int = 0x5415; ++pub const TIOCMBIS: ::c_int = 0x5416; ++pub const TIOCMBIC: ::c_int = 0x5417; ++pub const TIOCMSET: ::c_int = 0x5418; ++pub const FIONREAD: ::c_int = 0x4004667F; ++pub const TIOCCONS: ::c_int = 0x541D; ++ ++pub const POLLWRNORM: ::c_short = 0x100; ++pub const POLLWRBAND: ::c_short = 0x200; ++ ++pub const TIOCM_LE: ::c_int = 0x001; ++pub const TIOCM_DTR: ::c_int = 0x002; ++pub const TIOCM_RTS: ::c_int = 0x004; ++pub const TIOCM_ST: ::c_int = 0x008; ++pub const TIOCM_SR: ::c_int = 0x010; ++pub const TIOCM_CTS: ::c_int = 0x020; ++pub const TIOCM_CAR: ::c_int = 0x040; ++pub const TIOCM_RNG: ::c_int = 0x080; ++pub const TIOCM_DSR: ::c_int = 0x100; ++pub const TIOCM_CD: ::c_int = TIOCM_CAR; ++pub const TIOCM_RI: ::c_int = TIOCM_RNG; ++ ++// Syscall table ++pub const SYS_restart_syscall: ::c_long = 0; ++pub const SYS_exit: ::c_long = 1; ++pub const SYS_fork: ::c_long = 2; ++pub const SYS_read: ::c_long = 3; ++pub const SYS_write: ::c_long = 4; ++pub const SYS_open: ::c_long = 5; ++pub const SYS_close: ::c_long = 6; ++pub const SYS_waitpid: ::c_long = 7; ++pub const SYS_creat: ::c_long = 8; ++pub const SYS_link: ::c_long = 9; ++pub const SYS_unlink: ::c_long = 10; ++pub const SYS_execve: ::c_long = 11; ++pub const SYS_chdir: ::c_long = 12; ++pub const SYS_time: ::c_long = 13; ++pub const SYS_mknod: ::c_long = 14; ++pub const SYS_chmod: ::c_long = 15; ++pub const SYS_lchown: ::c_long = 16; ++pub const SYS_break: ::c_long = 17; ++pub const SYS_oldstat: ::c_long = 18; ++pub const SYS_lseek: ::c_long = 19; ++pub const SYS_getpid: ::c_long = 20; ++pub const SYS_mount: ::c_long = 21; ++pub const SYS_umount: ::c_long = 22; ++pub const SYS_setuid: ::c_long = 23; ++pub const SYS_getuid: ::c_long = 24; ++pub const SYS_stime: ::c_long = 25; ++pub const SYS_ptrace: ::c_long = 26; ++pub const SYS_alarm: ::c_long = 27; ++pub const SYS_oldfstat: ::c_long = 28; ++pub const SYS_pause: ::c_long = 29; ++pub const SYS_utime: ::c_long = 30; ++pub const SYS_stty: ::c_long = 31; ++pub const SYS_gtty: ::c_long = 32; ++pub const SYS_access: ::c_long = 33; ++pub const SYS_nice: ::c_long = 34; ++pub const SYS_ftime: ::c_long = 35; ++pub const SYS_sync: ::c_long = 36; ++pub const SYS_kill: ::c_long = 37; ++pub const SYS_rename: ::c_long = 38; ++pub const SYS_mkdir: ::c_long = 39; ++pub const SYS_rmdir: ::c_long = 40; ++pub const SYS_dup: ::c_long = 41; ++pub const SYS_pipe: ::c_long = 42; ++pub const SYS_times: ::c_long = 43; ++pub const SYS_prof: ::c_long = 44; ++pub const SYS_brk: ::c_long = 45; ++pub const SYS_setgid: ::c_long = 46; ++pub const SYS_getgid: ::c_long = 47; ++pub const SYS_signal: ::c_long = 48; ++pub const SYS_geteuid: ::c_long = 49; ++pub const SYS_getegid: ::c_long = 50; ++pub const SYS_acct: ::c_long = 51; ++pub const SYS_umount2: ::c_long = 52; ++pub const SYS_lock: ::c_long = 53; ++pub const SYS_ioctl: ::c_long = 54; ++pub const SYS_fcntl: ::c_long = 55; ++pub const SYS_mpx: ::c_long = 56; ++pub const SYS_setpgid: ::c_long = 57; ++pub const SYS_ulimit: ::c_long = 58; ++pub const SYS_oldolduname: ::c_long = 59; ++pub const SYS_umask: ::c_long = 60; ++pub const SYS_chroot: ::c_long = 61; ++pub const SYS_ustat: ::c_long = 62; ++pub const SYS_dup2: ::c_long = 63; ++pub const SYS_getppid: ::c_long = 64; ++pub const SYS_getpgrp: ::c_long = 65; ++pub const SYS_setsid: ::c_long = 66; ++pub const SYS_sigaction: ::c_long = 67; ++pub const SYS_sgetmask: ::c_long = 68; ++pub const SYS_ssetmask: ::c_long = 69; ++pub const SYS_setreuid: ::c_long = 70; ++pub const SYS_setregid: ::c_long = 71; ++pub const SYS_sigsuspend: ::c_long = 72; ++pub const SYS_sigpending: ::c_long = 73; ++pub const SYS_sethostname: ::c_long = 74; ++pub const SYS_setrlimit: ::c_long = 75; ++pub const SYS_getrlimit: ::c_long = 76; ++pub const SYS_getrusage: ::c_long = 77; ++pub const SYS_gettimeofday: ::c_long = 78; ++pub const SYS_settimeofday: ::c_long = 79; ++pub const SYS_getgroups: ::c_long = 80; ++pub const SYS_setgroups: ::c_long = 81; ++pub const SYS_select: ::c_long = 82; ++pub const SYS_symlink: ::c_long = 83; ++pub const SYS_oldlstat: ::c_long = 84; ++pub const SYS_readlink: ::c_long = 85; ++pub const SYS_uselib: ::c_long = 86; ++pub const SYS_swapon: ::c_long = 87; ++pub const SYS_reboot: ::c_long = 88; ++pub const SYS_readdir: ::c_long = 89; ++pub const SYS_mmap: ::c_long = 90; ++pub const SYS_munmap: ::c_long = 91; ++pub const SYS_truncate: ::c_long = 92; ++pub const SYS_ftruncate: ::c_long = 93; ++pub const SYS_fchmod: ::c_long = 94; ++pub const SYS_fchown: ::c_long = 95; ++pub const SYS_getpriority: ::c_long = 96; ++pub const SYS_setpriority: ::c_long = 97; ++pub const SYS_profil: ::c_long = 98; ++pub const SYS_statfs: ::c_long = 99; ++pub const SYS_fstatfs: ::c_long = 100; ++pub const SYS_ioperm: ::c_long = 101; ++pub const SYS_socketcall: ::c_long = 102; ++pub const SYS_syslog: ::c_long = 103; ++pub const SYS_setitimer: ::c_long = 104; ++pub const SYS_getitimer: ::c_long = 105; ++pub const SYS_stat: ::c_long = 106; ++pub const SYS_lstat: ::c_long = 107; ++pub const SYS_fstat: ::c_long = 108; ++pub const SYS_olduname: ::c_long = 109; ++pub const SYS_iopl: ::c_long = 110; ++pub const SYS_vhangup: ::c_long = 111; ++pub const SYS_idle: ::c_long = 112; ++pub const SYS_vm86: ::c_long = 113; ++pub const SYS_wait4: ::c_long = 114; ++pub const SYS_swapoff: ::c_long = 115; ++pub const SYS_sysinfo: ::c_long = 116; ++pub const SYS_ipc: ::c_long = 117; ++pub const SYS_fsync: ::c_long = 118; ++pub const SYS_sigreturn: ::c_long = 119; ++pub const SYS_clone: ::c_long = 120; ++pub const SYS_setdomainname: ::c_long = 121; ++pub const SYS_uname: ::c_long = 122; ++pub const SYS_modify_ldt: ::c_long = 123; ++pub const SYS_adjtimex: ::c_long = 124; ++pub const SYS_mprotect: ::c_long = 125; ++pub const SYS_sigprocmask: ::c_long = 126; ++pub const SYS_create_module: ::c_long = 127; ++pub const SYS_init_module: ::c_long = 128; ++pub const SYS_delete_module: ::c_long = 129; ++pub const SYS_get_kernel_syms: ::c_long = 130; ++pub const SYS_quotactl: ::c_long = 131; ++pub const SYS_getpgid: ::c_long = 132; ++pub const SYS_fchdir: ::c_long = 133; ++pub const SYS_bdflush: ::c_long = 134; ++pub const SYS_sysfs: ::c_long = 135; ++pub const SYS_personality: ::c_long = 136; ++pub const SYS_afs_syscall: ::c_long = 137; ++pub const SYS_setfsuid: ::c_long = 138; ++pub const SYS_setfsgid: ::c_long = 139; ++pub const SYS__llseek: ::c_long = 140; ++pub const SYS_getdents: ::c_long = 141; ++pub const SYS__newselect: ::c_long = 142; ++pub const SYS_flock: ::c_long = 143; ++pub const SYS_msync: ::c_long = 144; ++pub const SYS_readv: ::c_long = 145; ++pub const SYS_writev: ::c_long = 146; ++pub const SYS_getsid: ::c_long = 147; ++pub const SYS_fdatasync: ::c_long = 148; ++pub const SYS__sysctl: ::c_long = 149; ++pub const SYS_mlock: ::c_long = 150; ++pub const SYS_munlock: ::c_long = 151; ++pub const SYS_mlockall: ::c_long = 152; ++pub const SYS_munlockall: ::c_long = 153; ++pub const SYS_sched_setparam: ::c_long = 154; ++pub const SYS_sched_getparam: ::c_long = 155; ++pub const SYS_sched_setscheduler: ::c_long = 156; ++pub const SYS_sched_getscheduler: ::c_long = 157; ++pub const SYS_sched_yield: ::c_long = 158; ++pub const SYS_sched_get_priority_max: ::c_long = 159; ++pub const SYS_sched_get_priority_min: ::c_long = 160; ++pub const SYS_sched_rr_get_interval: ::c_long = 161; ++pub const SYS_nanosleep: ::c_long = 162; ++pub const SYS_mremap: ::c_long = 163; ++pub const SYS_setresuid: ::c_long = 164; ++pub const SYS_getresuid: ::c_long = 165; ++pub const SYS_query_module: ::c_long = 166; ++pub const SYS_poll: ::c_long = 167; ++pub const SYS_nfsservctl: ::c_long = 168; ++pub const SYS_setresgid: ::c_long = 169; ++pub const SYS_getresgid: ::c_long = 170; ++pub const SYS_prctl: ::c_long = 171; ++pub const SYS_rt_sigreturn: ::c_long = 172; ++pub const SYS_rt_sigaction: ::c_long = 173; ++pub const SYS_rt_sigprocmask: ::c_long = 174; ++pub const SYS_rt_sigpending: ::c_long = 175; ++pub const SYS_rt_sigtimedwait: ::c_long = 176; ++pub const SYS_rt_sigqueueinfo: ::c_long = 177; ++pub const SYS_rt_sigsuspend: ::c_long = 178; ++pub const SYS_pread64: ::c_long = 179; ++pub const SYS_pwrite64: ::c_long = 180; ++pub const SYS_chown: ::c_long = 181; ++pub const SYS_getcwd: ::c_long = 182; ++pub const SYS_capget: ::c_long = 183; ++pub const SYS_capset: ::c_long = 184; ++pub const SYS_sigaltstack: ::c_long = 185; ++pub const SYS_sendfile: ::c_long = 186; ++pub const SYS_getpmsg: ::c_long = 187; ++pub const SYS_putpmsg: ::c_long = 188; ++pub const SYS_vfork: ::c_long = 189; ++pub const SYS_ugetrlimit: ::c_long = 190; ++pub const SYS_readahead: ::c_long = 191; ++pub const SYS_mmap2: ::c_long = 192; ++pub const SYS_truncate64: ::c_long = 193; ++pub const SYS_ftruncate64: ::c_long = 194; ++pub const SYS_stat64: ::c_long = 195; ++pub const SYS_lstat64: ::c_long = 196; ++pub const SYS_fstat64: ::c_long = 197; ++pub const SYS_pciconfig_read: ::c_long = 198; ++pub const SYS_pciconfig_write: ::c_long = 199; ++pub const SYS_pciconfig_iobase: ::c_long = 200; ++pub const SYS_multiplexer: ::c_long = 201; ++pub const SYS_getdents64: ::c_long = 202; ++pub const SYS_pivot_root: ::c_long = 203; ++pub const SYS_fcntl64: ::c_long = 204; ++pub const SYS_madvise: ::c_long = 205; ++pub const SYS_mincore: ::c_long = 206; ++pub const SYS_gettid: ::c_long = 207; ++pub const SYS_tkill: ::c_long = 208; ++pub const SYS_setxattr: ::c_long = 209; ++pub const SYS_lsetxattr: ::c_long = 210; ++pub const SYS_fsetxattr: ::c_long = 211; ++pub const SYS_getxattr: ::c_long = 212; ++pub const SYS_lgetxattr: ::c_long = 213; ++pub const SYS_fgetxattr: ::c_long = 214; ++pub const SYS_listxattr: ::c_long = 215; ++pub const SYS_llistxattr: ::c_long = 216; ++pub const SYS_flistxattr: ::c_long = 217; ++pub const SYS_removexattr: ::c_long = 218; ++pub const SYS_lremovexattr: ::c_long = 219; ++pub const SYS_fremovexattr: ::c_long = 220; ++pub const SYS_futex: ::c_long = 221; ++pub const SYS_sched_setaffinity: ::c_long = 222; ++pub const SYS_sched_getaffinity: ::c_long = 223; ++pub const SYS_tuxcall: ::c_long = 225; ++pub const SYS_sendfile64: ::c_long = 226; ++pub const SYS_io_setup: ::c_long = 227; ++pub const SYS_io_destroy: ::c_long = 228; ++pub const SYS_io_getevents: ::c_long = 229; ++pub const SYS_io_submit: ::c_long = 230; ++pub const SYS_io_cancel: ::c_long = 231; ++pub const SYS_set_tid_address: ::c_long = 232; ++pub const SYS_fadvise64: ::c_long = 233; ++pub const SYS_exit_group: ::c_long = 234; ++pub const SYS_lookup_dcookie: ::c_long = 235; ++pub const SYS_epoll_create: ::c_long = 236; ++pub const SYS_epoll_ctl: ::c_long = 237; ++pub const SYS_epoll_wait: ::c_long = 238; ++pub const SYS_remap_file_pages: ::c_long = 239; ++pub const SYS_timer_create: ::c_long = 240; ++pub const SYS_timer_settime: ::c_long = 241; ++pub const SYS_timer_gettime: ::c_long = 242; ++pub const SYS_timer_getoverrun: ::c_long = 243; ++pub const SYS_timer_delete: ::c_long = 244; ++pub const SYS_clock_settime: ::c_long = 245; ++pub const SYS_clock_gettime: ::c_long = 246; ++pub const SYS_clock_getres: ::c_long = 247; ++pub const SYS_clock_nanosleep: ::c_long = 248; ++pub const SYS_swapcontext: ::c_long = 249; ++pub const SYS_tgkill: ::c_long = 250; ++pub const SYS_utimes: ::c_long = 251; ++pub const SYS_statfs64: ::c_long = 252; ++pub const SYS_fstatfs64: ::c_long = 253; ++pub const SYS_fadvise64_64: ::c_long = 254; ++pub const SYS_rtas: ::c_long = 255; ++pub const SYS_sys_debug_setcontext: ::c_long = 256; ++pub const SYS_migrate_pages: ::c_long = 258; ++pub const SYS_mbind: ::c_long = 259; ++pub const SYS_get_mempolicy: ::c_long = 260; ++pub const SYS_set_mempolicy: ::c_long = 261; ++pub const SYS_mq_open: ::c_long = 262; ++pub const SYS_mq_unlink: ::c_long = 263; ++pub const SYS_mq_timedsend: ::c_long = 264; ++pub const SYS_mq_timedreceive: ::c_long = 265; ++pub const SYS_mq_notify: ::c_long = 266; ++pub const SYS_mq_getsetattr: ::c_long = 267; ++pub const SYS_kexec_load: ::c_long = 268; ++pub const SYS_add_key: ::c_long = 269; ++pub const SYS_request_key: ::c_long = 270; ++pub const SYS_keyctl: ::c_long = 271; ++pub const SYS_waitid: ::c_long = 272; ++pub const SYS_ioprio_set: ::c_long = 273; ++pub const SYS_ioprio_get: ::c_long = 274; ++pub const SYS_inotify_init: ::c_long = 275; ++pub const SYS_inotify_add_watch: ::c_long = 276; ++pub const SYS_inotify_rm_watch: ::c_long = 277; ++pub const SYS_spu_run: ::c_long = 278; ++pub const SYS_spu_create: ::c_long = 279; ++pub const SYS_pselect6: ::c_long = 280; ++pub const SYS_ppoll: ::c_long = 281; ++pub const SYS_unshare: ::c_long = 282; ++pub const SYS_splice: ::c_long = 283; ++pub const SYS_tee: ::c_long = 284; ++pub const SYS_vmsplice: ::c_long = 285; ++pub const SYS_openat: ::c_long = 286; ++pub const SYS_mkdirat: ::c_long = 287; ++pub const SYS_mknodat: ::c_long = 288; ++pub const SYS_fchownat: ::c_long = 289; ++pub const SYS_futimesat: ::c_long = 290; ++pub const SYS_fstatat64: ::c_long = 291; ++pub const SYS_unlinkat: ::c_long = 292; ++pub const SYS_renameat: ::c_long = 293; ++pub const SYS_linkat: ::c_long = 294; ++pub const SYS_symlinkat: ::c_long = 295; ++pub const SYS_readlinkat: ::c_long = 296; ++pub const SYS_fchmodat: ::c_long = 297; ++pub const SYS_faccessat: ::c_long = 298; ++pub const SYS_get_robust_list: ::c_long = 299; ++pub const SYS_set_robust_list: ::c_long = 300; ++pub const SYS_move_pages: ::c_long = 301; ++pub const SYS_getcpu: ::c_long = 302; ++pub const SYS_epoll_pwait: ::c_long = 303; ++pub const SYS_utimensat: ::c_long = 304; ++pub const SYS_signalfd: ::c_long = 305; ++pub const SYS_timerfd_create: ::c_long = 306; ++pub const SYS_eventfd: ::c_long = 307; ++pub const SYS_sync_file_range2: ::c_long = 308; ++pub const SYS_fallocate: ::c_long = 309; ++pub const SYS_subpage_prot: ::c_long = 310; ++pub const SYS_timerfd_settime: ::c_long = 311; ++pub const SYS_timerfd_gettime: ::c_long = 312; ++pub const SYS_signalfd4: ::c_long = 313; ++pub const SYS_eventfd2: ::c_long = 314; ++pub const SYS_epoll_create1: ::c_long = 315; ++pub const SYS_dup3: ::c_long = 316; ++pub const SYS_pipe2: ::c_long = 317; ++pub const SYS_inotify_init1: ::c_long = 318; ++pub const SYS_perf_event_open: ::c_long = 319; ++pub const SYS_preadv: ::c_long = 320; ++pub const SYS_pwritev: ::c_long = 321; ++pub const SYS_rt_tgsigqueueinfo: ::c_long = 322; ++pub const SYS_fanotify_init: ::c_long = 323; ++pub const SYS_fanotify_mark: ::c_long = 324; ++pub const SYS_prlimit64: ::c_long = 325; ++pub const SYS_socket: ::c_long = 326; ++pub const SYS_bind: ::c_long = 327; ++pub const SYS_connect: ::c_long = 328; ++pub const SYS_listen: ::c_long = 329; ++pub const SYS_accept: ::c_long = 330; ++pub const SYS_getsockname: ::c_long = 331; ++pub const SYS_getpeername: ::c_long = 332; ++pub const SYS_socketpair: ::c_long = 333; ++pub const SYS_send: ::c_long = 334; ++pub const SYS_sendto: ::c_long = 335; ++pub const SYS_recv: ::c_long = 336; ++pub const SYS_recvfrom: ::c_long = 337; ++pub const SYS_shutdown: ::c_long = 338; ++pub const SYS_setsockopt: ::c_long = 339; ++pub const SYS_getsockopt: ::c_long = 340; ++pub const SYS_sendmsg: ::c_long = 341; ++pub const SYS_recvmsg: ::c_long = 342; ++pub const SYS_recvmmsg: ::c_long = 343; ++pub const SYS_accept4: ::c_long = 344; ++pub const SYS_name_to_handle_at: ::c_long = 345; ++pub const SYS_open_by_handle_at: ::c_long = 346; ++pub const SYS_clock_adjtime: ::c_long = 347; ++pub const SYS_syncfs: ::c_long = 348; ++pub const SYS_sendmmsg: ::c_long = 349; ++pub const SYS_setns: ::c_long = 350; ++pub const SYS_process_vm_readv: ::c_long = 351; ++pub const SYS_process_vm_writev: ::c_long = 352; ++pub const SYS_finit_module: ::c_long = 353; ++pub const SYS_kcmp: ::c_long = 354; ++pub const SYS_sched_setattr: ::c_long = 355; ++pub const SYS_sched_getattr: ::c_long = 356; ++pub const SYS_renameat2: ::c_long = 357; ++pub const SYS_seccomp: ::c_long = 358; ++pub const SYS_getrandom: ::c_long = 359; ++pub const SYS_memfd_create: ::c_long = 360; ++pub const SYS_bpf: ::c_long = 361; ++pub const SYS_execveat: ::c_long = 362; ++pub const SYS_switch_endian: ::c_long = 363; ++pub const SYS_userfaultfd: ::c_long = 364; ++pub const SYS_membarrier: ::c_long = 365; ++pub const SYS_mlock2: ::c_long = 378; ++pub const SYS_copy_file_range: ::c_long = 379; ++pub const SYS_preadv2: ::c_long = 380; ++pub const SYS_pwritev2: ::c_long = 381; ++pub const SYS_kexec_file_load: ::c_long = 382; ++pub const SYS_statx: ::c_long = 383; ++pub const SYS_pkey_alloc: ::c_long = 384; ++pub const SYS_pkey_free: ::c_long = 385; ++pub const SYS_pkey_mprotect: ::c_long = 386; ++ ++#[doc(hidden)] ++pub const AF_MAX: ::c_int = 43; ++#[doc(hidden)] ++pub const PF_MAX: ::c_int = AF_MAX; +diff --git a/src/liblibc/src/unix/notbsd/linux/musl/b32/x86.rs b/src/liblibc/src/unix/notbsd/linux/musl/b32/x86.rs +index fa570248c72..9f704c7fac9 100644 +--- a/src/liblibc/src/unix/notbsd/linux/musl/b32/x86.rs ++++ b/src/liblibc/src/unix/notbsd/linux/musl/b32/x86.rs +@@ -52,6 +52,18 @@ s! { + pub ss_size: ::size_t + } + ++ pub struct ipc_perm { ++ pub __ipc_perm_key: ::key_t, ++ pub uid: ::uid_t, ++ pub gid: ::gid_t, ++ pub cuid: ::uid_t, ++ pub cgid: ::gid_t, ++ pub mode: ::mode_t, ++ pub __seq: ::c_int, ++ __unused1: ::c_long, ++ __unused2: ::c_long ++ } ++ + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, +@@ -164,6 +176,9 @@ s! { + } + } + ++pub const SIGSTKSZ: ::size_t = 8192; ++pub const MINSIGSTKSZ: ::size_t = 2048; ++ + pub const O_DIRECT: ::c_int = 0x4000; + pub const O_DIRECTORY: ::c_int = 0x10000; + pub const O_NOFOLLOW: ::c_int = 0x20000; +@@ -178,6 +193,76 @@ pub const RLIMIT_NOFILE: ::c_int = 7; + pub const RLIMIT_AS: ::c_int = 9; + pub const RLIMIT_NPROC: ::c_int = 6; + pub const RLIMIT_MEMLOCK: ::c_int = 8; ++pub const RLIMIT_NLIMITS: ::c_int = 16; ++ ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++pub const CBAUD: ::tcflag_t = 0o0010017; ++pub const TAB1: ::c_int = 0x00000800; ++pub const TAB2: ::c_int = 0x00001000; ++pub const TAB3: ::c_int = 0x00001800; ++pub const CR1: ::c_int = 0x00000200; ++pub const CR2: ::c_int = 0x00000400; ++pub const CR3: ::c_int = 0x00000600; ++pub const FF1: ::c_int = 0x00008000; ++pub const BS1: ::c_int = 0x00002000; ++pub const VT1: ::c_int = 0x00004000; ++pub const VWERASE: usize = 14; ++pub const VREPRINT: usize = 12; ++pub const VSUSP: usize = 10; ++pub const VSTART: usize = 8; ++pub const VSTOP: usize = 9; ++pub const VDISCARD: usize = 13; ++pub const VTIME: usize = 5; ++pub const IXON: ::tcflag_t = 0x00000400; ++pub const IXOFF: ::tcflag_t = 0x00001000; ++pub const ONLCR: ::tcflag_t = 0x4; ++pub const CSIZE: ::tcflag_t = 0x00000030; ++pub const CS6: ::tcflag_t = 0x00000010; ++pub const CS7: ::tcflag_t = 0x00000020; ++pub const CS8: ::tcflag_t = 0x00000030; ++pub const CSTOPB: ::tcflag_t = 0x00000040; ++pub const CREAD: ::tcflag_t = 0x00000080; ++pub const PARENB: ::tcflag_t = 0x00000100; ++pub const PARODD: ::tcflag_t = 0x00000200; ++pub const HUPCL: ::tcflag_t = 0x00000400; ++pub const CLOCAL: ::tcflag_t = 0x00000800; ++pub const ECHOKE: ::tcflag_t = 0x00000800; ++pub const ECHOE: ::tcflag_t = 0x00000010; ++pub const ECHOK: ::tcflag_t = 0x00000020; ++pub const ECHONL: ::tcflag_t = 0x00000040; ++pub const ECHOPRT: ::tcflag_t = 0x00000400; ++pub const ECHOCTL: ::tcflag_t = 0x00000200; ++pub const ISIG: ::tcflag_t = 0x00000001; ++pub const ICANON: ::tcflag_t = 0x00000002; ++pub const PENDIN: ::tcflag_t = 0x00004000; ++pub const NOFLSH: ::tcflag_t = 0x00000080; ++pub const CIBAUD: ::tcflag_t = 0o02003600000; ++pub const CBAUDEX: ::tcflag_t = 0o010000; ++pub const VSWTC: usize = 7; ++pub const OLCUC: ::tcflag_t = 0o000002; ++pub const NLDLY: ::tcflag_t = 0o000400; ++pub const CRDLY: ::tcflag_t = 0o003000; ++pub const TABDLY: ::tcflag_t = 0o014000; ++pub const BSDLY: ::tcflag_t = 0o020000; ++pub const FFDLY: ::tcflag_t = 0o100000; ++pub const VTDLY: ::tcflag_t = 0o040000; ++pub const XTABS: ::tcflag_t = 0o014000; ++pub const B57600: ::speed_t = 0o010001; ++pub const B115200: ::speed_t = 0o010002; ++pub const B230400: ::speed_t = 0o010003; ++pub const B460800: ::speed_t = 0o010004; ++pub const B500000: ::speed_t = 0o010005; ++pub const B576000: ::speed_t = 0o010006; ++pub const B921600: ::speed_t = 0o010007; ++pub const B1000000: ::speed_t = 0o010010; ++pub const B1152000: ::speed_t = 0o010011; ++pub const B1500000: ::speed_t = 0o010012; ++pub const B2000000: ::speed_t = 0o010013; ++pub const B2500000: ::speed_t = 0o010014; ++pub const B3000000: ::speed_t = 0o010015; ++pub const B3500000: ::speed_t = 0o010016; ++pub const B4000000: ::speed_t = 0o010017; + + pub const O_APPEND: ::c_int = 1024; + pub const O_CREAT: ::c_int = 64; +diff --git a/src/liblibc/src/unix/notbsd/linux/musl/mod.rs b/src/liblibc/src/unix/notbsd/linux/musl/mod.rs +index 0d92a4b9d14..10d61ebebef 100644 +--- a/src/liblibc/src/unix/notbsd/linux/musl/mod.rs ++++ b/src/liblibc/src/unix/notbsd/linux/musl/mod.rs +@@ -260,7 +260,8 @@ cfg_if! { + pub use self::b64::*; + } else if #[cfg(any(target_arch = "x86", + target_arch = "mips", +- target_arch = "arm"))] { ++ target_arch = "arm", ++ target_arch = "powerpc"))] { + mod b32; + pub use self::b32::*; + } else { } diff --git a/user/rust/0032-libc-dcff154781e4.patch b/user/rust/0032-libc-dcff154781e4.patch new file mode 100644 index 000000000..6840e203f --- /dev/null +++ b/user/rust/0032-libc-dcff154781e4.patch @@ -0,0 +1,642 @@ +From dcff154781e4b3c6ef3a6a4024c73631f52f48cb Mon Sep 17 00:00:00 2001 +From: Mike Sullivan <mksully22@gmail.com> +Date: Mon, 18 Jun 2018 15:16:25 +0000 +Subject: [PATCH] libc: changes to ppc64le musl branch to support building of + rust on Alpine amend to add style changes amend to add style changes + +--- + src/unix/notbsd/linux/musl/b32/mod.rs | 74 ++++++++++ + src/unix/notbsd/linux/musl/b64/mod.rs | 62 -------- + src/unix/notbsd/linux/musl/b64/powerpc64.rs | 155 ++++++++++++++++++-- + src/unix/notbsd/linux/musl/b64/x86_64.rs | 136 +++++++++++++++++ + src/unix/notbsd/linux/musl/mod.rs | 74 ---------- + 5 files changed, 353 insertions(+), 148 deletions(-) + +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mod.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mod.rs +index f6e19d981dd..b4a0f761636 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mod.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mod.rs +@@ -52,6 +52,80 @@ pub const MINSIGSTKSZ: ::size_t = 2048; + pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; + pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; + ++pub const RLIMIT_NLIMITS: ::c_int = 16; ++pub const TIOCINQ: ::c_int = ::FIONREAD; ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++pub const CBAUD: ::tcflag_t = 0o0010017; ++pub const TAB1: ::c_int = 0x00000800; ++pub const TAB2: ::c_int = 0x00001000; ++pub const TAB3: ::c_int = 0x00001800; ++pub const CR1: ::c_int = 0x00000200; ++pub const CR2: ::c_int = 0x00000400; ++pub const CR3: ::c_int = 0x00000600; ++pub const FF1: ::c_int = 0x00008000; ++pub const BS1: ::c_int = 0x00002000; ++pub const VT1: ::c_int = 0x00004000; ++pub const VWERASE: usize = 14; ++pub const VREPRINT: usize = 12; ++pub const VSUSP: usize = 10; ++pub const VSTART: usize = 8; ++pub const VSTOP: usize = 9; ++pub const VDISCARD: usize = 13; ++pub const VTIME: usize = 5; ++pub const IXON: ::tcflag_t = 0x00000400; ++pub const IXOFF: ::tcflag_t = 0x00001000; ++pub const ONLCR: ::tcflag_t = 0x4; ++pub const CSIZE: ::tcflag_t = 0x00000030; ++pub const CS6: ::tcflag_t = 0x00000010; ++pub const CS7: ::tcflag_t = 0x00000020; ++pub const CS8: ::tcflag_t = 0x00000030; ++pub const CSTOPB: ::tcflag_t = 0x00000040; ++pub const CREAD: ::tcflag_t = 0x00000080; ++pub const PARENB: ::tcflag_t = 0x00000100; ++pub const PARODD: ::tcflag_t = 0x00000200; ++pub const HUPCL: ::tcflag_t = 0x00000400; ++pub const CLOCAL: ::tcflag_t = 0x00000800; ++pub const ECHOKE: ::tcflag_t = 0x00000800; ++pub const ECHOE: ::tcflag_t = 0x00000010; ++pub const ECHOK: ::tcflag_t = 0x00000020; ++pub const ECHONL: ::tcflag_t = 0x00000040; ++pub const ECHOPRT: ::tcflag_t = 0x00000400; ++pub const ECHOCTL: ::tcflag_t = 0x00000200; ++pub const ISIG: ::tcflag_t = 0x00000001; ++pub const ICANON: ::tcflag_t = 0x00000002; ++pub const PENDIN: ::tcflag_t = 0x00004000; ++pub const NOFLSH: ::tcflag_t = 0x00000080; ++pub const CIBAUD: ::tcflag_t = 0o02003600000; ++pub const CBAUDEX: ::tcflag_t = 0o010000; ++pub const VSWTC: usize = 7; ++pub const OLCUC: ::tcflag_t = 0o000002; ++pub const NLDLY: ::tcflag_t = 0o000400; ++pub const CRDLY: ::tcflag_t = 0o003000; ++pub const TABDLY: ::tcflag_t = 0o014000; ++pub const BSDLY: ::tcflag_t = 0o020000; ++pub const FFDLY: ::tcflag_t = 0o100000; ++pub const VTDLY: ::tcflag_t = 0o040000; ++pub const XTABS: ::tcflag_t = 0o014000; ++pub const B57600: ::speed_t = 0o010001; ++pub const B115200: ::speed_t = 0o010002; ++pub const B230400: ::speed_t = 0o010003; ++pub const B460800: ::speed_t = 0o010004; ++pub const B500000: ::speed_t = 0o010005; ++pub const B576000: ::speed_t = 0o010006; ++pub const B921600: ::speed_t = 0o010007; ++pub const B1000000: ::speed_t = 0o010010; ++pub const B1152000: ::speed_t = 0o010011; ++pub const B1500000: ::speed_t = 0o010012; ++pub const B2000000: ::speed_t = 0o010013; ++pub const B2500000: ::speed_t = 0o010014; ++pub const B3000000: ::speed_t = 0o010015; ++pub const B3500000: ::speed_t = 0o010016; ++pub const B4000000: ::speed_t = 0o010017; ++extern { ++ pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; ++} ++ + cfg_if! { + if #[cfg(any(target_arch = "x86"))] { + mod x86; +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b64/mod.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b64/mod.rs +index 70baf8277a9..5c2e815fd60 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/b64/mod.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b64/mod.rs +@@ -136,9 +136,6 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; + + pub const O_ASYNC: ::c_int = 0x2000; + +-pub const FIOCLEX: ::c_int = 0x5451; +-pub const FIONBIO: ::c_int = 0x5421; +- + pub const RLIMIT_RSS: ::c_int = 5; + pub const RLIMIT_NOFILE: ::c_int = 7; + pub const RLIMIT_AS: ::c_int = 9; +@@ -172,7 +169,6 @@ pub const SOCK_SEQPACKET: ::c_int = 5; + + pub const SOL_SOCKET: ::c_int = 1; + +-pub const EDEADLK: ::c_int = 35; + pub const ENAMETOOLONG: ::c_int = 36; + pub const ENOLCK: ::c_int = 37; + pub const ENOSYS: ::c_int = 38; +@@ -194,7 +190,6 @@ pub const EXFULL: ::c_int = 54; + pub const ENOANO: ::c_int = 55; + pub const EBADRQC: ::c_int = 56; + pub const EBADSLT: ::c_int = 57; +-pub const EDEADLOCK: ::c_int = EDEADLK; + pub const EMULTIHOP: ::c_int = 72; + pub const EBADMSG: ::c_int = 74; + pub const EOVERFLOW: ::c_int = 75; +@@ -272,12 +267,6 @@ pub const SO_PRIORITY: ::c_int = 12; + pub const SO_LINGER: ::c_int = 13; + pub const SO_BSDCOMPAT: ::c_int = 14; + pub const SO_REUSEPORT: ::c_int = 15; +-pub const SO_PASSCRED: ::c_int = 16; +-pub const SO_PEERCRED: ::c_int = 17; +-pub const SO_RCVLOWAT: ::c_int = 18; +-pub const SO_SNDLOWAT: ::c_int = 19; +-pub const SO_RCVTIMEO: ::c_int = 20; +-pub const SO_SNDTIMEO: ::c_int = 21; + pub const SO_ACCEPTCONN: ::c_int = 30; + pub const SO_SNDBUFFORCE: ::c_int = 32; + pub const SO_RCVBUFFORCE: ::c_int = 33; +@@ -312,8 +301,6 @@ pub const SIG_SETMASK: ::c_int = 2; + pub const SIG_BLOCK: ::c_int = 0x000000; + pub const SIG_UNBLOCK: ::c_int = 0x01; + +-pub const EXTPROC: ::tcflag_t = 0x00010000; +- + pub const MAP_HUGETLB: ::c_int = 0x040000; + + pub const F_GETLK: ::c_int = 5; +@@ -323,59 +310,10 @@ pub const F_SETLKW: ::c_int = 7; + pub const F_SETOWN: ::c_int = 8; + + pub const VEOF: usize = 4; +-pub const VEOL: usize = 11; +-pub const VEOL2: usize = 16; +-pub const VMIN: usize = 6; +-pub const IEXTEN: ::tcflag_t = 0x00008000; +-pub const TOSTOP: ::tcflag_t = 0x00000100; +-pub const FLUSHO: ::tcflag_t = 0x00001000; +- +-pub const TCGETS: ::c_int = 0x5401; +-pub const TCSETS: ::c_int = 0x5402; +-pub const TCSETSW: ::c_int = 0x5403; +-pub const TCSETSF: ::c_int = 0x5404; +-pub const TCGETA: ::c_int = 0x5405; +-pub const TCSETA: ::c_int = 0x5406; +-pub const TCSETAW: ::c_int = 0x5407; +-pub const TCSETAF: ::c_int = 0x5408; +-pub const TCSBRK: ::c_int = 0x5409; +-pub const TCXONC: ::c_int = 0x540A; +-pub const TCFLSH: ::c_int = 0x540B; +-pub const TIOCGSOFTCAR: ::c_int = 0x5419; +-pub const TIOCSSOFTCAR: ::c_int = 0x541A; +-pub const TIOCLINUX: ::c_int = 0x541C; +-pub const TIOCGSERIAL: ::c_int = 0x541E; +-pub const TIOCEXCL: ::c_int = 0x540C; +-pub const TIOCNXCL: ::c_int = 0x540D; +-pub const TIOCSCTTY: ::c_int = 0x540E; +-pub const TIOCGPGRP: ::c_int = 0x540F; +-pub const TIOCSPGRP: ::c_int = 0x5410; +-pub const TIOCOUTQ: ::c_int = 0x5411; +-pub const TIOCSTI: ::c_int = 0x5412; +-pub const TIOCGWINSZ: ::c_int = 0x5413; +-pub const TIOCSWINSZ: ::c_int = 0x5414; +-pub const TIOCMGET: ::c_int = 0x5415; +-pub const TIOCMBIS: ::c_int = 0x5416; +-pub const TIOCMBIC: ::c_int = 0x5417; +-pub const TIOCMSET: ::c_int = 0x5418; +-pub const FIONREAD: ::c_int = 0x541B; +-pub const TIOCCONS: ::c_int = 0x541D; + + pub const POLLWRNORM: ::c_short = 0x100; + pub const POLLWRBAND: ::c_short = 0x200; + +-pub const TIOCM_LE: ::c_int = 0x001; +-pub const TIOCM_DTR: ::c_int = 0x002; +-pub const TIOCM_RTS: ::c_int = 0x004; +-pub const TIOCM_ST: ::c_int = 0x008; +-pub const TIOCM_SR: ::c_int = 0x010; +-pub const TIOCM_CTS: ::c_int = 0x020; +-pub const TIOCM_CAR: ::c_int = 0x040; +-pub const TIOCM_RNG: ::c_int = 0x080; +-pub const TIOCM_DSR: ::c_int = 0x100; +-pub const TIOCM_CD: ::c_int = TIOCM_CAR; +-pub const TIOCM_RI: ::c_int = TIOCM_RNG; +- + cfg_if! { + if #[cfg(target_arch = "aarch64")] { + mod aarch64; +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b64/powerpc64.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b64/powerpc64.rs +index 621f9f4ce79..2ac39bf0cd5 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/b64/powerpc64.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b64/powerpc64.rs +@@ -60,22 +60,17 @@ s! { + } + } + +-pub const SYS_pivot_root: ::c_long = 203; +-pub const SYS_gettid: ::c_long = 207; +-pub const SYS_perf_event_open: ::c_long = 319; +-pub const SYS_memfd_create: ::c_long = 360; +- + pub const MAP_32BIT: ::c_int = 0x0040; +-pub const O_DIRECT: ::c_int = 0x4000; +-pub const O_DIRECTORY: ::c_int = 0x10000; +-pub const O_LARGEFILE: ::c_int = 0; +-pub const O_NOFOLLOW: ::c_int = 0x20000; ++pub const O_DIRECT: ::c_int = 0x20000; ++pub const O_DIRECTORY: ::c_int = 0x4000; ++pub const O_LARGEFILE: ::c_int = 0x10000; ++pub const O_NOFOLLOW: ::c_int = 0x8000; + +-pub const SIGSTKSZ: ::size_t = 8192; +-pub const MINSIGSTKSZ: ::size_t = 2048; ++pub const SIGSTKSZ: ::size_t = 10240; ++pub const MINSIGSTKSZ: ::size_t = 4096; + + #[doc(hidden)] +-pub const AF_MAX: ::c_int = 42; ++pub const AF_MAX: ::c_int = 43; + #[doc(hidden)] + pub const PF_MAX: ::c_int = AF_MAX; + +@@ -439,3 +434,139 @@ pub const SYS_copy_file_range: ::c_long = 379; + pub const SYS_preadv2: ::c_long = 380; + pub const SYS_pwritev2: ::c_long = 381; + pub const SYS_kexec_file_load: ::c_long = 382; ++ ++pub const FIOCLEX: ::c_ulong = 0x20006601; ++pub const FIONBIO: ::c_ulong = 0x8004667e; ++pub const EDEADLK: ::c_int = 58; ++pub const EDEADLOCK: ::c_int = EDEADLK; ++pub const SO_PASSCRED: ::c_int = 20; ++pub const SO_PEERCRED: ::c_int = 21; ++pub const SO_RCVLOWAT: ::c_int = 16; ++pub const SO_SNDLOWAT: ::c_int = 17; ++pub const SO_RCVTIMEO: ::c_int = 18; ++pub const SO_SNDTIMEO: ::c_int = 19; ++pub const EXTPROC: ::tcflag_t = 0x10000000; ++pub const VEOL: usize = 6; ++pub const VEOL2: usize = 8; ++pub const VMIN: usize = 5; ++pub const IEXTEN: ::tcflag_t = 0x00000400; ++pub const TOSTOP: ::tcflag_t = 0x00400000; ++pub const FLUSHO: ::tcflag_t = 0x00800000; ++pub const TCGETS: ::c_ulong = 0x403c7413; ++pub const TCSETS: ::c_ulong = 0x803c7414; ++pub const TCSETSW: ::c_ulong = 0x803c7415; ++pub const TCSETSF: ::c_ulong = 0x803c7416; ++pub const TCGETA: ::c_ulong = 0x40147417; ++pub const TCSETA: ::c_ulong = 0x80147418; ++pub const TCSETAW: ::c_ulong = 0x80147419; ++pub const TCSETAF: ::c_ulong = 0x8014741c; ++pub const TCSBRK: ::c_ulong = 0x2000741d; ++pub const TCXONC: ::c_ulong = 0x2000741e; ++pub const TCFLSH: ::c_ulong = 0x2000741f; ++pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; ++pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; ++pub const TIOCLINUX: ::c_ulong = 0x541C; ++pub const TIOCGSERIAL: ::c_ulong = 0x541E; ++pub const TIOCEXCL: ::c_ulong = 0x540C; ++pub const TIOCNXCL: ::c_ulong = 0x540D; ++pub const TIOCSCTTY: ::c_ulong = 0x540E; ++pub const TIOCGPGRP: ::c_ulong = 0x40047477; ++pub const TIOCSPGRP: ::c_ulong = 0x80047476; ++pub const TIOCOUTQ: ::c_ulong = 0x40047473; ++pub const TIOCGWINSZ: ::c_ulong = 0x40087468; ++pub const TIOCSWINSZ: ::c_ulong = 0x80087467; ++pub const TIOCMGET: ::c_ulong = 0x5415; ++pub const TIOCMBIS: ::c_ulong = 0x5416; ++pub const TIOCMBIC: ::c_ulong = 0x5417; ++pub const TIOCMSET: ::c_ulong = 0x5418; ++pub const FIONREAD: ::c_ulong = 0x4004667f; ++pub const TIOCCONS: ::c_ulong = 0x541D; ++pub const TIOCM_LE: ::c_ulong = 0x001; ++pub const TIOCM_DTR: ::c_ulong = 0x002; ++pub const TIOCM_RTS: ::c_ulong = 0x004; ++pub const TIOCM_ST: ::c_ulong = 0x008; ++pub const TIOCM_SR: ::c_ulong = 0x010; ++pub const TIOCM_CTS: ::c_ulong = 0x020; ++pub const TIOCM_CAR: ::c_ulong = 0x040; ++pub const TIOCM_RNG: ::c_ulong = 0x080; ++pub const TIOCM_DSR: ::c_ulong = 0x100; ++pub const TIOCM_CD: ::c_ulong = TIOCM_CAR; ++pub const TIOCM_RI: ::c_ulong = TIOCM_RNG; ++ ++pub const RLIMIT_NLIMITS: ::c_int = 15; ++pub const TIOCINQ: ::c_ulong = ::FIONREAD; ++pub const MCL_CURRENT: ::c_int = 0x2000; ++pub const MCL_FUTURE: ::c_int = 0x4000; ++pub const CBAUD: ::tcflag_t = 0xff; ++pub const TAB1: ::c_int = 0x400; ++pub const TAB2: ::c_int = 0x800; ++pub const TAB3: ::c_int = 0xc00; ++pub const CR1: ::c_int = 0x1000; ++pub const CR2: ::c_int = 0x2000; ++pub const CR3: ::c_int = 0x3000; ++pub const FF1: ::c_int = 0x4000; ++pub const BS1: ::c_int = 0x8000; ++pub const VT1: ::c_int = 0x10000; ++pub const VWERASE: usize = 10; ++pub const VREPRINT: usize = 11; ++pub const VSUSP: usize = 12; ++pub const VSTART: usize = 13; ++pub const VSTOP: usize = 14; ++pub const VDISCARD: usize = 16; ++pub const VTIME: usize = 7; ++pub const IXON: ::tcflag_t = 0x00000200; ++pub const IXOFF: ::tcflag_t = 0x00000400; ++pub const ONLCR: ::tcflag_t = 0x2; ++pub const CSIZE: ::tcflag_t = 0x00000300; ++ ++pub const CS6: ::tcflag_t = 0x00000100; ++pub const CS7: ::tcflag_t = 0x00000200; ++pub const CS8: ::tcflag_t = 0x00000300; ++pub const CSTOPB: ::tcflag_t = 0x00000400; ++pub const CREAD: ::tcflag_t = 0x00000800; ++pub const PARENB: ::tcflag_t = 0x00001000; ++pub const PARODD: ::tcflag_t = 0x00002000; ++pub const HUPCL: ::tcflag_t = 0x00004000; ++pub const CLOCAL: ::tcflag_t = 0x00008000; ++pub const ECHOKE: ::tcflag_t = 0x00000001; ++pub const ECHOE: ::tcflag_t = 0x00000002; ++pub const ECHOK: ::tcflag_t = 0x00000004; ++pub const ECHONL: ::tcflag_t = 0x00000010; ++pub const ECHOPRT: ::tcflag_t = 0x00000020; ++pub const ECHOCTL: ::tcflag_t = 0x00000040; ++pub const ISIG: ::tcflag_t = 0x00000080; ++pub const ICANON: ::tcflag_t = 0x00000100; ++pub const PENDIN: ::tcflag_t = 0x20000000; ++pub const NOFLSH: ::tcflag_t = 0x80000000; ++ ++pub const CIBAUD: ::tcflag_t = 0o77600000; ++pub const CBAUDEX: ::tcflag_t = 0o0000020; ++pub const VSWTC: usize = 9; ++pub const OLCUC: ::tcflag_t = 0o000004; ++pub const NLDLY: ::tcflag_t = 0o0001400; ++pub const CRDLY: ::tcflag_t = 0o0030000; ++pub const TABDLY: ::tcflag_t = 0o0006000; ++pub const BSDLY: ::tcflag_t = 0o0100000; ++pub const FFDLY: ::tcflag_t = 0o0040000; ++pub const VTDLY: ::tcflag_t = 0o0200000; ++pub const XTABS: ::tcflag_t = 0o00006000; ++ ++pub const B57600: ::speed_t = 0o00020; ++pub const B115200: ::speed_t = 0o00021; ++pub const B230400: ::speed_t = 0o00022; ++pub const B460800: ::speed_t = 0o00023; ++pub const B500000: ::speed_t = 0o00024; ++pub const B576000: ::speed_t = 0o00025; ++pub const B921600: ::speed_t = 0o00026; ++pub const B1000000: ::speed_t = 0o00027; ++pub const B1152000: ::speed_t = 0o00030; ++pub const B1500000: ::speed_t = 0o00031; ++pub const B2000000: ::speed_t = 0o00032; ++pub const B2500000: ::speed_t = 0o00033; ++pub const B3000000: ::speed_t = 0o00034; ++pub const B3500000: ::speed_t = 0o00035; ++pub const B4000000: ::speed_t = 0o00036; ++ ++extern { ++ pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; ++} +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b64/x86_64.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b64/x86_64.rs +index 78d38e49e8f..0e0fcec4d2e 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/b64/x86_64.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b64/x86_64.rs +@@ -449,3 +449,139 @@ pub const MINSIGSTKSZ: ::size_t = 2048; + pub const AF_MAX: ::c_int = 42; + #[doc(hidden)] + pub const PF_MAX: ::c_int = AF_MAX; ++ ++pub const RLIMIT_NLIMITS: ::c_int = 16; ++pub const TIOCINQ: ::c_int = ::FIONREAD; ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++pub const CBAUD: ::tcflag_t = 0o0010017; ++pub const TAB1: ::c_int = 0x00000800; ++pub const TAB2: ::c_int = 0x00001000; ++pub const TAB3: ::c_int = 0x00001800; ++pub const CR1: ::c_int = 0x00000200; ++pub const CR2: ::c_int = 0x00000400; ++pub const CR3: ::c_int = 0x00000600; ++pub const FF1: ::c_int = 0x00008000; ++pub const BS1: ::c_int = 0x00002000; ++pub const VT1: ::c_int = 0x00004000; ++pub const VWERASE: usize = 14; ++pub const VREPRINT: usize = 12; ++pub const VSUSP: usize = 10; ++pub const VSTART: usize = 8; ++pub const VSTOP: usize = 9; ++pub const VDISCARD: usize = 13; ++pub const VTIME: usize = 5; ++pub const IXON: ::tcflag_t = 0x00000400; ++pub const IXOFF: ::tcflag_t = 0x00001000; ++pub const ONLCR: ::tcflag_t = 0x4; ++pub const CSIZE: ::tcflag_t = 0x00000030; ++pub const CS6: ::tcflag_t = 0x00000010; ++pub const CS7: ::tcflag_t = 0x00000020; ++pub const CS8: ::tcflag_t = 0x00000030; ++pub const CSTOPB: ::tcflag_t = 0x00000040; ++pub const CREAD: ::tcflag_t = 0x00000080; ++pub const PARENB: ::tcflag_t = 0x00000100; ++pub const PARODD: ::tcflag_t = 0x00000200; ++pub const HUPCL: ::tcflag_t = 0x00000400; ++pub const CLOCAL: ::tcflag_t = 0x00000800; ++pub const ECHOKE: ::tcflag_t = 0x00000800; ++pub const ECHOE: ::tcflag_t = 0x00000010; ++pub const ECHOK: ::tcflag_t = 0x00000020; ++pub const ECHONL: ::tcflag_t = 0x00000040; ++pub const ECHOPRT: ::tcflag_t = 0x00000400; ++pub const ECHOCTL: ::tcflag_t = 0x00000200; ++pub const ISIG: ::tcflag_t = 0x00000001; ++pub const ICANON: ::tcflag_t = 0x00000002; ++pub const PENDIN: ::tcflag_t = 0x00004000; ++pub const NOFLSH: ::tcflag_t = 0x00000080; ++pub const CIBAUD: ::tcflag_t = 0o02003600000; ++pub const CBAUDEX: ::tcflag_t = 0o010000; ++pub const VSWTC: usize = 7; ++pub const OLCUC: ::tcflag_t = 0o000002; ++pub const NLDLY: ::tcflag_t = 0o000400; ++pub const CRDLY: ::tcflag_t = 0o003000; ++pub const TABDLY: ::tcflag_t = 0o014000; ++pub const BSDLY: ::tcflag_t = 0o020000; ++pub const FFDLY: ::tcflag_t = 0o100000; ++pub const VTDLY: ::tcflag_t = 0o040000; ++pub const XTABS: ::tcflag_t = 0o014000; ++pub const B57600: ::speed_t = 0o010001; ++pub const B115200: ::speed_t = 0o010002; ++pub const B230400: ::speed_t = 0o010003; ++pub const B460800: ::speed_t = 0o010004; ++pub const B500000: ::speed_t = 0o010005; ++pub const B576000: ::speed_t = 0o010006; ++pub const B921600: ::speed_t = 0o010007; ++pub const B1000000: ::speed_t = 0o010010; ++pub const B1152000: ::speed_t = 0o010011; ++pub const B1500000: ::speed_t = 0o010012; ++pub const B2000000: ::speed_t = 0o010013; ++pub const B2500000: ::speed_t = 0o010014; ++pub const B3000000: ::speed_t = 0o010015; ++pub const B3500000: ::speed_t = 0o010016; ++pub const B4000000: ::speed_t = 0o010017; ++ ++pub const FIOCLEX: ::c_int = 0x5451; ++pub const FIONBIO: ::c_int = 0x5421; ++pub const EDEADLK: ::c_int = 35; ++pub const EDEADLOCK: ::c_int = EDEADLK; ++pub const SO_PASSCRED: ::c_int = 16; ++pub const SO_PEERCRED: ::c_int = 17; ++pub const SO_RCVLOWAT: ::c_int = 18; ++pub const SO_SNDLOWAT: ::c_int = 19; ++pub const SO_RCVTIMEO: ::c_int = 20; ++pub const SO_SNDTIMEO: ::c_int = 21; ++pub const EXTPROC: ::tcflag_t = 0x00010000; ++pub const VEOL: usize = 11; ++pub const VEOL2: usize = 16; ++pub const VMIN: usize = 6; ++pub const IEXTEN: ::tcflag_t = 0x00008000; ++pub const TOSTOP: ::tcflag_t = 0x00000100; ++pub const FLUSHO: ::tcflag_t = 0x00001000; ++pub const TCGETS: ::c_int = 0x5401; ++pub const TCSETS: ::c_int = 0x5402; ++pub const TCSETSW: ::c_int = 0x5403; ++pub const TCSETSF: ::c_int = 0x5404; ++pub const TCGETA: ::c_int = 0x5405; ++pub const TCSETA: ::c_int = 0x5406; ++pub const TCSETAW: ::c_int = 0x5407; ++pub const TCSETAF: ::c_int = 0x5408; ++pub const TCSBRK: ::c_int = 0x5409; ++pub const TCXONC: ::c_int = 0x540A; ++pub const TCFLSH: ::c_int = 0x540B; ++pub const TIOCGSOFTCAR: ::c_int = 0x5419; ++pub const TIOCSSOFTCAR: ::c_int = 0x541A; ++pub const TIOCLINUX: ::c_int = 0x541C; ++pub const TIOCGSERIAL: ::c_int = 0x541E; ++pub const TIOCEXCL: ::c_int = 0x540C; ++pub const TIOCNXCL: ::c_int = 0x540D; ++pub const TIOCSCTTY: ::c_int = 0x540E; ++pub const TIOCGPGRP: ::c_int = 0x540F; ++pub const TIOCSPGRP: ::c_int = 0x5410; ++pub const TIOCOUTQ: ::c_int = 0x5411; ++pub const TIOCSTI: ::c_int = 0x5412; ++pub const TIOCGWINSZ: ::c_int = 0x5413; ++pub const TIOCSWINSZ: ::c_int = 0x5414; ++pub const TIOCMGET: ::c_int = 0x5415; ++pub const TIOCMBIS: ::c_int = 0x5416; ++pub const TIOCMBIC: ::c_int = 0x5417; ++pub const TIOCMSET: ::c_int = 0x5418; ++pub const FIONREAD: ::c_int = 0x541B; ++pub const TIOCCONS: ::c_int = 0x541D; ++ ++pub const TIOCM_LE: ::c_int = 0x001; ++pub const TIOCM_DTR: ::c_int = 0x002; ++pub const TIOCM_RTS: ::c_int = 0x004; ++pub const TIOCM_ST: ::c_int = 0x008; ++pub const TIOCM_SR: ::c_int = 0x010; ++pub const TIOCM_CTS: ::c_int = 0x020; ++pub const TIOCM_CAR: ::c_int = 0x040; ++pub const TIOCM_RNG: ::c_int = 0x080; ++pub const TIOCM_DSR: ::c_int = 0x100; ++pub const TIOCM_CD: ::c_int = TIOCM_CAR; ++pub const TIOCM_RI: ::c_int = TIOCM_RNG; ++ ++extern { ++ pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; ++} ++ +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/mod.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/mod.rs +index 9a63d1f7330..0d92a4b9d14 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/mod.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/mod.rs +@@ -147,7 +147,6 @@ pub const POSIX_MADV_DONTNEED: ::c_int = 4; + + pub const RLIM_INFINITY: ::rlim_t = !0; + pub const RLIMIT_RTTIME: ::c_int = 15; +-pub const RLIMIT_NLIMITS: ::c_int = 16; + + pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; + +@@ -213,8 +212,6 @@ pub const TCSANOW: ::c_int = 0; + pub const TCSADRAIN: ::c_int = 1; + pub const TCSAFLUSH: ::c_int = 2; + +-pub const TIOCINQ: ::c_int = ::FIONREAD; +- + pub const RTLD_GLOBAL: ::c_int = 0x100; + pub const RTLD_NOLOAD: ::c_int = 0x4; + +@@ -223,61 +220,6 @@ pub const RTLD_NOLOAD: ::c_int = 0x4; + pub const CLOCK_SGI_CYCLE: ::clockid_t = 10; + pub const CLOCK_TAI: ::clockid_t = 11; + +-pub const MCL_CURRENT: ::c_int = 0x0001; +-pub const MCL_FUTURE: ::c_int = 0x0002; +- +-pub const CBAUD: ::tcflag_t = 0o0010017; +-pub const TAB1: ::c_int = 0x00000800; +-pub const TAB2: ::c_int = 0x00001000; +-pub const TAB3: ::c_int = 0x00001800; +-pub const CR1: ::c_int = 0x00000200; +-pub const CR2: ::c_int = 0x00000400; +-pub const CR3: ::c_int = 0x00000600; +-pub const FF1: ::c_int = 0x00008000; +-pub const BS1: ::c_int = 0x00002000; +-pub const VT1: ::c_int = 0x00004000; +-pub const VWERASE: usize = 14; +-pub const VREPRINT: usize = 12; +-pub const VSUSP: usize = 10; +-pub const VSTART: usize = 8; +-pub const VSTOP: usize = 9; +-pub const VDISCARD: usize = 13; +-pub const VTIME: usize = 5; +-pub const IXON: ::tcflag_t = 0x00000400; +-pub const IXOFF: ::tcflag_t = 0x00001000; +-pub const ONLCR: ::tcflag_t = 0x4; +-pub const CSIZE: ::tcflag_t = 0x00000030; +-pub const CS6: ::tcflag_t = 0x00000010; +-pub const CS7: ::tcflag_t = 0x00000020; +-pub const CS8: ::tcflag_t = 0x00000030; +-pub const CSTOPB: ::tcflag_t = 0x00000040; +-pub const CREAD: ::tcflag_t = 0x00000080; +-pub const PARENB: ::tcflag_t = 0x00000100; +-pub const PARODD: ::tcflag_t = 0x00000200; +-pub const HUPCL: ::tcflag_t = 0x00000400; +-pub const CLOCAL: ::tcflag_t = 0x00000800; +-pub const ECHOKE: ::tcflag_t = 0x00000800; +-pub const ECHOE: ::tcflag_t = 0x00000010; +-pub const ECHOK: ::tcflag_t = 0x00000020; +-pub const ECHONL: ::tcflag_t = 0x00000040; +-pub const ECHOPRT: ::tcflag_t = 0x00000400; +-pub const ECHOCTL: ::tcflag_t = 0x00000200; +-pub const ISIG: ::tcflag_t = 0x00000001; +-pub const ICANON: ::tcflag_t = 0x00000002; +-pub const PENDIN: ::tcflag_t = 0x00004000; +-pub const NOFLSH: ::tcflag_t = 0x00000080; +-pub const CIBAUD: ::tcflag_t = 0o02003600000; +-pub const CBAUDEX: ::tcflag_t = 0o010000; +-pub const VSWTC: usize = 7; +-pub const OLCUC: ::tcflag_t = 0o000002; +-pub const NLDLY: ::tcflag_t = 0o000400; +-pub const CRDLY: ::tcflag_t = 0o003000; +-pub const TABDLY: ::tcflag_t = 0o014000; +-pub const BSDLY: ::tcflag_t = 0o020000; +-pub const FFDLY: ::tcflag_t = 0o100000; +-pub const VTDLY: ::tcflag_t = 0o040000; +-pub const XTABS: ::tcflag_t = 0o014000; +- + pub const B0: ::speed_t = 0o000000; + pub const B50: ::speed_t = 0o000001; + pub const B75: ::speed_t = 0o000002; +@@ -296,21 +238,6 @@ pub const B19200: ::speed_t = 0o000016; + pub const B38400: ::speed_t = 0o000017; + pub const EXTA: ::speed_t = B19200; + pub const EXTB: ::speed_t = B38400; +-pub const B57600: ::speed_t = 0o010001; +-pub const B115200: ::speed_t = 0o010002; +-pub const B230400: ::speed_t = 0o010003; +-pub const B460800: ::speed_t = 0o010004; +-pub const B500000: ::speed_t = 0o010005; +-pub const B576000: ::speed_t = 0o010006; +-pub const B921600: ::speed_t = 0o010007; +-pub const B1000000: ::speed_t = 0o010010; +-pub const B1152000: ::speed_t = 0o010011; +-pub const B1500000: ::speed_t = 0o010012; +-pub const B2000000: ::speed_t = 0o010013; +-pub const B2500000: ::speed_t = 0o010014; +-pub const B3000000: ::speed_t = 0o010015; +-pub const B3500000: ::speed_t = 0o010016; +-pub const B4000000: ::speed_t = 0o010017; + + pub const SO_BINDTODEVICE: ::c_int = 25; + pub const SO_TIMESTAMP: ::c_int = 29; +@@ -320,7 +247,6 @@ pub const SO_PEEK_OFF: ::c_int = 42; + pub const SO_BUSY_POLL: ::c_int = 46; + + extern { +- pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; + pub fn ptrace(request: ::c_int, ...) -> ::c_long; + pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; + pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; diff --git a/user/rust/0033-libc-90c01fa6b0f4.patch b/user/rust/0033-libc-90c01fa6b0f4.patch new file mode 100644 index 000000000..5e73c780e --- /dev/null +++ b/user/rust/0033-libc-90c01fa6b0f4.patch @@ -0,0 +1,162 @@ +From 90c01fa6b0f45c63dc19aa75cd39b38d2de5e98b Mon Sep 17 00:00:00 2001 +From: est31 <MTest31@outlook.com> +Date: Sun, 1 Jul 2018 09:25:11 +0200 +Subject: [PATCH] Re-add aarch64 stuff removed by previous commit + +Previous commit + +dcff154781e4b3c6ef3a6a4024c73631f52f48cb +"libc: changes to ppc64le musl branch to support building of rust on Alpine" + +has removed stuff from mod.rs and added it to some submodules, but +missed the aarch64 submodule. + +This copies the stuff that that commit added to the x86_64.rs submodule +and puts it into aarch64.rs. +--- + src/unix/notbsd/linux/musl/b64/aarch64.rs | 135 ++++++++++++++++++++++ + 1 file changed, 135 insertions(+) + +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b64/aarch64.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b64/aarch64.rs +index da0827a7750..98c53dc4f2b 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/b64/aarch64.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b64/aarch64.rs +@@ -339,3 +339,138 @@ pub const SYS_pwritev2: ::c_long = 287; + pub const SYS_pkey_mprotect: ::c_long = 288; + pub const SYS_pkey_alloc: ::c_long = 289; + pub const SYS_pkey_free: ::c_long = 290; ++ ++pub const RLIMIT_NLIMITS: ::c_int = 16; ++pub const TIOCINQ: ::c_int = ::FIONREAD; ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++pub const CBAUD: ::tcflag_t = 0o0010017; ++pub const TAB1: ::c_int = 0x00000800; ++pub const TAB2: ::c_int = 0x00001000; ++pub const TAB3: ::c_int = 0x00001800; ++pub const CR1: ::c_int = 0x00000200; ++pub const CR2: ::c_int = 0x00000400; ++pub const CR3: ::c_int = 0x00000600; ++pub const FF1: ::c_int = 0x00008000; ++pub const BS1: ::c_int = 0x00002000; ++pub const VT1: ::c_int = 0x00004000; ++pub const VWERASE: usize = 14; ++pub const VREPRINT: usize = 12; ++pub const VSUSP: usize = 10; ++pub const VSTART: usize = 8; ++pub const VSTOP: usize = 9; ++pub const VDISCARD: usize = 13; ++pub const VTIME: usize = 5; ++pub const IXON: ::tcflag_t = 0x00000400; ++pub const IXOFF: ::tcflag_t = 0x00001000; ++pub const ONLCR: ::tcflag_t = 0x4; ++pub const CSIZE: ::tcflag_t = 0x00000030; ++pub const CS6: ::tcflag_t = 0x00000010; ++pub const CS7: ::tcflag_t = 0x00000020; ++pub const CS8: ::tcflag_t = 0x00000030; ++pub const CSTOPB: ::tcflag_t = 0x00000040; ++pub const CREAD: ::tcflag_t = 0x00000080; ++pub const PARENB: ::tcflag_t = 0x00000100; ++pub const PARODD: ::tcflag_t = 0x00000200; ++pub const HUPCL: ::tcflag_t = 0x00000400; ++pub const CLOCAL: ::tcflag_t = 0x00000800; ++pub const ECHOKE: ::tcflag_t = 0x00000800; ++pub const ECHOE: ::tcflag_t = 0x00000010; ++pub const ECHOK: ::tcflag_t = 0x00000020; ++pub const ECHONL: ::tcflag_t = 0x00000040; ++pub const ECHOPRT: ::tcflag_t = 0x00000400; ++pub const ECHOCTL: ::tcflag_t = 0x00000200; ++pub const ISIG: ::tcflag_t = 0x00000001; ++pub const ICANON: ::tcflag_t = 0x00000002; ++pub const PENDIN: ::tcflag_t = 0x00004000; ++pub const NOFLSH: ::tcflag_t = 0x00000080; ++pub const CIBAUD: ::tcflag_t = 0o02003600000; ++pub const CBAUDEX: ::tcflag_t = 0o010000; ++pub const VSWTC: usize = 7; ++pub const OLCUC: ::tcflag_t = 0o000002; ++pub const NLDLY: ::tcflag_t = 0o000400; ++pub const CRDLY: ::tcflag_t = 0o003000; ++pub const TABDLY: ::tcflag_t = 0o014000; ++pub const BSDLY: ::tcflag_t = 0o020000; ++pub const FFDLY: ::tcflag_t = 0o100000; ++pub const VTDLY: ::tcflag_t = 0o040000; ++pub const XTABS: ::tcflag_t = 0o014000; ++pub const B57600: ::speed_t = 0o010001; ++pub const B115200: ::speed_t = 0o010002; ++pub const B230400: ::speed_t = 0o010003; ++pub const B460800: ::speed_t = 0o010004; ++pub const B500000: ::speed_t = 0o010005; ++pub const B576000: ::speed_t = 0o010006; ++pub const B921600: ::speed_t = 0o010007; ++pub const B1000000: ::speed_t = 0o010010; ++pub const B1152000: ::speed_t = 0o010011; ++pub const B1500000: ::speed_t = 0o010012; ++pub const B2000000: ::speed_t = 0o010013; ++pub const B2500000: ::speed_t = 0o010014; ++pub const B3000000: ::speed_t = 0o010015; ++pub const B3500000: ::speed_t = 0o010016; ++pub const B4000000: ::speed_t = 0o010017; ++ ++pub const FIOCLEX: ::c_int = 0x5451; ++pub const FIONBIO: ::c_int = 0x5421; ++pub const EDEADLK: ::c_int = 35; ++pub const EDEADLOCK: ::c_int = EDEADLK; ++pub const SO_PASSCRED: ::c_int = 16; ++pub const SO_PEERCRED: ::c_int = 17; ++pub const SO_RCVLOWAT: ::c_int = 18; ++pub const SO_SNDLOWAT: ::c_int = 19; ++pub const SO_RCVTIMEO: ::c_int = 20; ++pub const SO_SNDTIMEO: ::c_int = 21; ++pub const EXTPROC: ::tcflag_t = 0x00010000; ++pub const VEOL: usize = 11; ++pub const VEOL2: usize = 16; ++pub const VMIN: usize = 6; ++pub const IEXTEN: ::tcflag_t = 0x00008000; ++pub const TOSTOP: ::tcflag_t = 0x00000100; ++pub const FLUSHO: ::tcflag_t = 0x00001000; ++pub const TCGETS: ::c_int = 0x5401; ++pub const TCSETS: ::c_int = 0x5402; ++pub const TCSETSW: ::c_int = 0x5403; ++pub const TCSETSF: ::c_int = 0x5404; ++pub const TCGETA: ::c_int = 0x5405; ++pub const TCSETA: ::c_int = 0x5406; ++pub const TCSETAW: ::c_int = 0x5407; ++pub const TCSETAF: ::c_int = 0x5408; ++pub const TCSBRK: ::c_int = 0x5409; ++pub const TCXONC: ::c_int = 0x540A; ++pub const TCFLSH: ::c_int = 0x540B; ++pub const TIOCGSOFTCAR: ::c_int = 0x5419; ++pub const TIOCSSOFTCAR: ::c_int = 0x541A; ++pub const TIOCLINUX: ::c_int = 0x541C; ++pub const TIOCGSERIAL: ::c_int = 0x541E; ++pub const TIOCEXCL: ::c_int = 0x540C; ++pub const TIOCNXCL: ::c_int = 0x540D; ++pub const TIOCSCTTY: ::c_int = 0x540E; ++pub const TIOCGPGRP: ::c_int = 0x540F; ++pub const TIOCSPGRP: ::c_int = 0x5410; ++pub const TIOCOUTQ: ::c_int = 0x5411; ++pub const TIOCSTI: ::c_int = 0x5412; ++pub const TIOCGWINSZ: ::c_int = 0x5413; ++pub const TIOCSWINSZ: ::c_int = 0x5414; ++pub const TIOCMGET: ::c_int = 0x5415; ++pub const TIOCMBIS: ::c_int = 0x5416; ++pub const TIOCMBIC: ::c_int = 0x5417; ++pub const TIOCMSET: ::c_int = 0x5418; ++pub const FIONREAD: ::c_int = 0x541B; ++pub const TIOCCONS: ::c_int = 0x541D; ++ ++pub const TIOCM_LE: ::c_int = 0x001; ++pub const TIOCM_DTR: ::c_int = 0x002; ++pub const TIOCM_RTS: ::c_int = 0x004; ++pub const TIOCM_ST: ::c_int = 0x008; ++pub const TIOCM_SR: ::c_int = 0x010; ++pub const TIOCM_CTS: ::c_int = 0x020; ++pub const TIOCM_CAR: ::c_int = 0x040; ++pub const TIOCM_RNG: ::c_int = 0x080; ++pub const TIOCM_DSR: ::c_int = 0x100; ++pub const TIOCM_CD: ::c_int = TIOCM_CAR; ++pub const TIOCM_RI: ::c_int = TIOCM_RNG; ++ ++extern { ++ pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; ++} diff --git a/user/rust/0034-libc-0163a7ce20b5.patch b/user/rust/0034-libc-0163a7ce20b5.patch new file mode 100644 index 000000000..3a6e6da3b --- /dev/null +++ b/user/rust/0034-libc-0163a7ce20b5.patch @@ -0,0 +1,1343 @@ +From 0163a7ce20b5f4c8d8f725811e48e1f268b0253e Mon Sep 17 00:00:00 2001 +From: Marek Benc <dusxmt@gmx.com> +Date: Thu, 5 Jul 2018 15:51:38 +0200 +Subject: [PATCH] Add linux musl powerpc (32-bit) support + +--- + src/unix/notbsd/linux/musl/b32/arm.rs | 85 +++ + src/unix/notbsd/linux/musl/b32/mips.rs | 85 +++ + src/unix/notbsd/linux/musl/b32/mod.rs | 88 +-- + src/unix/notbsd/linux/musl/b32/powerpc.rs | 866 ++++++++++++++++++++++ + src/unix/notbsd/linux/musl/b32/x86.rs | 85 +++ + src/unix/notbsd/linux/musl/mod.rs | 3 +- + 6 files changed, 1127 insertions(+), 85 deletions(-) + create mode 100644 src/unix/notbsd/linux/musl/b32/powerpc.rs + +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/arm.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/arm.rs +index 22bf16c1fda..20fa33a3f77 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/arm.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/arm.rs +@@ -52,6 +52,18 @@ s! { + pub ss_size: ::size_t + } + ++ pub struct ipc_perm { ++ pub __ipc_perm_key: ::key_t, ++ pub uid: ::uid_t, ++ pub gid: ::gid_t, ++ pub cuid: ::uid_t, ++ pub cgid: ::gid_t, ++ pub mode: ::mode_t, ++ pub __seq: ::c_int, ++ __unused1: ::c_long, ++ __unused2: ::c_long ++ } ++ + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, +@@ -151,6 +163,9 @@ s! { + } + } + ++pub const SIGSTKSZ: ::size_t = 8192; ++pub const MINSIGSTKSZ: ::size_t = 2048; ++ + pub const O_DIRECT: ::c_int = 0x10000; + pub const O_DIRECTORY: ::c_int = 0x4000; + pub const O_NOFOLLOW: ::c_int = 0x8000; +@@ -165,6 +180,76 @@ pub const RLIMIT_NOFILE: ::c_int = 7; + pub const RLIMIT_AS: ::c_int = 9; + pub const RLIMIT_NPROC: ::c_int = 6; + pub const RLIMIT_MEMLOCK: ::c_int = 8; ++pub const RLIMIT_NLIMITS: ::c_int = 16; ++ ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++pub const CBAUD: ::tcflag_t = 0o0010017; ++pub const TAB1: ::c_int = 0x00000800; ++pub const TAB2: ::c_int = 0x00001000; ++pub const TAB3: ::c_int = 0x00001800; ++pub const CR1: ::c_int = 0x00000200; ++pub const CR2: ::c_int = 0x00000400; ++pub const CR3: ::c_int = 0x00000600; ++pub const FF1: ::c_int = 0x00008000; ++pub const BS1: ::c_int = 0x00002000; ++pub const VT1: ::c_int = 0x00004000; ++pub const VWERASE: usize = 14; ++pub const VREPRINT: usize = 12; ++pub const VSUSP: usize = 10; ++pub const VSTART: usize = 8; ++pub const VSTOP: usize = 9; ++pub const VDISCARD: usize = 13; ++pub const VTIME: usize = 5; ++pub const IXON: ::tcflag_t = 0x00000400; ++pub const IXOFF: ::tcflag_t = 0x00001000; ++pub const ONLCR: ::tcflag_t = 0x4; ++pub const CSIZE: ::tcflag_t = 0x00000030; ++pub const CS6: ::tcflag_t = 0x00000010; ++pub const CS7: ::tcflag_t = 0x00000020; ++pub const CS8: ::tcflag_t = 0x00000030; ++pub const CSTOPB: ::tcflag_t = 0x00000040; ++pub const CREAD: ::tcflag_t = 0x00000080; ++pub const PARENB: ::tcflag_t = 0x00000100; ++pub const PARODD: ::tcflag_t = 0x00000200; ++pub const HUPCL: ::tcflag_t = 0x00000400; ++pub const CLOCAL: ::tcflag_t = 0x00000800; ++pub const ECHOKE: ::tcflag_t = 0x00000800; ++pub const ECHOE: ::tcflag_t = 0x00000010; ++pub const ECHOK: ::tcflag_t = 0x00000020; ++pub const ECHONL: ::tcflag_t = 0x00000040; ++pub const ECHOPRT: ::tcflag_t = 0x00000400; ++pub const ECHOCTL: ::tcflag_t = 0x00000200; ++pub const ISIG: ::tcflag_t = 0x00000001; ++pub const ICANON: ::tcflag_t = 0x00000002; ++pub const PENDIN: ::tcflag_t = 0x00004000; ++pub const NOFLSH: ::tcflag_t = 0x00000080; ++pub const CIBAUD: ::tcflag_t = 0o02003600000; ++pub const CBAUDEX: ::tcflag_t = 0o010000; ++pub const VSWTC: usize = 7; ++pub const OLCUC: ::tcflag_t = 0o000002; ++pub const NLDLY: ::tcflag_t = 0o000400; ++pub const CRDLY: ::tcflag_t = 0o003000; ++pub const TABDLY: ::tcflag_t = 0o014000; ++pub const BSDLY: ::tcflag_t = 0o020000; ++pub const FFDLY: ::tcflag_t = 0o100000; ++pub const VTDLY: ::tcflag_t = 0o040000; ++pub const XTABS: ::tcflag_t = 0o014000; ++pub const B57600: ::speed_t = 0o010001; ++pub const B115200: ::speed_t = 0o010002; ++pub const B230400: ::speed_t = 0o010003; ++pub const B460800: ::speed_t = 0o010004; ++pub const B500000: ::speed_t = 0o010005; ++pub const B576000: ::speed_t = 0o010006; ++pub const B921600: ::speed_t = 0o010007; ++pub const B1000000: ::speed_t = 0o010010; ++pub const B1152000: ::speed_t = 0o010011; ++pub const B1500000: ::speed_t = 0o010012; ++pub const B2000000: ::speed_t = 0o010013; ++pub const B2500000: ::speed_t = 0o010014; ++pub const B3000000: ::speed_t = 0o010015; ++pub const B3500000: ::speed_t = 0o010016; ++pub const B4000000: ::speed_t = 0o010017; + + pub const O_APPEND: ::c_int = 1024; + pub const O_CREAT: ::c_int = 64; +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mips.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mips.rs +index 89231a0c751..bfde73c563d 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mips.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mips.rs +@@ -54,6 +54,18 @@ s! { + pub ss_flags: ::c_int, + } + ++ pub struct ipc_perm { ++ pub __ipc_perm_key: ::key_t, ++ pub uid: ::uid_t, ++ pub gid: ::gid_t, ++ pub cuid: ::uid_t, ++ pub cgid: ::gid_t, ++ pub mode: ::mode_t, ++ pub __seq: ::c_int, ++ __unused1: ::c_long, ++ __unused2: ::c_long ++ } ++ + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, +@@ -162,6 +174,9 @@ s! { + } + } + ++pub const SIGSTKSZ: ::size_t = 8192; ++pub const MINSIGSTKSZ: ::size_t = 2048; ++ + pub const O_DIRECT: ::c_int = 0o100000; + pub const O_DIRECTORY: ::c_int = 0o200000; + pub const O_NOFOLLOW: ::c_int = 0o400000; +@@ -176,6 +191,76 @@ pub const RLIMIT_NOFILE: ::c_int = 5; + pub const RLIMIT_AS: ::c_int = 6; + pub const RLIMIT_NPROC: ::c_int = 8; + pub const RLIMIT_MEMLOCK: ::c_int = 9; ++pub const RLIMIT_NLIMITS: ::c_int = 16; ++ ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++pub const CBAUD: ::tcflag_t = 0o0010017; ++pub const TAB1: ::c_int = 0x00000800; ++pub const TAB2: ::c_int = 0x00001000; ++pub const TAB3: ::c_int = 0x00001800; ++pub const CR1: ::c_int = 0x00000200; ++pub const CR2: ::c_int = 0x00000400; ++pub const CR3: ::c_int = 0x00000600; ++pub const FF1: ::c_int = 0x00008000; ++pub const BS1: ::c_int = 0x00002000; ++pub const VT1: ::c_int = 0x00004000; ++pub const VWERASE: usize = 14; ++pub const VREPRINT: usize = 12; ++pub const VSUSP: usize = 10; ++pub const VSTART: usize = 8; ++pub const VSTOP: usize = 9; ++pub const VDISCARD: usize = 13; ++pub const VTIME: usize = 5; ++pub const IXON: ::tcflag_t = 0x00000400; ++pub const IXOFF: ::tcflag_t = 0x00001000; ++pub const ONLCR: ::tcflag_t = 0x4; ++pub const CSIZE: ::tcflag_t = 0x00000030; ++pub const CS6: ::tcflag_t = 0x00000010; ++pub const CS7: ::tcflag_t = 0x00000020; ++pub const CS8: ::tcflag_t = 0x00000030; ++pub const CSTOPB: ::tcflag_t = 0x00000040; ++pub const CREAD: ::tcflag_t = 0x00000080; ++pub const PARENB: ::tcflag_t = 0x00000100; ++pub const PARODD: ::tcflag_t = 0x00000200; ++pub const HUPCL: ::tcflag_t = 0x00000400; ++pub const CLOCAL: ::tcflag_t = 0x00000800; ++pub const ECHOKE: ::tcflag_t = 0x00000800; ++pub const ECHOE: ::tcflag_t = 0x00000010; ++pub const ECHOK: ::tcflag_t = 0x00000020; ++pub const ECHONL: ::tcflag_t = 0x00000040; ++pub const ECHOPRT: ::tcflag_t = 0x00000400; ++pub const ECHOCTL: ::tcflag_t = 0x00000200; ++pub const ISIG: ::tcflag_t = 0x00000001; ++pub const ICANON: ::tcflag_t = 0x00000002; ++pub const PENDIN: ::tcflag_t = 0x00004000; ++pub const NOFLSH: ::tcflag_t = 0x00000080; ++pub const CIBAUD: ::tcflag_t = 0o02003600000; ++pub const CBAUDEX: ::tcflag_t = 0o010000; ++pub const VSWTC: usize = 7; ++pub const OLCUC: ::tcflag_t = 0o000002; ++pub const NLDLY: ::tcflag_t = 0o000400; ++pub const CRDLY: ::tcflag_t = 0o003000; ++pub const TABDLY: ::tcflag_t = 0o014000; ++pub const BSDLY: ::tcflag_t = 0o020000; ++pub const FFDLY: ::tcflag_t = 0o100000; ++pub const VTDLY: ::tcflag_t = 0o040000; ++pub const XTABS: ::tcflag_t = 0o014000; ++pub const B57600: ::speed_t = 0o010001; ++pub const B115200: ::speed_t = 0o010002; ++pub const B230400: ::speed_t = 0o010003; ++pub const B460800: ::speed_t = 0o010004; ++pub const B500000: ::speed_t = 0o010005; ++pub const B576000: ::speed_t = 0o010006; ++pub const B921600: ::speed_t = 0o010007; ++pub const B1000000: ::speed_t = 0o010010; ++pub const B1152000: ::speed_t = 0o010011; ++pub const B1500000: ::speed_t = 0o010012; ++pub const B2000000: ::speed_t = 0o010013; ++pub const B2500000: ::speed_t = 0o010014; ++pub const B3000000: ::speed_t = 0o010015; ++pub const B3500000: ::speed_t = 0o010016; ++pub const B4000000: ::speed_t = 0o010017; + + pub const O_APPEND: ::c_int = 0o010; + pub const O_CREAT: ::c_int = 0o400; +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mod.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mod.rs +index b4a0f761636..4128a8e4da6 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mod.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/mod.rs +@@ -32,96 +32,13 @@ s! { + pub struct sem_t { + __val: [::c_int; 4], + } +- +- pub struct ipc_perm { +- pub __ipc_perm_key: ::key_t, +- pub uid: ::uid_t, +- pub gid: ::gid_t, +- pub cuid: ::uid_t, +- pub cgid: ::gid_t, +- pub mode: ::mode_t, +- pub __seq: ::c_int, +- __unused1: ::c_long, +- __unused2: ::c_long +- } + } + +-pub const SIGSTKSZ: ::size_t = 8192; +-pub const MINSIGSTKSZ: ::size_t = 2048; +- + pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; + pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; + +-pub const RLIMIT_NLIMITS: ::c_int = 16; + pub const TIOCINQ: ::c_int = ::FIONREAD; +-pub const MCL_CURRENT: ::c_int = 0x0001; +-pub const MCL_FUTURE: ::c_int = 0x0002; +-pub const CBAUD: ::tcflag_t = 0o0010017; +-pub const TAB1: ::c_int = 0x00000800; +-pub const TAB2: ::c_int = 0x00001000; +-pub const TAB3: ::c_int = 0x00001800; +-pub const CR1: ::c_int = 0x00000200; +-pub const CR2: ::c_int = 0x00000400; +-pub const CR3: ::c_int = 0x00000600; +-pub const FF1: ::c_int = 0x00008000; +-pub const BS1: ::c_int = 0x00002000; +-pub const VT1: ::c_int = 0x00004000; +-pub const VWERASE: usize = 14; +-pub const VREPRINT: usize = 12; +-pub const VSUSP: usize = 10; +-pub const VSTART: usize = 8; +-pub const VSTOP: usize = 9; +-pub const VDISCARD: usize = 13; +-pub const VTIME: usize = 5; +-pub const IXON: ::tcflag_t = 0x00000400; +-pub const IXOFF: ::tcflag_t = 0x00001000; +-pub const ONLCR: ::tcflag_t = 0x4; +-pub const CSIZE: ::tcflag_t = 0x00000030; +-pub const CS6: ::tcflag_t = 0x00000010; +-pub const CS7: ::tcflag_t = 0x00000020; +-pub const CS8: ::tcflag_t = 0x00000030; +-pub const CSTOPB: ::tcflag_t = 0x00000040; +-pub const CREAD: ::tcflag_t = 0x00000080; +-pub const PARENB: ::tcflag_t = 0x00000100; +-pub const PARODD: ::tcflag_t = 0x00000200; +-pub const HUPCL: ::tcflag_t = 0x00000400; +-pub const CLOCAL: ::tcflag_t = 0x00000800; +-pub const ECHOKE: ::tcflag_t = 0x00000800; +-pub const ECHOE: ::tcflag_t = 0x00000010; +-pub const ECHOK: ::tcflag_t = 0x00000020; +-pub const ECHONL: ::tcflag_t = 0x00000040; +-pub const ECHOPRT: ::tcflag_t = 0x00000400; +-pub const ECHOCTL: ::tcflag_t = 0x00000200; +-pub const ISIG: ::tcflag_t = 0x00000001; +-pub const ICANON: ::tcflag_t = 0x00000002; +-pub const PENDIN: ::tcflag_t = 0x00004000; +-pub const NOFLSH: ::tcflag_t = 0x00000080; +-pub const CIBAUD: ::tcflag_t = 0o02003600000; +-pub const CBAUDEX: ::tcflag_t = 0o010000; +-pub const VSWTC: usize = 7; +-pub const OLCUC: ::tcflag_t = 0o000002; +-pub const NLDLY: ::tcflag_t = 0o000400; +-pub const CRDLY: ::tcflag_t = 0o003000; +-pub const TABDLY: ::tcflag_t = 0o014000; +-pub const BSDLY: ::tcflag_t = 0o020000; +-pub const FFDLY: ::tcflag_t = 0o100000; +-pub const VTDLY: ::tcflag_t = 0o040000; +-pub const XTABS: ::tcflag_t = 0o014000; +-pub const B57600: ::speed_t = 0o010001; +-pub const B115200: ::speed_t = 0o010002; +-pub const B230400: ::speed_t = 0o010003; +-pub const B460800: ::speed_t = 0o010004; +-pub const B500000: ::speed_t = 0o010005; +-pub const B576000: ::speed_t = 0o010006; +-pub const B921600: ::speed_t = 0o010007; +-pub const B1000000: ::speed_t = 0o010010; +-pub const B1152000: ::speed_t = 0o010011; +-pub const B1500000: ::speed_t = 0o010012; +-pub const B2000000: ::speed_t = 0o010013; +-pub const B2500000: ::speed_t = 0o010014; +-pub const B3000000: ::speed_t = 0o010015; +-pub const B3500000: ::speed_t = 0o010016; +-pub const B4000000: ::speed_t = 0o010017; ++ + extern { + pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; + } +@@ -136,6 +53,9 @@ cfg_if! { + } else if #[cfg(any(target_arch = "arm"))] { + mod arm; + pub use self::arm::*; ++ } else if #[cfg(any(target_arch = "powerpc"))] { ++ mod powerpc; ++ pub use self::powerpc::*; + } else { + // Unknown target_arch + } +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/powerpc.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/powerpc.rs +new file mode 100644 +index 00000000000..50b6b57ef11 +--- /dev/null ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/powerpc.rs +@@ -0,0 +1,866 @@ ++pub type c_char = u8; ++pub type wchar_t = i32; ++ ++s! { ++ pub struct stat { ++ pub st_dev: ::dev_t, ++ pub st_ino: ::ino_t, ++ pub st_mode: ::mode_t, ++ pub st_nlink: ::nlink_t, ++ pub st_uid: ::uid_t, ++ pub st_gid: ::gid_t, ++ pub st_rdev: ::dev_t, ++ __st_rdev_padding: ::c_short, ++ pub st_size: ::off_t, ++ pub st_blksize: ::blksize_t, ++ pub st_blocks: ::blkcnt_t, ++ pub st_atime: ::time_t, ++ pub st_atime_nsec: ::c_long, ++ pub st_mtime: ::time_t, ++ pub st_mtime_nsec: ::c_long, ++ pub st_ctime: ::time_t, ++ pub st_ctime_nsec: ::c_long, ++ __unused: [::c_long; 2], ++ } ++ ++ pub struct stat64 { ++ pub st_dev: ::dev_t, ++ pub st_ino: ::ino_t, ++ pub st_mode: ::mode_t, ++ pub st_nlink: ::nlink_t, ++ pub st_uid: ::uid_t, ++ pub st_gid: ::gid_t, ++ pub st_rdev: ::dev_t, ++ __st_rdev_padding: ::c_short, ++ pub st_size: ::off_t, ++ pub st_blksize: ::blksize_t, ++ pub st_blocks: ::blkcnt_t, ++ pub st_atime: ::time_t, ++ pub st_atime_nsec: ::c_long, ++ pub st_mtime: ::time_t, ++ pub st_mtime_nsec: ::c_long, ++ pub st_ctime: ::time_t, ++ pub st_ctime_nsec: ::c_long, ++ __unused: [::c_long; 2], ++ } ++ ++ pub struct stack_t { ++ pub ss_sp: *mut ::c_void, ++ pub ss_flags: ::c_int, ++ pub ss_size: ::size_t ++ } ++ ++ pub struct ipc_perm { ++ pub __ipc_perm_key: ::key_t, ++ pub uid: ::uid_t, ++ pub gid: ::gid_t, ++ pub cuid: ::uid_t, ++ pub cgid: ::gid_t, ++ pub mode: ::mode_t, ++ pub __seq: ::c_int, ++ __pad1: ::c_int, ++ __pad2: ::c_longlong, ++ __pad3: ::c_longlong ++ } ++ ++ pub struct shmid_ds { ++ pub shm_perm: ::ipc_perm, ++ __unused1: ::c_int, ++ pub shm_atime: ::time_t, ++ __unused2: ::c_int, ++ pub shm_dtime: ::time_t, ++ __unused3: ::c_int, ++ pub shm_ctime: ::time_t, ++ __unused4: ::c_int, ++ pub shm_segsz: ::size_t, ++ pub shm_cpid: ::pid_t, ++ pub shm_lpid: ::pid_t, ++ pub shm_nattch: ::c_ulong, ++ __pad1: ::c_ulong, ++ __pad2: ::c_ulong, ++ } ++ ++ pub struct msqid_ds { ++ pub msg_perm: ::ipc_perm, ++ __unused1: ::c_int, ++ pub msg_stime: ::time_t, ++ __unused2: ::c_int, ++ pub msg_rtime: ::time_t, ++ __unused3: ::c_int, ++ pub msg_ctime: ::time_t, ++ __msg_cbytes: ::c_ulong, ++ pub msg_qnum: ::msgqnum_t, ++ pub msg_qbytes: ::msglen_t, ++ pub msg_lspid: ::pid_t, ++ pub msg_lrpid: ::pid_t, ++ __pad1: ::c_ulong, ++ __pad2: ::c_ulong, ++ } ++ ++ pub struct statfs { ++ pub f_type: ::c_ulong, ++ pub f_bsize: ::c_ulong, ++ pub f_blocks: ::fsblkcnt_t, ++ pub f_bfree: ::fsblkcnt_t, ++ pub f_bavail: ::fsblkcnt_t, ++ pub f_files: ::fsfilcnt_t, ++ pub f_ffree: ::fsfilcnt_t, ++ pub f_fsid: ::fsid_t, ++ pub f_namelen: ::c_ulong, ++ pub f_frsize: ::c_ulong, ++ pub f_flags: ::c_ulong, ++ pub f_spare: [::c_ulong; 4], ++ } ++ ++ pub struct siginfo_t { ++ pub si_signo: ::c_int, ++ pub si_errno: ::c_int, ++ pub si_code: ::c_int, ++ pub _pad: [::c_int; 29], ++ _align: [usize; 0], ++ } ++ ++ pub struct statfs64 { ++ pub f_type: ::c_ulong, ++ pub f_bsize: ::c_ulong, ++ pub f_blocks: ::fsblkcnt_t, ++ pub f_bfree: ::fsblkcnt_t, ++ pub f_bavail: ::fsblkcnt_t, ++ pub f_files: ::fsfilcnt_t, ++ pub f_ffree: ::fsfilcnt_t, ++ pub f_fsid: ::fsid_t, ++ pub f_namelen: ::c_ulong, ++ pub f_frsize: ::c_ulong, ++ pub f_flags: ::c_ulong, ++ pub f_spare: [::c_ulong; 4], ++ } ++ ++ pub struct statvfs64 { ++ pub f_bsize: ::c_ulong, ++ pub f_frsize: ::c_ulong, ++ pub f_blocks: u64, ++ pub f_bfree: u64, ++ pub f_bavail: u64, ++ pub f_files: u64, ++ pub f_ffree: u64, ++ pub f_favail: u64, ++ #[cfg(target_endian = "little")] ++ pub f_fsid: ::c_ulong, ++ __f_unused: ::c_int, ++ #[cfg(target_endian = "big")] ++ pub f_fsid: ::c_ulong, ++ pub f_flag: ::c_ulong, ++ pub f_namemax: ::c_ulong, ++ __f_spare: [::c_int; 6], ++ } ++ ++ pub struct termios2 { ++ pub c_iflag: ::tcflag_t, ++ pub c_oflag: ::tcflag_t, ++ pub c_cflag: ::tcflag_t, ++ pub c_lflag: ::tcflag_t, ++ pub c_cc: [::cc_t; 19], ++ pub c_line: ::cc_t, ++ pub c_ispeed: ::speed_t, ++ pub c_ospeed: ::speed_t, ++ } ++} ++ ++pub const SIGSTKSZ: ::size_t = 10240; ++pub const MINSIGSTKSZ: ::size_t = 4096; ++ ++pub const O_DIRECT: ::c_int = 0x20000; ++pub const O_DIRECTORY: ::c_int = 0x4000; ++pub const O_NOFOLLOW: ::c_int = 0x8000; ++pub const O_ASYNC: ::c_int = 0x2000; ++pub const O_LARGEFILE: ::c_int = 0x10000; ++ ++pub const FIOCLEX: ::c_int = 0x20006601; ++pub const FIONBIO: ::c_int = 0x8004667E; ++ ++pub const RLIMIT_RSS: ::c_int = 5; ++pub const RLIMIT_NOFILE: ::c_int = 7; ++pub const RLIMIT_AS: ::c_int = 9; ++pub const RLIMIT_NPROC: ::c_int = 6; ++pub const RLIMIT_MEMLOCK: ::c_int = 8; ++pub const RLIMIT_NLIMITS: ::c_int = 15; ++ ++pub const MCL_CURRENT: ::c_int = 0x2000; ++pub const MCL_FUTURE: ::c_int = 0x4000; ++pub const CBAUD: ::tcflag_t = 0o0000377; ++pub const TAB1: ::c_int = 0x00000400; ++pub const TAB2: ::c_int = 0x00000800; ++pub const TAB3: ::c_int = 0x00000C00; ++pub const CR1: ::c_int = 0x00001000; ++pub const CR2: ::c_int = 0x00002000; ++pub const CR3: ::c_int = 0x00003000; ++pub const FF1: ::c_int = 0x00004000; ++pub const BS1: ::c_int = 0x00008000; ++pub const VT1: ::c_int = 0x00010000; ++pub const VWERASE: usize = 10; ++pub const VREPRINT: usize = 11; ++pub const VSUSP: usize = 12; ++pub const VSTART: usize = 13; ++pub const VSTOP: usize = 14; ++pub const VDISCARD: usize = 16; ++pub const VTIME: usize = 7; ++pub const IXON: ::tcflag_t = 0x00000200; ++pub const IXOFF: ::tcflag_t = 0x00000400; ++pub const ONLCR: ::tcflag_t = 0x00000002; ++pub const CSIZE: ::tcflag_t = 0x00000300; ++pub const CS6: ::tcflag_t = 0x00000100; ++pub const CS7: ::tcflag_t = 0x00000200; ++pub const CS8: ::tcflag_t = 0x00000300; ++pub const CSTOPB: ::tcflag_t = 0x00000400; ++pub const CREAD: ::tcflag_t = 0x00000800; ++pub const PARENB: ::tcflag_t = 0x00001000; ++pub const PARODD: ::tcflag_t = 0x00002000; ++pub const HUPCL: ::tcflag_t = 0x00004000; ++pub const CLOCAL: ::tcflag_t = 0x00008000; ++pub const ECHOKE: ::tcflag_t = 0x00000001; ++pub const ECHOE: ::tcflag_t = 0x00000002; ++pub const ECHOK: ::tcflag_t = 0x00000004; ++pub const ECHONL: ::tcflag_t = 0x00000010; ++pub const ECHOPRT: ::tcflag_t = 0x00000020; ++pub const ECHOCTL: ::tcflag_t = 0x00000040; ++pub const ISIG: ::tcflag_t = 0x00000080; ++pub const ICANON: ::tcflag_t = 0x00000100; ++pub const PENDIN: ::tcflag_t = 0x20000000; ++pub const NOFLSH: ::tcflag_t = 0x80000000; ++pub const CIBAUD: ::tcflag_t = 0o00077600000; ++pub const CBAUDEX: ::tcflag_t = 0o000020; ++pub const VSWTC: usize = 9; ++pub const OLCUC: ::tcflag_t = 0o000004; ++pub const NLDLY: ::tcflag_t = 0o001400; ++pub const CRDLY: ::tcflag_t = 0o030000; ++pub const TABDLY: ::tcflag_t = 0o006000; ++pub const BSDLY: ::tcflag_t = 0o100000; ++pub const FFDLY: ::tcflag_t = 0o040000; ++pub const VTDLY: ::tcflag_t = 0o200000; ++pub const XTABS: ::tcflag_t = 0o006000; ++pub const B57600: ::speed_t = 0o000020; ++pub const B115200: ::speed_t = 0o000021; ++pub const B230400: ::speed_t = 0o000022; ++pub const B460800: ::speed_t = 0o000023; ++pub const B500000: ::speed_t = 0o000024; ++pub const B576000: ::speed_t = 0o000025; ++pub const B921600: ::speed_t = 0o000026; ++pub const B1000000: ::speed_t = 0o000027; ++pub const B1152000: ::speed_t = 0o000030; ++pub const B1500000: ::speed_t = 0o000031; ++pub const B2000000: ::speed_t = 0o000032; ++pub const B2500000: ::speed_t = 0o000033; ++pub const B3000000: ::speed_t = 0o000034; ++pub const B3500000: ::speed_t = 0o000035; ++pub const B4000000: ::speed_t = 0o000036; ++ ++pub const O_APPEND: ::c_int = 1024; ++pub const O_CREAT: ::c_int = 64; ++pub const O_EXCL: ::c_int = 128; ++pub const O_NOCTTY: ::c_int = 256; ++pub const O_NONBLOCK: ::c_int = 2048; ++pub const O_SYNC: ::c_int = 1052672; ++pub const O_RSYNC: ::c_int = 1052672; ++pub const O_DSYNC: ::c_int = 4096; ++ ++pub const SOCK_NONBLOCK: ::c_int = 2048; ++ ++pub const MAP_ANON: ::c_int = 0x0020; ++pub const MAP_GROWSDOWN: ::c_int = 0x0100; ++pub const MAP_DENYWRITE: ::c_int = 0x0800; ++pub const MAP_EXECUTABLE: ::c_int = 0x01000; ++pub const MAP_LOCKED: ::c_int = 0x00080; ++pub const MAP_NORESERVE: ::c_int = 0x00040; ++pub const MAP_POPULATE: ::c_int = 0x08000; ++pub const MAP_NONBLOCK: ::c_int = 0x010000; ++pub const MAP_STACK: ::c_int = 0x020000; ++ ++pub const SOCK_STREAM: ::c_int = 1; ++pub const SOCK_DGRAM: ::c_int = 2; ++pub const SOCK_SEQPACKET: ::c_int = 5; ++ ++pub const SOL_SOCKET: ::c_int = 1; ++ ++pub const EDEADLK: ::c_int = 35; ++pub const ENAMETOOLONG: ::c_int = 36; ++pub const ENOLCK: ::c_int = 37; ++pub const ENOSYS: ::c_int = 38; ++pub const ENOTEMPTY: ::c_int = 39; ++pub const ELOOP: ::c_int = 40; ++pub const ENOMSG: ::c_int = 42; ++pub const EIDRM: ::c_int = 43; ++pub const ECHRNG: ::c_int = 44; ++pub const EL2NSYNC: ::c_int = 45; ++pub const EL3HLT: ::c_int = 46; ++pub const EL3RST: ::c_int = 47; ++pub const ELNRNG: ::c_int = 48; ++pub const EUNATCH: ::c_int = 49; ++pub const ENOCSI: ::c_int = 50; ++pub const EL2HLT: ::c_int = 51; ++pub const EBADE: ::c_int = 52; ++pub const EBADR: ::c_int = 53; ++pub const EXFULL: ::c_int = 54; ++pub const ENOANO: ::c_int = 55; ++pub const EBADRQC: ::c_int = 56; ++pub const EBADSLT: ::c_int = 57; ++pub const EDEADLOCK: ::c_int = 58; ++pub const EMULTIHOP: ::c_int = 72; ++pub const EBADMSG: ::c_int = 74; ++pub const EOVERFLOW: ::c_int = 75; ++pub const ENOTUNIQ: ::c_int = 76; ++pub const EBADFD: ::c_int = 77; ++pub const EREMCHG: ::c_int = 78; ++pub const ELIBACC: ::c_int = 79; ++pub const ELIBBAD: ::c_int = 80; ++pub const ELIBSCN: ::c_int = 81; ++pub const ELIBMAX: ::c_int = 82; ++pub const ELIBEXEC: ::c_int = 83; ++pub const EILSEQ: ::c_int = 84; ++pub const ERESTART: ::c_int = 85; ++pub const ESTRPIPE: ::c_int = 86; ++pub const EUSERS: ::c_int = 87; ++pub const ENOTSOCK: ::c_int = 88; ++pub const EDESTADDRREQ: ::c_int = 89; ++pub const EMSGSIZE: ::c_int = 90; ++pub const EPROTOTYPE: ::c_int = 91; ++pub const ENOPROTOOPT: ::c_int = 92; ++pub const EPROTONOSUPPORT: ::c_int = 93; ++pub const ESOCKTNOSUPPORT: ::c_int = 94; ++pub const EOPNOTSUPP: ::c_int = 95; ++pub const ENOTSUP: ::c_int = EOPNOTSUPP; ++pub const EPFNOSUPPORT: ::c_int = 96; ++pub const EAFNOSUPPORT: ::c_int = 97; ++pub const EADDRINUSE: ::c_int = 98; ++pub const EADDRNOTAVAIL: ::c_int = 99; ++pub const ENETDOWN: ::c_int = 100; ++pub const ENETUNREACH: ::c_int = 101; ++pub const ENETRESET: ::c_int = 102; ++pub const ECONNABORTED: ::c_int = 103; ++pub const ECONNRESET: ::c_int = 104; ++pub const ENOBUFS: ::c_int = 105; ++pub const EISCONN: ::c_int = 106; ++pub const ENOTCONN: ::c_int = 107; ++pub const ESHUTDOWN: ::c_int = 108; ++pub const ETOOMANYREFS: ::c_int = 109; ++pub const ETIMEDOUT: ::c_int = 110; ++pub const ECONNREFUSED: ::c_int = 111; ++pub const EHOSTDOWN: ::c_int = 112; ++pub const EHOSTUNREACH: ::c_int = 113; ++pub const EALREADY: ::c_int = 114; ++pub const EINPROGRESS: ::c_int = 115; ++pub const ESTALE: ::c_int = 116; ++pub const EUCLEAN: ::c_int = 117; ++pub const ENOTNAM: ::c_int = 118; ++pub const ENAVAIL: ::c_int = 119; ++pub const EISNAM: ::c_int = 120; ++pub const EREMOTEIO: ::c_int = 121; ++pub const EDQUOT: ::c_int = 122; ++pub const ENOMEDIUM: ::c_int = 123; ++pub const EMEDIUMTYPE: ::c_int = 124; ++pub const ECANCELED: ::c_int = 125; ++pub const ENOKEY: ::c_int = 126; ++pub const EKEYEXPIRED: ::c_int = 127; ++pub const EKEYREVOKED: ::c_int = 128; ++pub const EKEYREJECTED: ::c_int = 129; ++pub const EOWNERDEAD: ::c_int = 130; ++pub const ENOTRECOVERABLE: ::c_int = 131; ++pub const ERFKILL: ::c_int = 132; ++pub const EHWPOISON: ::c_int = 133; ++ ++pub const SO_REUSEADDR: ::c_int = 2; ++pub const SO_TYPE: ::c_int = 3; ++pub const SO_ERROR: ::c_int = 4; ++pub const SO_DONTROUTE: ::c_int = 5; ++pub const SO_BROADCAST: ::c_int = 6; ++pub const SO_SNDBUF: ::c_int = 7; ++pub const SO_RCVBUF: ::c_int = 8; ++pub const SO_KEEPALIVE: ::c_int = 9; ++pub const SO_OOBINLINE: ::c_int = 10; ++pub const SO_NO_CHECK: ::c_int = 11; ++pub const SO_PRIORITY: ::c_int = 12; ++pub const SO_LINGER: ::c_int = 13; ++pub const SO_BSDCOMPAT: ::c_int = 14; ++pub const SO_REUSEPORT: ::c_int = 15; ++pub const SO_RCVLOWAT: ::c_int = 16; ++pub const SO_SNDLOWAT: ::c_int = 17; ++pub const SO_RCVTIMEO: ::c_int = 18; ++pub const SO_SNDTIMEO: ::c_int = 19; ++pub const SO_PASSCRED: ::c_int = 20; ++pub const SO_PEERCRED: ::c_int = 21; ++pub const SO_ACCEPTCONN: ::c_int = 30; ++pub const SO_SNDBUFFORCE: ::c_int = 32; ++pub const SO_RCVBUFFORCE: ::c_int = 33; ++pub const SO_PROTOCOL: ::c_int = 38; ++pub const SO_DOMAIN: ::c_int = 39; ++ ++pub const SA_ONSTACK: ::c_int = 0x08000000; ++pub const SA_SIGINFO: ::c_int = 0x00000004; ++pub const SA_NOCLDWAIT: ::c_int = 0x00000002; ++ ++pub const SIGCHLD: ::c_int = 17; ++pub const SIGBUS: ::c_int = 7; ++pub const SIGTTIN: ::c_int = 21; ++pub const SIGTTOU: ::c_int = 22; ++pub const SIGXCPU: ::c_int = 24; ++pub const SIGXFSZ: ::c_int = 25; ++pub const SIGVTALRM: ::c_int = 26; ++pub const SIGPROF: ::c_int = 27; ++pub const SIGWINCH: ::c_int = 28; ++pub const SIGUSR1: ::c_int = 10; ++pub const SIGUSR2: ::c_int = 12; ++pub const SIGCONT: ::c_int = 18; ++pub const SIGSTOP: ::c_int = 19; ++pub const SIGTSTP: ::c_int = 20; ++pub const SIGURG: ::c_int = 23; ++pub const SIGIO: ::c_int = 29; ++pub const SIGSYS: ::c_int = 31; ++pub const SIGSTKFLT: ::c_int = 16; ++pub const SIGPOLL: ::c_int = 29; ++pub const SIGPWR: ::c_int = 30; ++pub const SIG_SETMASK: ::c_int = 2; ++pub const SIG_BLOCK: ::c_int = 0x000000; ++pub const SIG_UNBLOCK: ::c_int = 0x01; ++ ++pub const EXTPROC: ::tcflag_t = 0x10000000; ++ ++pub const MAP_HUGETLB: ::c_int = 0x040000; ++ ++pub const F_GETLK: ::c_int = 12; ++pub const F_GETOWN: ::c_int = 9; ++pub const F_SETLK: ::c_int = 13; ++pub const F_SETLKW: ::c_int = 14; ++pub const F_SETOWN: ::c_int = 8; ++ ++pub const VEOF: usize = 4; ++pub const VEOL: usize = 6; ++pub const VEOL2: usize = 8; ++pub const VMIN: usize = 5; ++pub const IEXTEN: ::tcflag_t = 0x00000400; ++pub const TOSTOP: ::tcflag_t = 0x00400000; ++pub const FLUSHO: ::tcflag_t = 0x00800000; ++ ++pub const TCGETS: ::c_int = 0x402C7413; ++pub const TCSETS: ::c_int = 0x802C7414; ++pub const TCSETSW: ::c_int = 0x802C7415; ++pub const TCSETSF: ::c_int = 0x802C7416; ++pub const TCGETA: ::c_int = 0x40147417; ++pub const TCSETA: ::c_int = 0x80147418; ++pub const TCSETAW: ::c_int = 0x80147419; ++pub const TCSETAF: ::c_int = 0x8014741C; ++pub const TCSBRK: ::c_int = 0x2000741D; ++pub const TCXONC: ::c_int = 0x2000741E; ++pub const TCFLSH: ::c_int = 0x2000741F; ++pub const TIOCGSOFTCAR: ::c_int = 0x5419; ++pub const TIOCSSOFTCAR: ::c_int = 0x541A; ++pub const TIOCLINUX: ::c_int = 0x541C; ++pub const TIOCGSERIAL: ::c_int = 0x541E; ++pub const TIOCEXCL: ::c_int = 0x540C; ++pub const TIOCNXCL: ::c_int = 0x540D; ++pub const TIOCSCTTY: ::c_int = 0x540E; ++pub const TIOCGPGRP: ::c_int = 0x40047477; ++pub const TIOCSPGRP: ::c_int = 0x80047476; ++pub const TIOCOUTQ: ::c_int = 0x40047473; ++pub const TIOCSTI: ::c_int = 0x5412; ++pub const TIOCGWINSZ: ::c_int = 0x40087468; ++pub const TIOCSWINSZ: ::c_int = 0x80087467; ++pub const TIOCMGET: ::c_int = 0x5415; ++pub const TIOCMBIS: ::c_int = 0x5416; ++pub const TIOCMBIC: ::c_int = 0x5417; ++pub const TIOCMSET: ::c_int = 0x5418; ++pub const FIONREAD: ::c_int = 0x4004667F; ++pub const TIOCCONS: ::c_int = 0x541D; ++ ++pub const POLLWRNORM: ::c_short = 0x100; ++pub const POLLWRBAND: ::c_short = 0x200; ++ ++pub const TIOCM_LE: ::c_int = 0x001; ++pub const TIOCM_DTR: ::c_int = 0x002; ++pub const TIOCM_RTS: ::c_int = 0x004; ++pub const TIOCM_ST: ::c_int = 0x008; ++pub const TIOCM_SR: ::c_int = 0x010; ++pub const TIOCM_CTS: ::c_int = 0x020; ++pub const TIOCM_CAR: ::c_int = 0x040; ++pub const TIOCM_RNG: ::c_int = 0x080; ++pub const TIOCM_DSR: ::c_int = 0x100; ++pub const TIOCM_CD: ::c_int = TIOCM_CAR; ++pub const TIOCM_RI: ::c_int = TIOCM_RNG; ++ ++// Syscall table ++pub const SYS_restart_syscall: ::c_long = 0; ++pub const SYS_exit: ::c_long = 1; ++pub const SYS_fork: ::c_long = 2; ++pub const SYS_read: ::c_long = 3; ++pub const SYS_write: ::c_long = 4; ++pub const SYS_open: ::c_long = 5; ++pub const SYS_close: ::c_long = 6; ++pub const SYS_waitpid: ::c_long = 7; ++pub const SYS_creat: ::c_long = 8; ++pub const SYS_link: ::c_long = 9; ++pub const SYS_unlink: ::c_long = 10; ++pub const SYS_execve: ::c_long = 11; ++pub const SYS_chdir: ::c_long = 12; ++pub const SYS_time: ::c_long = 13; ++pub const SYS_mknod: ::c_long = 14; ++pub const SYS_chmod: ::c_long = 15; ++pub const SYS_lchown: ::c_long = 16; ++pub const SYS_break: ::c_long = 17; ++pub const SYS_oldstat: ::c_long = 18; ++pub const SYS_lseek: ::c_long = 19; ++pub const SYS_getpid: ::c_long = 20; ++pub const SYS_mount: ::c_long = 21; ++pub const SYS_umount: ::c_long = 22; ++pub const SYS_setuid: ::c_long = 23; ++pub const SYS_getuid: ::c_long = 24; ++pub const SYS_stime: ::c_long = 25; ++pub const SYS_ptrace: ::c_long = 26; ++pub const SYS_alarm: ::c_long = 27; ++pub const SYS_oldfstat: ::c_long = 28; ++pub const SYS_pause: ::c_long = 29; ++pub const SYS_utime: ::c_long = 30; ++pub const SYS_stty: ::c_long = 31; ++pub const SYS_gtty: ::c_long = 32; ++pub const SYS_access: ::c_long = 33; ++pub const SYS_nice: ::c_long = 34; ++pub const SYS_ftime: ::c_long = 35; ++pub const SYS_sync: ::c_long = 36; ++pub const SYS_kill: ::c_long = 37; ++pub const SYS_rename: ::c_long = 38; ++pub const SYS_mkdir: ::c_long = 39; ++pub const SYS_rmdir: ::c_long = 40; ++pub const SYS_dup: ::c_long = 41; ++pub const SYS_pipe: ::c_long = 42; ++pub const SYS_times: ::c_long = 43; ++pub const SYS_prof: ::c_long = 44; ++pub const SYS_brk: ::c_long = 45; ++pub const SYS_setgid: ::c_long = 46; ++pub const SYS_getgid: ::c_long = 47; ++pub const SYS_signal: ::c_long = 48; ++pub const SYS_geteuid: ::c_long = 49; ++pub const SYS_getegid: ::c_long = 50; ++pub const SYS_acct: ::c_long = 51; ++pub const SYS_umount2: ::c_long = 52; ++pub const SYS_lock: ::c_long = 53; ++pub const SYS_ioctl: ::c_long = 54; ++pub const SYS_fcntl: ::c_long = 55; ++pub const SYS_mpx: ::c_long = 56; ++pub const SYS_setpgid: ::c_long = 57; ++pub const SYS_ulimit: ::c_long = 58; ++pub const SYS_oldolduname: ::c_long = 59; ++pub const SYS_umask: ::c_long = 60; ++pub const SYS_chroot: ::c_long = 61; ++pub const SYS_ustat: ::c_long = 62; ++pub const SYS_dup2: ::c_long = 63; ++pub const SYS_getppid: ::c_long = 64; ++pub const SYS_getpgrp: ::c_long = 65; ++pub const SYS_setsid: ::c_long = 66; ++pub const SYS_sigaction: ::c_long = 67; ++pub const SYS_sgetmask: ::c_long = 68; ++pub const SYS_ssetmask: ::c_long = 69; ++pub const SYS_setreuid: ::c_long = 70; ++pub const SYS_setregid: ::c_long = 71; ++pub const SYS_sigsuspend: ::c_long = 72; ++pub const SYS_sigpending: ::c_long = 73; ++pub const SYS_sethostname: ::c_long = 74; ++pub const SYS_setrlimit: ::c_long = 75; ++pub const SYS_getrlimit: ::c_long = 76; ++pub const SYS_getrusage: ::c_long = 77; ++pub const SYS_gettimeofday: ::c_long = 78; ++pub const SYS_settimeofday: ::c_long = 79; ++pub const SYS_getgroups: ::c_long = 80; ++pub const SYS_setgroups: ::c_long = 81; ++pub const SYS_select: ::c_long = 82; ++pub const SYS_symlink: ::c_long = 83; ++pub const SYS_oldlstat: ::c_long = 84; ++pub const SYS_readlink: ::c_long = 85; ++pub const SYS_uselib: ::c_long = 86; ++pub const SYS_swapon: ::c_long = 87; ++pub const SYS_reboot: ::c_long = 88; ++pub const SYS_readdir: ::c_long = 89; ++pub const SYS_mmap: ::c_long = 90; ++pub const SYS_munmap: ::c_long = 91; ++pub const SYS_truncate: ::c_long = 92; ++pub const SYS_ftruncate: ::c_long = 93; ++pub const SYS_fchmod: ::c_long = 94; ++pub const SYS_fchown: ::c_long = 95; ++pub const SYS_getpriority: ::c_long = 96; ++pub const SYS_setpriority: ::c_long = 97; ++pub const SYS_profil: ::c_long = 98; ++pub const SYS_statfs: ::c_long = 99; ++pub const SYS_fstatfs: ::c_long = 100; ++pub const SYS_ioperm: ::c_long = 101; ++pub const SYS_socketcall: ::c_long = 102; ++pub const SYS_syslog: ::c_long = 103; ++pub const SYS_setitimer: ::c_long = 104; ++pub const SYS_getitimer: ::c_long = 105; ++pub const SYS_stat: ::c_long = 106; ++pub const SYS_lstat: ::c_long = 107; ++pub const SYS_fstat: ::c_long = 108; ++pub const SYS_olduname: ::c_long = 109; ++pub const SYS_iopl: ::c_long = 110; ++pub const SYS_vhangup: ::c_long = 111; ++pub const SYS_idle: ::c_long = 112; ++pub const SYS_vm86: ::c_long = 113; ++pub const SYS_wait4: ::c_long = 114; ++pub const SYS_swapoff: ::c_long = 115; ++pub const SYS_sysinfo: ::c_long = 116; ++pub const SYS_ipc: ::c_long = 117; ++pub const SYS_fsync: ::c_long = 118; ++pub const SYS_sigreturn: ::c_long = 119; ++pub const SYS_clone: ::c_long = 120; ++pub const SYS_setdomainname: ::c_long = 121; ++pub const SYS_uname: ::c_long = 122; ++pub const SYS_modify_ldt: ::c_long = 123; ++pub const SYS_adjtimex: ::c_long = 124; ++pub const SYS_mprotect: ::c_long = 125; ++pub const SYS_sigprocmask: ::c_long = 126; ++pub const SYS_create_module: ::c_long = 127; ++pub const SYS_init_module: ::c_long = 128; ++pub const SYS_delete_module: ::c_long = 129; ++pub const SYS_get_kernel_syms: ::c_long = 130; ++pub const SYS_quotactl: ::c_long = 131; ++pub const SYS_getpgid: ::c_long = 132; ++pub const SYS_fchdir: ::c_long = 133; ++pub const SYS_bdflush: ::c_long = 134; ++pub const SYS_sysfs: ::c_long = 135; ++pub const SYS_personality: ::c_long = 136; ++pub const SYS_afs_syscall: ::c_long = 137; ++pub const SYS_setfsuid: ::c_long = 138; ++pub const SYS_setfsgid: ::c_long = 139; ++pub const SYS__llseek: ::c_long = 140; ++pub const SYS_getdents: ::c_long = 141; ++pub const SYS__newselect: ::c_long = 142; ++pub const SYS_flock: ::c_long = 143; ++pub const SYS_msync: ::c_long = 144; ++pub const SYS_readv: ::c_long = 145; ++pub const SYS_writev: ::c_long = 146; ++pub const SYS_getsid: ::c_long = 147; ++pub const SYS_fdatasync: ::c_long = 148; ++pub const SYS__sysctl: ::c_long = 149; ++pub const SYS_mlock: ::c_long = 150; ++pub const SYS_munlock: ::c_long = 151; ++pub const SYS_mlockall: ::c_long = 152; ++pub const SYS_munlockall: ::c_long = 153; ++pub const SYS_sched_setparam: ::c_long = 154; ++pub const SYS_sched_getparam: ::c_long = 155; ++pub const SYS_sched_setscheduler: ::c_long = 156; ++pub const SYS_sched_getscheduler: ::c_long = 157; ++pub const SYS_sched_yield: ::c_long = 158; ++pub const SYS_sched_get_priority_max: ::c_long = 159; ++pub const SYS_sched_get_priority_min: ::c_long = 160; ++pub const SYS_sched_rr_get_interval: ::c_long = 161; ++pub const SYS_nanosleep: ::c_long = 162; ++pub const SYS_mremap: ::c_long = 163; ++pub const SYS_setresuid: ::c_long = 164; ++pub const SYS_getresuid: ::c_long = 165; ++pub const SYS_query_module: ::c_long = 166; ++pub const SYS_poll: ::c_long = 167; ++pub const SYS_nfsservctl: ::c_long = 168; ++pub const SYS_setresgid: ::c_long = 169; ++pub const SYS_getresgid: ::c_long = 170; ++pub const SYS_prctl: ::c_long = 171; ++pub const SYS_rt_sigreturn: ::c_long = 172; ++pub const SYS_rt_sigaction: ::c_long = 173; ++pub const SYS_rt_sigprocmask: ::c_long = 174; ++pub const SYS_rt_sigpending: ::c_long = 175; ++pub const SYS_rt_sigtimedwait: ::c_long = 176; ++pub const SYS_rt_sigqueueinfo: ::c_long = 177; ++pub const SYS_rt_sigsuspend: ::c_long = 178; ++pub const SYS_pread64: ::c_long = 179; ++pub const SYS_pwrite64: ::c_long = 180; ++pub const SYS_chown: ::c_long = 181; ++pub const SYS_getcwd: ::c_long = 182; ++pub const SYS_capget: ::c_long = 183; ++pub const SYS_capset: ::c_long = 184; ++pub const SYS_sigaltstack: ::c_long = 185; ++pub const SYS_sendfile: ::c_long = 186; ++pub const SYS_getpmsg: ::c_long = 187; ++pub const SYS_putpmsg: ::c_long = 188; ++pub const SYS_vfork: ::c_long = 189; ++pub const SYS_ugetrlimit: ::c_long = 190; ++pub const SYS_readahead: ::c_long = 191; ++pub const SYS_mmap2: ::c_long = 192; ++pub const SYS_truncate64: ::c_long = 193; ++pub const SYS_ftruncate64: ::c_long = 194; ++pub const SYS_stat64: ::c_long = 195; ++pub const SYS_lstat64: ::c_long = 196; ++pub const SYS_fstat64: ::c_long = 197; ++pub const SYS_pciconfig_read: ::c_long = 198; ++pub const SYS_pciconfig_write: ::c_long = 199; ++pub const SYS_pciconfig_iobase: ::c_long = 200; ++pub const SYS_multiplexer: ::c_long = 201; ++pub const SYS_getdents64: ::c_long = 202; ++pub const SYS_pivot_root: ::c_long = 203; ++pub const SYS_fcntl64: ::c_long = 204; ++pub const SYS_madvise: ::c_long = 205; ++pub const SYS_mincore: ::c_long = 206; ++pub const SYS_gettid: ::c_long = 207; ++pub const SYS_tkill: ::c_long = 208; ++pub const SYS_setxattr: ::c_long = 209; ++pub const SYS_lsetxattr: ::c_long = 210; ++pub const SYS_fsetxattr: ::c_long = 211; ++pub const SYS_getxattr: ::c_long = 212; ++pub const SYS_lgetxattr: ::c_long = 213; ++pub const SYS_fgetxattr: ::c_long = 214; ++pub const SYS_listxattr: ::c_long = 215; ++pub const SYS_llistxattr: ::c_long = 216; ++pub const SYS_flistxattr: ::c_long = 217; ++pub const SYS_removexattr: ::c_long = 218; ++pub const SYS_lremovexattr: ::c_long = 219; ++pub const SYS_fremovexattr: ::c_long = 220; ++pub const SYS_futex: ::c_long = 221; ++pub const SYS_sched_setaffinity: ::c_long = 222; ++pub const SYS_sched_getaffinity: ::c_long = 223; ++pub const SYS_tuxcall: ::c_long = 225; ++pub const SYS_sendfile64: ::c_long = 226; ++pub const SYS_io_setup: ::c_long = 227; ++pub const SYS_io_destroy: ::c_long = 228; ++pub const SYS_io_getevents: ::c_long = 229; ++pub const SYS_io_submit: ::c_long = 230; ++pub const SYS_io_cancel: ::c_long = 231; ++pub const SYS_set_tid_address: ::c_long = 232; ++pub const SYS_fadvise64: ::c_long = 233; ++pub const SYS_exit_group: ::c_long = 234; ++pub const SYS_lookup_dcookie: ::c_long = 235; ++pub const SYS_epoll_create: ::c_long = 236; ++pub const SYS_epoll_ctl: ::c_long = 237; ++pub const SYS_epoll_wait: ::c_long = 238; ++pub const SYS_remap_file_pages: ::c_long = 239; ++pub const SYS_timer_create: ::c_long = 240; ++pub const SYS_timer_settime: ::c_long = 241; ++pub const SYS_timer_gettime: ::c_long = 242; ++pub const SYS_timer_getoverrun: ::c_long = 243; ++pub const SYS_timer_delete: ::c_long = 244; ++pub const SYS_clock_settime: ::c_long = 245; ++pub const SYS_clock_gettime: ::c_long = 246; ++pub const SYS_clock_getres: ::c_long = 247; ++pub const SYS_clock_nanosleep: ::c_long = 248; ++pub const SYS_swapcontext: ::c_long = 249; ++pub const SYS_tgkill: ::c_long = 250; ++pub const SYS_utimes: ::c_long = 251; ++pub const SYS_statfs64: ::c_long = 252; ++pub const SYS_fstatfs64: ::c_long = 253; ++pub const SYS_fadvise64_64: ::c_long = 254; ++pub const SYS_rtas: ::c_long = 255; ++pub const SYS_sys_debug_setcontext: ::c_long = 256; ++pub const SYS_migrate_pages: ::c_long = 258; ++pub const SYS_mbind: ::c_long = 259; ++pub const SYS_get_mempolicy: ::c_long = 260; ++pub const SYS_set_mempolicy: ::c_long = 261; ++pub const SYS_mq_open: ::c_long = 262; ++pub const SYS_mq_unlink: ::c_long = 263; ++pub const SYS_mq_timedsend: ::c_long = 264; ++pub const SYS_mq_timedreceive: ::c_long = 265; ++pub const SYS_mq_notify: ::c_long = 266; ++pub const SYS_mq_getsetattr: ::c_long = 267; ++pub const SYS_kexec_load: ::c_long = 268; ++pub const SYS_add_key: ::c_long = 269; ++pub const SYS_request_key: ::c_long = 270; ++pub const SYS_keyctl: ::c_long = 271; ++pub const SYS_waitid: ::c_long = 272; ++pub const SYS_ioprio_set: ::c_long = 273; ++pub const SYS_ioprio_get: ::c_long = 274; ++pub const SYS_inotify_init: ::c_long = 275; ++pub const SYS_inotify_add_watch: ::c_long = 276; ++pub const SYS_inotify_rm_watch: ::c_long = 277; ++pub const SYS_spu_run: ::c_long = 278; ++pub const SYS_spu_create: ::c_long = 279; ++pub const SYS_pselect6: ::c_long = 280; ++pub const SYS_ppoll: ::c_long = 281; ++pub const SYS_unshare: ::c_long = 282; ++pub const SYS_splice: ::c_long = 283; ++pub const SYS_tee: ::c_long = 284; ++pub const SYS_vmsplice: ::c_long = 285; ++pub const SYS_openat: ::c_long = 286; ++pub const SYS_mkdirat: ::c_long = 287; ++pub const SYS_mknodat: ::c_long = 288; ++pub const SYS_fchownat: ::c_long = 289; ++pub const SYS_futimesat: ::c_long = 290; ++pub const SYS_fstatat64: ::c_long = 291; ++pub const SYS_unlinkat: ::c_long = 292; ++pub const SYS_renameat: ::c_long = 293; ++pub const SYS_linkat: ::c_long = 294; ++pub const SYS_symlinkat: ::c_long = 295; ++pub const SYS_readlinkat: ::c_long = 296; ++pub const SYS_fchmodat: ::c_long = 297; ++pub const SYS_faccessat: ::c_long = 298; ++pub const SYS_get_robust_list: ::c_long = 299; ++pub const SYS_set_robust_list: ::c_long = 300; ++pub const SYS_move_pages: ::c_long = 301; ++pub const SYS_getcpu: ::c_long = 302; ++pub const SYS_epoll_pwait: ::c_long = 303; ++pub const SYS_utimensat: ::c_long = 304; ++pub const SYS_signalfd: ::c_long = 305; ++pub const SYS_timerfd_create: ::c_long = 306; ++pub const SYS_eventfd: ::c_long = 307; ++pub const SYS_sync_file_range2: ::c_long = 308; ++pub const SYS_fallocate: ::c_long = 309; ++pub const SYS_subpage_prot: ::c_long = 310; ++pub const SYS_timerfd_settime: ::c_long = 311; ++pub const SYS_timerfd_gettime: ::c_long = 312; ++pub const SYS_signalfd4: ::c_long = 313; ++pub const SYS_eventfd2: ::c_long = 314; ++pub const SYS_epoll_create1: ::c_long = 315; ++pub const SYS_dup3: ::c_long = 316; ++pub const SYS_pipe2: ::c_long = 317; ++pub const SYS_inotify_init1: ::c_long = 318; ++pub const SYS_perf_event_open: ::c_long = 319; ++pub const SYS_preadv: ::c_long = 320; ++pub const SYS_pwritev: ::c_long = 321; ++pub const SYS_rt_tgsigqueueinfo: ::c_long = 322; ++pub const SYS_fanotify_init: ::c_long = 323; ++pub const SYS_fanotify_mark: ::c_long = 324; ++pub const SYS_prlimit64: ::c_long = 325; ++pub const SYS_socket: ::c_long = 326; ++pub const SYS_bind: ::c_long = 327; ++pub const SYS_connect: ::c_long = 328; ++pub const SYS_listen: ::c_long = 329; ++pub const SYS_accept: ::c_long = 330; ++pub const SYS_getsockname: ::c_long = 331; ++pub const SYS_getpeername: ::c_long = 332; ++pub const SYS_socketpair: ::c_long = 333; ++pub const SYS_send: ::c_long = 334; ++pub const SYS_sendto: ::c_long = 335; ++pub const SYS_recv: ::c_long = 336; ++pub const SYS_recvfrom: ::c_long = 337; ++pub const SYS_shutdown: ::c_long = 338; ++pub const SYS_setsockopt: ::c_long = 339; ++pub const SYS_getsockopt: ::c_long = 340; ++pub const SYS_sendmsg: ::c_long = 341; ++pub const SYS_recvmsg: ::c_long = 342; ++pub const SYS_recvmmsg: ::c_long = 343; ++pub const SYS_accept4: ::c_long = 344; ++pub const SYS_name_to_handle_at: ::c_long = 345; ++pub const SYS_open_by_handle_at: ::c_long = 346; ++pub const SYS_clock_adjtime: ::c_long = 347; ++pub const SYS_syncfs: ::c_long = 348; ++pub const SYS_sendmmsg: ::c_long = 349; ++pub const SYS_setns: ::c_long = 350; ++pub const SYS_process_vm_readv: ::c_long = 351; ++pub const SYS_process_vm_writev: ::c_long = 352; ++pub const SYS_finit_module: ::c_long = 353; ++pub const SYS_kcmp: ::c_long = 354; ++pub const SYS_sched_setattr: ::c_long = 355; ++pub const SYS_sched_getattr: ::c_long = 356; ++pub const SYS_renameat2: ::c_long = 357; ++pub const SYS_seccomp: ::c_long = 358; ++pub const SYS_getrandom: ::c_long = 359; ++pub const SYS_memfd_create: ::c_long = 360; ++pub const SYS_bpf: ::c_long = 361; ++pub const SYS_execveat: ::c_long = 362; ++pub const SYS_switch_endian: ::c_long = 363; ++pub const SYS_userfaultfd: ::c_long = 364; ++pub const SYS_membarrier: ::c_long = 365; ++pub const SYS_mlock2: ::c_long = 378; ++pub const SYS_copy_file_range: ::c_long = 379; ++pub const SYS_preadv2: ::c_long = 380; ++pub const SYS_pwritev2: ::c_long = 381; ++pub const SYS_kexec_file_load: ::c_long = 382; ++pub const SYS_statx: ::c_long = 383; ++pub const SYS_pkey_alloc: ::c_long = 384; ++pub const SYS_pkey_free: ::c_long = 385; ++pub const SYS_pkey_mprotect: ::c_long = 386; ++ ++#[doc(hidden)] ++pub const AF_MAX: ::c_int = 43; ++#[doc(hidden)] ++pub const PF_MAX: ::c_int = AF_MAX; +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/x86.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/x86.rs +index fa570248c72..9f704c7fac9 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/b32/x86.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/b32/x86.rs +@@ -52,6 +52,18 @@ s! { + pub ss_size: ::size_t + } + ++ pub struct ipc_perm { ++ pub __ipc_perm_key: ::key_t, ++ pub uid: ::uid_t, ++ pub gid: ::gid_t, ++ pub cuid: ::uid_t, ++ pub cgid: ::gid_t, ++ pub mode: ::mode_t, ++ pub __seq: ::c_int, ++ __unused1: ::c_long, ++ __unused2: ::c_long ++ } ++ + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, +@@ -164,6 +176,9 @@ s! { + } + } + ++pub const SIGSTKSZ: ::size_t = 8192; ++pub const MINSIGSTKSZ: ::size_t = 2048; ++ + pub const O_DIRECT: ::c_int = 0x4000; + pub const O_DIRECTORY: ::c_int = 0x10000; + pub const O_NOFOLLOW: ::c_int = 0x20000; +@@ -178,6 +193,76 @@ pub const RLIMIT_NOFILE: ::c_int = 7; + pub const RLIMIT_AS: ::c_int = 9; + pub const RLIMIT_NPROC: ::c_int = 6; + pub const RLIMIT_MEMLOCK: ::c_int = 8; ++pub const RLIMIT_NLIMITS: ::c_int = 16; ++ ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++pub const CBAUD: ::tcflag_t = 0o0010017; ++pub const TAB1: ::c_int = 0x00000800; ++pub const TAB2: ::c_int = 0x00001000; ++pub const TAB3: ::c_int = 0x00001800; ++pub const CR1: ::c_int = 0x00000200; ++pub const CR2: ::c_int = 0x00000400; ++pub const CR3: ::c_int = 0x00000600; ++pub const FF1: ::c_int = 0x00008000; ++pub const BS1: ::c_int = 0x00002000; ++pub const VT1: ::c_int = 0x00004000; ++pub const VWERASE: usize = 14; ++pub const VREPRINT: usize = 12; ++pub const VSUSP: usize = 10; ++pub const VSTART: usize = 8; ++pub const VSTOP: usize = 9; ++pub const VDISCARD: usize = 13; ++pub const VTIME: usize = 5; ++pub const IXON: ::tcflag_t = 0x00000400; ++pub const IXOFF: ::tcflag_t = 0x00001000; ++pub const ONLCR: ::tcflag_t = 0x4; ++pub const CSIZE: ::tcflag_t = 0x00000030; ++pub const CS6: ::tcflag_t = 0x00000010; ++pub const CS7: ::tcflag_t = 0x00000020; ++pub const CS8: ::tcflag_t = 0x00000030; ++pub const CSTOPB: ::tcflag_t = 0x00000040; ++pub const CREAD: ::tcflag_t = 0x00000080; ++pub const PARENB: ::tcflag_t = 0x00000100; ++pub const PARODD: ::tcflag_t = 0x00000200; ++pub const HUPCL: ::tcflag_t = 0x00000400; ++pub const CLOCAL: ::tcflag_t = 0x00000800; ++pub const ECHOKE: ::tcflag_t = 0x00000800; ++pub const ECHOE: ::tcflag_t = 0x00000010; ++pub const ECHOK: ::tcflag_t = 0x00000020; ++pub const ECHONL: ::tcflag_t = 0x00000040; ++pub const ECHOPRT: ::tcflag_t = 0x00000400; ++pub const ECHOCTL: ::tcflag_t = 0x00000200; ++pub const ISIG: ::tcflag_t = 0x00000001; ++pub const ICANON: ::tcflag_t = 0x00000002; ++pub const PENDIN: ::tcflag_t = 0x00004000; ++pub const NOFLSH: ::tcflag_t = 0x00000080; ++pub const CIBAUD: ::tcflag_t = 0o02003600000; ++pub const CBAUDEX: ::tcflag_t = 0o010000; ++pub const VSWTC: usize = 7; ++pub const OLCUC: ::tcflag_t = 0o000002; ++pub const NLDLY: ::tcflag_t = 0o000400; ++pub const CRDLY: ::tcflag_t = 0o003000; ++pub const TABDLY: ::tcflag_t = 0o014000; ++pub const BSDLY: ::tcflag_t = 0o020000; ++pub const FFDLY: ::tcflag_t = 0o100000; ++pub const VTDLY: ::tcflag_t = 0o040000; ++pub const XTABS: ::tcflag_t = 0o014000; ++pub const B57600: ::speed_t = 0o010001; ++pub const B115200: ::speed_t = 0o010002; ++pub const B230400: ::speed_t = 0o010003; ++pub const B460800: ::speed_t = 0o010004; ++pub const B500000: ::speed_t = 0o010005; ++pub const B576000: ::speed_t = 0o010006; ++pub const B921600: ::speed_t = 0o010007; ++pub const B1000000: ::speed_t = 0o010010; ++pub const B1152000: ::speed_t = 0o010011; ++pub const B1500000: ::speed_t = 0o010012; ++pub const B2000000: ::speed_t = 0o010013; ++pub const B2500000: ::speed_t = 0o010014; ++pub const B3000000: ::speed_t = 0o010015; ++pub const B3500000: ::speed_t = 0o010016; ++pub const B4000000: ::speed_t = 0o010017; + + pub const O_APPEND: ::c_int = 1024; + pub const O_CREAT: ::c_int = 64; +diff --git a/src/vendor/libc/src/unix/notbsd/linux/musl/mod.rs b/src/vendor/libc/src/unix/notbsd/linux/musl/mod.rs +index 0d92a4b9d14..10d61ebebef 100644 +--- a/src/vendor/libc/src/unix/notbsd/linux/musl/mod.rs ++++ b/src/vendor/libc/src/unix/notbsd/linux/musl/mod.rs +@@ -260,7 +260,8 @@ cfg_if! { + pub use self::b64::*; + } else if #[cfg(any(target_arch = "x86", + target_arch = "mips", +- target_arch = "arm"))] { ++ target_arch = "arm", ++ target_arch = "powerpc"))] { + mod b32; + pub use self::b32::*; + } else { } diff --git a/user/rust/0035-libc-checksums.patch b/user/rust/0035-libc-checksums.patch new file mode 100644 index 000000000..a8ec2c150 --- /dev/null +++ b/user/rust/0035-libc-checksums.patch @@ -0,0 +1,9 @@ +diff --git a/src/vendor/libc/.cargo-checksum.json b/src/vendor/libc/.cargo-checksum.json +index 5b315f61..c28c8c5c 100644 +--- a/src/vendor/libc/.cargo-checksum.json ++++ b/src/vendor/libc/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"7150ee9391a955b2ef7e0762fc61c0c1aab167620ca36d88d78062d93b8334ba",".travis.yml":"9750910d5fdc61263fb3eae7f5f78e2920923f250150f8500c0c22a830790acd","Cargo.toml":"4629bf1256274045a39aedc78a7f6b48b5bf7fdf177cd69c4eb65909586ab0cf","Cargo.toml.orig":"423b6276994f73cf7fc57dafad118ff8b0e207eb55ebe57a0ee1a149bf36f544","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"fdf0f0c197e2999fce42457fb089f192a42d2fb1f743c9c8fcda1a44cb40e1fa","appveyor.yml":"216f7ac4561aa5810dc84ce5a9950897a8c0496e0615d0211d62348b1c8dc720","ci/README.md":"2e3d7ad13f8c3202e57d2af73aeeebde306221dce7c0907e462e25767a692d6b","ci/android-install-ndk.sh":"725db9025c5905849916bf7c910f98ff0e753484397c2a1f836d48a576d10890","ci/android-install-sdk.sh":"5c3fbe402ac611239ac7715a61f247d1c55fa012f33a5be0b0127dfc196965cf","ci/android-sysimage.sh":"901415631752827454c827e8c51906ba4260612e4021eda98eb7fff771c7d0e8","ci/docker/aarch64-linux-android/Dockerfile":"e17945fba1786dfe766006f50e79baf3f4151ca0c0c14ae96f91483bf345afd7","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"5f430271941e1eecdf9d1a5fb701dd5622e2c4b9da03140fd829bf216e55529d","ci/docker/aarch64-unknown-linux-musl/Dockerfile":"3e1cbf0fa728571b9be9769e5a6281c964fa5b26d586265117ccee017ca4022c","ci/docker/arm-linux-androideabi/Dockerfile":"4e0bdc13254f99bd0db195f91331c634050426e3e4a0fcc63ef25ab795fe2d46","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"dbb025b53b27e406893184290836a50133ecae8295711d5e05b4e41fac9bd262","ci/docker/arm-unknown-linux-musleabihf/Dockerfile":"7cb6e0f8fb91c97f142a9c827687bbbc1a5e7643a3081160025d0365593a596c","ci/docker/asmjs-unknown-emscripten/Dockerfile":"0d9aea5119c2cd136cc2c0a578105d91210e45901ac49b17c5e45f458b1c7551","ci/docker/i686-linux-android/Dockerfile":"4e8377ec0bd9ad2df23bf2c5373200a12750dc9f28c4f10bc83a0150fe1623ee","ci/docker/i686-unknown-linux-gnu/Dockerfile":"f22ac412525ef15b33ab8ccd8193d97346faf421c17f6ddeffc25b651aba83b7","ci/docker/i686-unknown-linux-musl/Dockerfile":"4ac86fe9e159d454616396a9f3f07ce0f5d99cc4b49898b8d2486e6bdbfed9e9","ci/docker/mips-unknown-linux-gnu/Dockerfile":"6d2a9daa299003497c1d441d07b69f730ad75ee49f34520f959b5158e60072e0","ci/docker/mips-unknown-linux-musl/Dockerfile":"4773b2656a7dd6a3b106fcb737428436652edf3d1f48181de3f62c16bf5bd49d","ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile":"7c4d26232f1c1553a6612d9b0b3faac9887e139eaffa025f70d34113dcee812f","ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile":"edb4144c07ade1a8bd65272ec1d3672ad794e9e6b7d01197896e159a70175b58","ci/docker/mipsel-unknown-linux-musl/Dockerfile":"0ca9c12b5618c6d2df04ff820d56fb28e05b43e45eaa506480126b03c5072d48","ci/docker/powerpc-unknown-linux-gnu/Dockerfile":"4b247dcc399395815ec9153c1247cc03d764896c484eddcb196d0bf8650d6311","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"e949717a8ba5e123940729ff47ce1c45989c8b8247c576f1488f698b534e0283","ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile":"018591017f499414a9f79477e1c39baa6a47f71fce6812fb1868fb0fcdfb8cea","ci/docker/s390x-unknown-linux-gnu/Dockerfile":"9860f478c5b2dc3bcf76d2cda7f71922a2a2ef54898cc2ed6ea9b9eff094a5c0","ci/docker/sparc64-unknown-linux-gnu/Dockerfile":"2312491343665d2ab36fd669f14766facbf3c7e9820ffb8f0d623830b676f8f0","ci/docker/wasm32-unknown-emscripten/Dockerfile":"bd072d6ae91a9160693e402dd77462d3c9dd0716711e719a62af330ae479eb4e","ci/docker/wasm32-unknown-emscripten/node-wrapper.sh":"0eef37c3c4fb16dbc083148b7e7af45f2ae60bd9a1b3a77e1d43da79efbd30c6","ci/docker/x86_64-linux-android/Dockerfile":"aeeaa540189ca712369c564c9a14cbace63217dadcfaf879a2cb40fbdeb08199","ci/docker/x86_64-rumprun-netbsd/Dockerfile":"e8f9287b267c6058eec42d1bca0007cb9a78a1d244dd8e11088368cb61fb17d6","ci/docker/x86_64-rumprun-netbsd/runtest.rs":"53302e9ed39293c1ec68ab56287593907d4aaf5bac9c1c2857b29f754a71d62b","ci/docker/x86_64-unknown-freebsd/Dockerfile":"ab1f14c65c29f3721c7c091bdec2e865fb1abf45fdcdc867201d087966e396c4","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"ab3fa45765802b8155996796fcad9fb82096360ac587e38e6faa3ec345268796","ci/docker/x86_64-unknown-linux-gnux32/Dockerfile":"f22ac412525ef15b33ab8ccd8193d97346faf421c17f6ddeffc25b651aba83b7","ci/docker/x86_64-unknown-linux-musl/Dockerfile":"e145784741473150473b1bef7cc3c2cf0c6339d4fc480113ac41b4247a9b38ec","ci/dox.sh":"d77171a9da467bb01fc702a28fc3b5099f82a485a627f3d5593a9830c3e1a77c","ci/emscripten-entry.sh":"c97bbec520b57af9b1ae264ca991560e99c3852c99b00a2f673c614d1ba17498","ci/emscripten.sh":"6f66c7b5c3d34a41afc59ceb0a8c3b0880cd6fd9a6344b874ae80bac0639ccb2","ci/ios/deploy_and_run_on_ios_simulator.rs":"3175066fd7f82390f6226d881e1a1dda9767ea2705656870e0d7774e2731800e","ci/landing-page-footer.html":"b70b3112c2147f5c967e7481061ef38bc2d79a28dd55a16fb916d9c9426da2c4","ci/landing-page-head.html":"ad69663fac7924f27d0209bc519d55838e86edfc4133713a6fd08caadac1b142","ci/linux-s390x.sh":"d6b732d7795b4ba131326aff893bca6228a7d2eb0e9402f135705413dbbe0dce","ci/linux-sparc64.sh":"c92966838b1ab7ad3b7a344833ee726aba6b647cf5952e56f0ad1ba420b13325","ci/run-docker.sh":"be83bc5a8b5ef913a7c9941ffca24734716028650c9a876123c4c160672c18de","ci/run-qemu.sh":"bb859421170871ef23a8940c5e150efec0c01b95e32d2ce2d37b79a45d9d346c","ci/run.sh":"25f8fd0a88d5673bb872dbb7aef8d44ebbf6c863e10352cd79de557ce3e2e252","ci/runtest-android.rs":"a07ddbdd276aedda7876c7e676774178a60d9aeab95df01275a4ee95f59e3044","ci/style.rs":"940c06a676cff1dfc1555b887e46867c6aacc473956cd6aaafaed71824facdb2","ci/test-runner-linux":"cb3713d9e4fa1d9a7c039dfd077af0939921c1f2bf969c9e680ee66e87dc30a4","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"1c2dc787a1b3438970ccd04153c93538719b1a27445707913b90b6f0cdcdde77","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/dox.rs":"8f6037887281b828d8541ce8a549dacaed5d29c05fd9cf78b169838476b82741","src/fuchsia/aarch64.rs":"8366ac6f51e494aad9266ccab2b3a95c5ed7aa3a9f77ea672413283440919743","src/fuchsia/mod.rs":"56ee2333b856db94cc1f1f4350885ad2a4ed0e1b4e8792615aa0b257e2941192","src/fuchsia/powerpc64.rs":"390e8db54271a1d5f512d54a21b328091a792378bf9b42b49b6c1a72388da4ec","src/fuchsia/x86_64.rs":"b4a3eff94dcf1ffe41e6500468ca2cff0e97ddbcc75fe079b6ac7adb1e493f56","src/lib.rs":"e434d3def305ea28108b59841396ef8949333db9223aa11886ee05cd1c0ce8b0","src/macros.rs":"2e7048e266efdef4298254b7186a27736182c94adb0648aed0c8d735f66a5139","src/redox/mod.rs":"029a9af78211d86fe3108100c33f58d6e73ab09c826b641a9732325dc700d8e8","src/redox/net.rs":"0946ab864a2eeb20a365dc541c060f7a238c75356bb57de39956a486607f7ce1","src/unix/bsd/apple/b32.rs":"41699d2802327b0a4d4aa50cd20b1e366b442176cbedab27ca888ac0446c9156","src/unix/bsd/apple/b64.rs":"4fe7bf5de252dcd712dee0a7a8acfaa7c737c862eaa3ff669255d3f2076c5fa6","src/unix/bsd/apple/mod.rs":"3a423665ca29d73a4a29503f5f58277b7d19cb8df175c5f11666983880ef276f","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"1950bf56a7ecbfc8994e4b54dc94e752d91dccd8f0e2d1e4c2d3ad2fa8cb5e23","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"e762bacf0b96295ae241717210323c7442d199d9863159ee73462954fc855e1d","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"d6096edda549bb2af16d083ee86561f5eb6bfa728d3cfac1938f0f84592bde5d","src/unix/bsd/mod.rs":"a1030452eed4ec52a39e9f39040e8fae4309143c7af145efadd9b425caa39672","src/unix/bsd/netbsdlike/mod.rs":"a685c1d23cb17758c3249b9c4ab45a50474e79270891235176b5f796f365380c","src/unix/bsd/netbsdlike/netbsd/mod.rs":"46a28912a4741e500f392131cc71273621de0234c4c28e29d8bf51c015ca7840","src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/netbsd/other/mod.rs":"4d9f7091af8e166943ac6f42ce85558909e5b6e61325039bff7adfbcf4b90212","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"92459d80b8e5b570c0efe35a1d244d38f23072cd28b6581dfcb313dc9bfc3d51","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"cec53623e2269aea4437554a405452e7d3b09648b7cf6872d257d36ba979e2ec","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"820092e397c7ec259cd2de8f2444083a8e57071c02d73d678701dfa7807726e9","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"44035aad2907dffb6b18687ac7ddc76b5268af92b4e4f4c87759a00cae4de900","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"44b7ea81cf363777b29935da175e702cbf45ed78f7498ae57faf44aa32335085","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"7c959cdb3415f68a0f948117b9aa87a17463e57ab97cc3235f2567454b706653","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"ddd834c5c4e5ec7771d0f0071517c2d00095d5595f87a52245380ac762f7f011","src/unix/mod.rs":"47d253eef3bc46dacb0df2951b2136e41c4e758ffd34473b144f6108a90749f9","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"7422845a44de13a2faf15d105670525ed090c6e200c9723178ed735810bbd689","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"2fbe398c1fb5251dda6213741a193e50aae4622807cb255d1dd2e82b536f0c65","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"90d4f6b063fd4de42fd302cbc9d9902fd99ac1d71dc48cb8bc6ad7b4c902e481","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"c83157cf4a74c653b877c4d42b565d4a7d31e46e32015f19fc91447df2489a58","src/unix/notbsd/emscripten.rs":"5beb9bc98b6b317e85f2935db2aad9ef9cb2ab2e881917064fa7adf944568dae","src/unix/notbsd/linux/mips/mips32.rs":"df3268b082962844c94733c58782ecd9386ffe1f5ed8e05a703a6fa1e80b8f7f","src/unix/notbsd/linux/mips/mips64.rs":"88ad72fa125b9a2c0bd98ef03a7f5ceff78a39b0628d0d0f997ac9b6b82fe16b","src/unix/notbsd/linux/mips/mod.rs":"32c3e7cf430575544bbe4a670cbbf2b4dbe1f28b4895feb6f43fa33d6da25e1d","src/unix/notbsd/linux/mod.rs":"d37bd8bd956b7ab3484b2ad3ee7c1848574bbd37027c76ac06f4d7ca2906cf01","src/unix/notbsd/linux/musl/b32/arm.rs":"d2998b13648696304bb34f0793715d821178baf8e88a45b532764a20b5294232","src/unix/notbsd/linux/musl/b32/mips.rs":"340be794362a4532d709ef23542b10762f710f7bfd0c4fafa5166a3fb9a15b4f","src/unix/notbsd/linux/musl/b32/mod.rs":"3cc7979546258a47df6b0fcd7ad64571826623671857633a7acafe87e05e56a1","src/unix/notbsd/linux/musl/b32/x86.rs":"df114102dcf35bc32f891d4a9e09ce02fbe4c096a196c6b98b10ff87b29dbe4d","src/unix/notbsd/linux/musl/b64/aarch64.rs":"12c590fde2a1450c08934234c4f5bcd94ee7b58ca21f8e93bc930148c15fb0b0","src/unix/notbsd/linux/musl/b64/mod.rs":"b1991ef46a00d2db7ce3e36f6596685c1d508786c4dd4e62cbbf65ac3c256cc0","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"790dca3cc6c0a4166992d2c1665e1b1e320fbad5c0b1ba3c454321a6b2d7a103","src/unix/notbsd/linux/musl/b64/x86_64.rs":"bf8fc10a09bf700084db0381c484ddec3add79aa1726954cb14d21802ff7d199","src/unix/notbsd/linux/musl/mod.rs":"a9323bffa1a8ed40a67a3b2cbb1dec6ebb0d565d8308e43e8623101ac739cd60","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"7d77f1dd8327b1249769496351cf287d0fff3852f87bde2f58afc67e6dc54a4f","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"49376e3ed0f3ff95c230ac20751911fe3c608dfe15c7c118b069fd7a954d8db9","src/unix/notbsd/linux/other/b64/aarch64.rs":"ed6ea00e3281ad2f4bab82821f20a2ff5b48401a65618bd6a544bc24ea4e3e39","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"9b5e2321c0114c2740dcb86d9f1f3584c07ded921a157164ae8bb0712d397818","src/unix/notbsd/linux/other/b64/powerpc64.rs":"ca25b5f94a9147a984fcb70cf48a261b30df14e2e8194ac174363b6280e82a29","src/unix/notbsd/linux/other/b64/sparc64.rs":"a84580fe226654e33f8ddd0f1f7f2069c29334fc826a74f81f7892b87cfb9083","src/unix/notbsd/linux/other/b64/x32.rs":"ae7698b217106a6c00465f9d10df24d45ad9b7dfc280b24168f53f42198b7b92","src/unix/notbsd/linux/other/b64/x86_64.rs":"afba464e903d350325a1ca3d9d5af1659efc0ede83a43dbac4dbd60c522e2ad1","src/unix/notbsd/linux/other/mod.rs":"7065a7e83834f38ee2f4e03f28824eb94111c13f10e7a8b76ee7025686a84e7f","src/unix/notbsd/linux/s390x.rs":"259c5533ba7f0b10bb23d01dc0e53301afd236a7bb4339dcef9472c579503729","src/unix/notbsd/mod.rs":"eff4c19451d4d4579d5c483a941a7b259b7b73c3ab13c31fc54a7961e8292b9a","src/unix/solaris/mod.rs":"9c6af198a2f80da827054784faf70bc404673d9568fb45664b4f73c46245fdbd","src/unix/uclibc/mips/mips32.rs":"4dcb19abae37f02f08660bdad500c3230436322b581eba37287c73a742d6fcdc","src/unix/uclibc/mips/mips64.rs":"e67eec1636a998b047d89a4cda1c99cb6bc3071db017762675179a68201c4438","src/unix/uclibc/mips/mod.rs":"3f86061d05a8da7d923310550b7d40c6223f0c907d77edc86b7a78da1d647f76","src/unix/uclibc/mod.rs":"3605127517734b5f5f20be1d37e52184a77ecc6fb6099b88aa744e0aca1b802a","src/unix/uclibc/x86_64/l4re.rs":"68fd3a833fd1f7caf784a084224f384bdbdfb8b5a14ef94c4f5155409afb3439","src/unix/uclibc/x86_64/mod.rs":"69ec3ca821a483cc076e84a794bbecb3e5536af1c1d5b807eaf1db9af11f771d","src/unix/uclibc/x86_64/other.rs":"f03b47842896f2f3ae6f8ebdcbcf0276454f880349d9cf00e3d304f8136893c5","src/windows.rs":"e41357d610608bad81abf285306ad8b127b6f02d5132f63c4942861980b47d59"},"package":"b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1"} +\ No newline at end of file ++{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"7150ee9391a955b2ef7e0762fc61c0c1aab167620ca36d88d78062d93b8334ba",".travis.yml":"9750910d5fdc61263fb3eae7f5f78e2920923f250150f8500c0c22a830790acd","Cargo.toml":"4629bf1256274045a39aedc78a7f6b48b5bf7fdf177cd69c4eb65909586ab0cf","Cargo.toml.orig":"423b6276994f73cf7fc57dafad118ff8b0e207eb55ebe57a0ee1a149bf36f544","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"fdf0f0c197e2999fce42457fb089f192a42d2fb1f743c9c8fcda1a44cb40e1fa","appveyor.yml":"216f7ac4561aa5810dc84ce5a9950897a8c0496e0615d0211d62348b1c8dc720","ci/README.md":"2e3d7ad13f8c3202e57d2af73aeeebde306221dce7c0907e462e25767a692d6b","ci/android-install-ndk.sh":"725db9025c5905849916bf7c910f98ff0e753484397c2a1f836d48a576d10890","ci/android-install-sdk.sh":"5c3fbe402ac611239ac7715a61f247d1c55fa012f33a5be0b0127dfc196965cf","ci/android-sysimage.sh":"901415631752827454c827e8c51906ba4260612e4021eda98eb7fff771c7d0e8","ci/docker/aarch64-linux-android/Dockerfile":"e17945fba1786dfe766006f50e79baf3f4151ca0c0c14ae96f91483bf345afd7","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"5f430271941e1eecdf9d1a5fb701dd5622e2c4b9da03140fd829bf216e55529d","ci/docker/aarch64-unknown-linux-musl/Dockerfile":"3e1cbf0fa728571b9be9769e5a6281c964fa5b26d586265117ccee017ca4022c","ci/docker/arm-linux-androideabi/Dockerfile":"4e0bdc13254f99bd0db195f91331c634050426e3e4a0fcc63ef25ab795fe2d46","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"dbb025b53b27e406893184290836a50133ecae8295711d5e05b4e41fac9bd262","ci/docker/arm-unknown-linux-musleabihf/Dockerfile":"7cb6e0f8fb91c97f142a9c827687bbbc1a5e7643a3081160025d0365593a596c","ci/docker/asmjs-unknown-emscripten/Dockerfile":"0d9aea5119c2cd136cc2c0a578105d91210e45901ac49b17c5e45f458b1c7551","ci/docker/i686-linux-android/Dockerfile":"4e8377ec0bd9ad2df23bf2c5373200a12750dc9f28c4f10bc83a0150fe1623ee","ci/docker/i686-unknown-linux-gnu/Dockerfile":"f22ac412525ef15b33ab8ccd8193d97346faf421c17f6ddeffc25b651aba83b7","ci/docker/i686-unknown-linux-musl/Dockerfile":"4ac86fe9e159d454616396a9f3f07ce0f5d99cc4b49898b8d2486e6bdbfed9e9","ci/docker/mips-unknown-linux-gnu/Dockerfile":"6d2a9daa299003497c1d441d07b69f730ad75ee49f34520f959b5158e60072e0","ci/docker/mips-unknown-linux-musl/Dockerfile":"4773b2656a7dd6a3b106fcb737428436652edf3d1f48181de3f62c16bf5bd49d","ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile":"7c4d26232f1c1553a6612d9b0b3faac9887e139eaffa025f70d34113dcee812f","ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile":"edb4144c07ade1a8bd65272ec1d3672ad794e9e6b7d01197896e159a70175b58","ci/docker/mipsel-unknown-linux-musl/Dockerfile":"0ca9c12b5618c6d2df04ff820d56fb28e05b43e45eaa506480126b03c5072d48","ci/docker/powerpc-unknown-linux-gnu/Dockerfile":"4b247dcc399395815ec9153c1247cc03d764896c484eddcb196d0bf8650d6311","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"e949717a8ba5e123940729ff47ce1c45989c8b8247c576f1488f698b534e0283","ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile":"018591017f499414a9f79477e1c39baa6a47f71fce6812fb1868fb0fcdfb8cea","ci/docker/s390x-unknown-linux-gnu/Dockerfile":"9860f478c5b2dc3bcf76d2cda7f71922a2a2ef54898cc2ed6ea9b9eff094a5c0","ci/docker/sparc64-unknown-linux-gnu/Dockerfile":"2312491343665d2ab36fd669f14766facbf3c7e9820ffb8f0d623830b676f8f0","ci/docker/wasm32-unknown-emscripten/Dockerfile":"bd072d6ae91a9160693e402dd77462d3c9dd0716711e719a62af330ae479eb4e","ci/docker/wasm32-unknown-emscripten/node-wrapper.sh":"0eef37c3c4fb16dbc083148b7e7af45f2ae60bd9a1b3a77e1d43da79efbd30c6","ci/docker/x86_64-linux-android/Dockerfile":"aeeaa540189ca712369c564c9a14cbace63217dadcfaf879a2cb40fbdeb08199","ci/docker/x86_64-rumprun-netbsd/Dockerfile":"e8f9287b267c6058eec42d1bca0007cb9a78a1d244dd8e11088368cb61fb17d6","ci/docker/x86_64-rumprun-netbsd/runtest.rs":"53302e9ed39293c1ec68ab56287593907d4aaf5bac9c1c2857b29f754a71d62b","ci/docker/x86_64-unknown-freebsd/Dockerfile":"ab1f14c65c29f3721c7c091bdec2e865fb1abf45fdcdc867201d087966e396c4","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"ab3fa45765802b8155996796fcad9fb82096360ac587e38e6faa3ec345268796","ci/docker/x86_64-unknown-linux-gnux32/Dockerfile":"f22ac412525ef15b33ab8ccd8193d97346faf421c17f6ddeffc25b651aba83b7","ci/docker/x86_64-unknown-linux-musl/Dockerfile":"e145784741473150473b1bef7cc3c2cf0c6339d4fc480113ac41b4247a9b38ec","ci/dox.sh":"d77171a9da467bb01fc702a28fc3b5099f82a485a627f3d5593a9830c3e1a77c","ci/emscripten-entry.sh":"c97bbec520b57af9b1ae264ca991560e99c3852c99b00a2f673c614d1ba17498","ci/emscripten.sh":"6f66c7b5c3d34a41afc59ceb0a8c3b0880cd6fd9a6344b874ae80bac0639ccb2","ci/ios/deploy_and_run_on_ios_simulator.rs":"3175066fd7f82390f6226d881e1a1dda9767ea2705656870e0d7774e2731800e","ci/landing-page-footer.html":"b70b3112c2147f5c967e7481061ef38bc2d79a28dd55a16fb916d9c9426da2c4","ci/landing-page-head.html":"ad69663fac7924f27d0209bc519d55838e86edfc4133713a6fd08caadac1b142","ci/linux-s390x.sh":"d6b732d7795b4ba131326aff893bca6228a7d2eb0e9402f135705413dbbe0dce","ci/linux-sparc64.sh":"c92966838b1ab7ad3b7a344833ee726aba6b647cf5952e56f0ad1ba420b13325","ci/run-docker.sh":"be83bc5a8b5ef913a7c9941ffca24734716028650c9a876123c4c160672c18de","ci/run-qemu.sh":"bb859421170871ef23a8940c5e150efec0c01b95e32d2ce2d37b79a45d9d346c","ci/run.sh":"25f8fd0a88d5673bb872dbb7aef8d44ebbf6c863e10352cd79de557ce3e2e252","ci/runtest-android.rs":"a07ddbdd276aedda7876c7e676774178a60d9aeab95df01275a4ee95f59e3044","ci/style.rs":"940c06a676cff1dfc1555b887e46867c6aacc473956cd6aaafaed71824facdb2","ci/test-runner-linux":"cb3713d9e4fa1d9a7c039dfd077af0939921c1f2bf969c9e680ee66e87dc30a4","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"1c2dc787a1b3438970ccd04153c93538719b1a27445707913b90b6f0cdcdde77","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/dox.rs":"8f6037887281b828d8541ce8a549dacaed5d29c05fd9cf78b169838476b82741","src/fuchsia/aarch64.rs":"8366ac6f51e494aad9266ccab2b3a95c5ed7aa3a9f77ea672413283440919743","src/fuchsia/mod.rs":"56ee2333b856db94cc1f1f4350885ad2a4ed0e1b4e8792615aa0b257e2941192","src/fuchsia/powerpc64.rs":"390e8db54271a1d5f512d54a21b328091a792378bf9b42b49b6c1a72388da4ec","src/fuchsia/x86_64.rs":"b4a3eff94dcf1ffe41e6500468ca2cff0e97ddbcc75fe079b6ac7adb1e493f56","src/lib.rs":"e434d3def305ea28108b59841396ef8949333db9223aa11886ee05cd1c0ce8b0","src/macros.rs":"2e7048e266efdef4298254b7186a27736182c94adb0648aed0c8d735f66a5139","src/redox/mod.rs":"029a9af78211d86fe3108100c33f58d6e73ab09c826b641a9732325dc700d8e8","src/redox/net.rs":"0946ab864a2eeb20a365dc541c060f7a238c75356bb57de39956a486607f7ce1","src/unix/bsd/apple/b32.rs":"41699d2802327b0a4d4aa50cd20b1e366b442176cbedab27ca888ac0446c9156","src/unix/bsd/apple/b64.rs":"4fe7bf5de252dcd712dee0a7a8acfaa7c737c862eaa3ff669255d3f2076c5fa6","src/unix/bsd/apple/mod.rs":"3a423665ca29d73a4a29503f5f58277b7d19cb8df175c5f11666983880ef276f","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"1950bf56a7ecbfc8994e4b54dc94e752d91dccd8f0e2d1e4c2d3ad2fa8cb5e23","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"e762bacf0b96295ae241717210323c7442d199d9863159ee73462954fc855e1d","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"d6096edda549bb2af16d083ee86561f5eb6bfa728d3cfac1938f0f84592bde5d","src/unix/bsd/mod.rs":"a1030452eed4ec52a39e9f39040e8fae4309143c7af145efadd9b425caa39672","src/unix/bsd/netbsdlike/mod.rs":"a685c1d23cb17758c3249b9c4ab45a50474e79270891235176b5f796f365380c","src/unix/bsd/netbsdlike/netbsd/mod.rs":"46a28912a4741e500f392131cc71273621de0234c4c28e29d8bf51c015ca7840","src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/netbsd/other/mod.rs":"4d9f7091af8e166943ac6f42ce85558909e5b6e61325039bff7adfbcf4b90212","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"92459d80b8e5b570c0efe35a1d244d38f23072cd28b6581dfcb313dc9bfc3d51","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"cec53623e2269aea4437554a405452e7d3b09648b7cf6872d257d36ba979e2ec","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"820092e397c7ec259cd2de8f2444083a8e57071c02d73d678701dfa7807726e9","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"44035aad2907dffb6b18687ac7ddc76b5268af92b4e4f4c87759a00cae4de900","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"44b7ea81cf363777b29935da175e702cbf45ed78f7498ae57faf44aa32335085","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"7c959cdb3415f68a0f948117b9aa87a17463e57ab97cc3235f2567454b706653","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"ddd834c5c4e5ec7771d0f0071517c2d00095d5595f87a52245380ac762f7f011","src/unix/mod.rs":"47d253eef3bc46dacb0df2951b2136e41c4e758ffd34473b144f6108a90749f9","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"7422845a44de13a2faf15d105670525ed090c6e200c9723178ed735810bbd689","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"2fbe398c1fb5251dda6213741a193e50aae4622807cb255d1dd2e82b536f0c65","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"90d4f6b063fd4de42fd302cbc9d9902fd99ac1d71dc48cb8bc6ad7b4c902e481","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"c83157cf4a74c653b877c4d42b565d4a7d31e46e32015f19fc91447df2489a58","src/unix/notbsd/emscripten.rs":"5beb9bc98b6b317e85f2935db2aad9ef9cb2ab2e881917064fa7adf944568dae","src/unix/notbsd/linux/mips/mips32.rs":"df3268b082962844c94733c58782ecd9386ffe1f5ed8e05a703a6fa1e80b8f7f","src/unix/notbsd/linux/mips/mips64.rs":"88ad72fa125b9a2c0bd98ef03a7f5ceff78a39b0628d0d0f997ac9b6b82fe16b","src/unix/notbsd/linux/mips/mod.rs":"32c3e7cf430575544bbe4a670cbbf2b4dbe1f28b4895feb6f43fa33d6da25e1d","src/unix/notbsd/linux/mod.rs":"d37bd8bd956b7ab3484b2ad3ee7c1848574bbd37027c76ac06f4d7ca2906cf01","src/unix/notbsd/linux/musl/b32/arm.rs":"9d9bff31ab0925a1f62a20945d36a83b94ce3ab78dd202cd468bb31556b21725","src/unix/notbsd/linux/musl/b32/mips.rs":"cb38c463aebfc235f31880db158dd47c6e21f182a092d3f3087d92994b7711da","src/unix/notbsd/linux/musl/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/x86.rs":"c02dd333012cf65cb8873fa211eff5e63d466be55451a347510e3d4f50ed515e","src/unix/notbsd/linux/musl/b64/aarch64.rs":"4d79d86d11fbb8cb7a74084e410a1140e3c89dfc1842cdfb213f3a0ca93046df","src/unix/notbsd/linux/musl/b64/mod.rs":"caac00326693b372d6805e4dda239475e7fef36368881f372c006264844fda0d","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"24514e41be4b5f5e0ffbe8a25a99dae8989489b607db59e8bfa345f8e65c9963","src/unix/notbsd/linux/musl/b64/x86_64.rs":"25340999290a63d564ec149532c905f59c312ec369f8806d6b15df66fa1b8857","src/unix/notbsd/linux/musl/mod.rs":"17c70acf9c6eabeb73916c2abb7d7e8b0310214090faae4a8dc2fd183a9b45ba","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"7d77f1dd8327b1249769496351cf287d0fff3852f87bde2f58afc67e6dc54a4f","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"49376e3ed0f3ff95c230ac20751911fe3c608dfe15c7c118b069fd7a954d8db9","src/unix/notbsd/linux/other/b64/aarch64.rs":"ed6ea00e3281ad2f4bab82821f20a2ff5b48401a65618bd6a544bc24ea4e3e39","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"9b5e2321c0114c2740dcb86d9f1f3584c07ded921a157164ae8bb0712d397818","src/unix/notbsd/linux/other/b64/powerpc64.rs":"ca25b5f94a9147a984fcb70cf48a261b30df14e2e8194ac174363b6280e82a29","src/unix/notbsd/linux/other/b64/sparc64.rs":"a84580fe226654e33f8ddd0f1f7f2069c29334fc826a74f81f7892b87cfb9083","src/unix/notbsd/linux/other/b64/x32.rs":"ae7698b217106a6c00465f9d10df24d45ad9b7dfc280b24168f53f42198b7b92","src/unix/notbsd/linux/other/b64/x86_64.rs":"afba464e903d350325a1ca3d9d5af1659efc0ede83a43dbac4dbd60c522e2ad1","src/unix/notbsd/linux/other/mod.rs":"7065a7e83834f38ee2f4e03f28824eb94111c13f10e7a8b76ee7025686a84e7f","src/unix/notbsd/linux/s390x.rs":"259c5533ba7f0b10bb23d01dc0e53301afd236a7bb4339dcef9472c579503729","src/unix/notbsd/mod.rs":"eff4c19451d4d4579d5c483a941a7b259b7b73c3ab13c31fc54a7961e8292b9a","src/unix/solaris/mod.rs":"9c6af198a2f80da827054784faf70bc404673d9568fb45664b4f73c46245fdbd","src/unix/uclibc/mips/mips32.rs":"4dcb19abae37f02f08660bdad500c3230436322b581eba37287c73a742d6fcdc","src/unix/uclibc/mips/mips64.rs":"e67eec1636a998b047d89a4cda1c99cb6bc3071db017762675179a68201c4438","src/unix/uclibc/mips/mod.rs":"3f86061d05a8da7d923310550b7d40c6223f0c907d77edc86b7a78da1d647f76","src/unix/uclibc/mod.rs":"3605127517734b5f5f20be1d37e52184a77ecc6fb6099b88aa744e0aca1b802a","src/unix/uclibc/x86_64/l4re.rs":"68fd3a833fd1f7caf784a084224f384bdbdfb8b5a14ef94c4f5155409afb3439","src/unix/uclibc/x86_64/mod.rs":"69ec3ca821a483cc076e84a794bbecb3e5536af1c1d5b807eaf1db9af11f771d","src/unix/uclibc/x86_64/other.rs":"f03b47842896f2f3ae6f8ebdcbcf0276454f880349d9cf00e3d304f8136893c5","src/windows.rs":"e41357d610608bad81abf285306ad8b127b6f02d5132f63c4942861980b47d59"},"package":"b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1"} +\ No newline at end of file diff --git a/user/rust/0035-rand-5b9e5c39d857.patch b/user/rust/0035-rand-5b9e5c39d857.patch new file mode 100644 index 000000000..6f9d072f8 --- /dev/null +++ b/user/rust/0035-rand-5b9e5c39d857.patch @@ -0,0 +1,25 @@ +From 5b9e5c39d857312fb308493ac8d0b89f73607941 Mon Sep 17 00:00:00 2001 +From: Lion Yang <lion@aosc.io> +Date: Wed, 15 Aug 2018 16:10:37 +0800 +Subject: [PATCH] os.rs: fix wrong syscall number for PowerPC + +__NR_getrandom is 359 on PowerPC, added from torvalds/linux@7d59deb50aa v3.17-rc5. +The bug was introduced from 05f23d275 3 years ago, affecting from 0.1.1 to before 0.5.0-pre.0. +It has already been fixed on the 0.5 branch at 00713a61c so this is a backport. +--- + src/os.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vendor/rand-0.4.2/src/os.rs b/src/vendor/rand-0.4.2/src/os.rs +index 633594ec7d..10022fbcd6 100644 +--- a/src/vendor/rand-0.4.2/src/os.rs ++++ b/src/vendor/rand-0.4.2/src/os.rs +@@ -102,7 +102,7 @@ mod imp { + #[cfg(target_arch = "aarch64")] + const NR_GETRANDOM: libc::c_long = 278; + #[cfg(target_arch = "powerpc")] +- const NR_GETRANDOM: libc::c_long = 384; ++ const NR_GETRANDOM: libc::c_long = 359; + + unsafe { + syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), 0) diff --git a/user/rust/0036-rand-checksums.patch b/user/rust/0036-rand-checksums.patch new file mode 100644 index 000000000..a998157ce --- /dev/null +++ b/user/rust/0036-rand-checksums.patch @@ -0,0 +1,9 @@ +diff --git a/src/vendor/rand-0.4.2/.cargo-checksum.json.orig b/src/vendor/rand-0.4.2/.cargo-checksum.json +index 67115b1a..77781e37 100644 +--- a/src/vendor/rand-0.4.2/.cargo-checksum.json.orig ++++ b/src/vendor/rand-0.4.2/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"f9b1ca6ae27d1c18215265024629a8960c31379f206d9ed20f64e0b2dcf79805",".travis.yml":"12868a81c3590d8f2c08d53ca51e6b4b9be39d854f81bd4a57f82466cbe8d79a","CHANGELOG.md":"03974fa236c7ac7a29931ef548d05ba1d8e00b1202961310f6d837aca9bc377a","Cargo.toml":"09b6978ce09c8df87e5fe605d1ff5ea920747da588523df8f2f5d1ca3292db80","Cargo.toml.orig":"02e9cb4d497d9ffbcb3cc0a227a9c7497e905a7d889a175b048aa03f8600cb16","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"f15d6584b8f417cc743ebcad6b69776874a6ac30807d0ce0ed28f3779be1f151","appveyor.yml":"8796156caf7041ef2a43f7a313df21ea639de3f2563b6181bba1096b1c489f1b","benches/bench.rs":"35c4ab609f2a5f5aab6c52c257415258dc0780621b492b5a82bb12d048cab6db","benches/distributions/exponential.rs":"99cb59c013a0b6bb390d34c5649b341fc3b88ea7df0caf2470bdda8798f9fe3d","benches/distributions/gamma.rs":"3533f311e4b55d743c5b01a7eb6529c94fd97726ef6702a6372f914f5f33666b","benches/distributions/mod.rs":"0028f1cb96f61152ed5b49a4fe91227d809ef6d19035592c36032a538af7f95e","benches/distributions/normal.rs":"4e10c18cb583ccb96301ea953c8e0aa9ee3b6662060271d1b8d19ca23364dc6b","benches/generators.rs":"aaa2f1dbfb399df8323d8a5796b92add6210cd5f0f1d916895ffdd81d60f812b","benches/misc.rs":"bd2f7c5a16f0fcb59022d5aeef66ed3c94e89ebf6c06667851dd23d0b1595504","src/distributions/exponential.rs":"103c8412c8a581b71835f1c00e40f6370e7702adf9d499243933a793d132d4e7","src/distributions/gamma.rs":"7a3f85c8daad4e56e334586ddb9fc9d83df3b0699738ed681a6c41e4ed455be9","src/distributions/mod.rs":"7943c4f83721bac816f831cca3b1574b6136932f7b4927aa6101130080ba62c5","src/distributions/normal.rs":"1562b43f80e4d5f83a8deb5af18de5a18dfeeeeda11fefc577da26672b14c949","src/distributions/range.rs":"a72a538d3ec4ed23f8d632aa55fd4793c464f24a5872d04ce8095ddd5db92115","src/distributions/ziggurat_tables.rs":"4eacf94fc352c91c455a6623de6a721e53842e1690f13a5662b6a79c7fbb73de","src/jitter.rs":"befd4b84bf753c107370b5b9498ad49611c220bdae2e4be9ee4398e9fa497042","src/lib.rs":"c86b28064c2c5abd02694e8bf97c84513b21fefe04e4305f9a78d5e864ef3e3f","src/os.rs":"38c2f26c2784c61ae9a17a7a9c59fcf449dada826a66f66b7f46b0992ef001de","src/prng/chacha.rs":"558007276f9c22933d39e5b8e853f4dd9533e823ed66df8dc1f23ad6925b1d51","src/prng/isaac.rs":"a8a2ee8b38d312663308e3bdf03376e342fd91330655f39144e5bba7392b2a8e","src/prng/isaac64.rs":"f28f7596ccab910db265b42671116abb9d2039fa8a421cbc75312bd0e7715d3a","src/prng/mod.rs":"c1a73450f49e819a20942a5b591f84a08ebb5ac33aa0f65b18ac1dc9a19a3084","src/prng/xorshift.rs":"606c308747293652c868b46dc3cad847d0c3717629c04ba75681c887c7634114","src/rand_impls.rs":"e1f27077fc13d5855bb66235f8ccfb216e116337eb38424d9c30c090e112215c","src/read.rs":"bd0eb508a6b659dc578d546fc2f231484aed80c73cfe8c475e0d65c8d699a769","src/reseeding.rs":"a97b86387b87ea1adc5262ddea480fe735c9c2a86762abaace29119022ac9f6e","src/seq.rs":"76dd58af0f580aed2721c393a5c036322186dc7cb3b4abed33436620c7c49288","utils/ziggurat_tables.py":"a9fc0a2fdae9b5c798c238788f94b720c156e13fd96f2356c409aa533191eb94"},"package":"eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"} +\ No newline at end of file ++{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"f9b1ca6ae27d1c18215265024629a8960c31379f206d9ed20f64e0b2dcf79805",".travis.yml":"12868a81c3590d8f2c08d53ca51e6b4b9be39d854f81bd4a57f82466cbe8d79a","CHANGELOG.md":"03974fa236c7ac7a29931ef548d05ba1d8e00b1202961310f6d837aca9bc377a","Cargo.toml":"09b6978ce09c8df87e5fe605d1ff5ea920747da588523df8f2f5d1ca3292db80","Cargo.toml.orig":"02e9cb4d497d9ffbcb3cc0a227a9c7497e905a7d889a175b048aa03f8600cb16","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"f15d6584b8f417cc743ebcad6b69776874a6ac30807d0ce0ed28f3779be1f151","appveyor.yml":"8796156caf7041ef2a43f7a313df21ea639de3f2563b6181bba1096b1c489f1b","benches/bench.rs":"35c4ab609f2a5f5aab6c52c257415258dc0780621b492b5a82bb12d048cab6db","benches/distributions/exponential.rs":"99cb59c013a0b6bb390d34c5649b341fc3b88ea7df0caf2470bdda8798f9fe3d","benches/distributions/gamma.rs":"3533f311e4b55d743c5b01a7eb6529c94fd97726ef6702a6372f914f5f33666b","benches/distributions/mod.rs":"0028f1cb96f61152ed5b49a4fe91227d809ef6d19035592c36032a538af7f95e","benches/distributions/normal.rs":"4e10c18cb583ccb96301ea953c8e0aa9ee3b6662060271d1b8d19ca23364dc6b","benches/generators.rs":"aaa2f1dbfb399df8323d8a5796b92add6210cd5f0f1d916895ffdd81d60f812b","benches/misc.rs":"bd2f7c5a16f0fcb59022d5aeef66ed3c94e89ebf6c06667851dd23d0b1595504","src/distributions/exponential.rs":"103c8412c8a581b71835f1c00e40f6370e7702adf9d499243933a793d132d4e7","src/distributions/gamma.rs":"7a3f85c8daad4e56e334586ddb9fc9d83df3b0699738ed681a6c41e4ed455be9","src/distributions/mod.rs":"7943c4f83721bac816f831cca3b1574b6136932f7b4927aa6101130080ba62c5","src/distributions/normal.rs":"1562b43f80e4d5f83a8deb5af18de5a18dfeeeeda11fefc577da26672b14c949","src/distributions/range.rs":"a72a538d3ec4ed23f8d632aa55fd4793c464f24a5872d04ce8095ddd5db92115","src/distributions/ziggurat_tables.rs":"4eacf94fc352c91c455a6623de6a721e53842e1690f13a5662b6a79c7fbb73de","src/jitter.rs":"befd4b84bf753c107370b5b9498ad49611c220bdae2e4be9ee4398e9fa497042","src/lib.rs":"c86b28064c2c5abd02694e8bf97c84513b21fefe04e4305f9a78d5e864ef3e3f","src/os.rs":"4860f165f68b7c978b0488c75d264cd9aaf54e7e4484036736ee5c4f5b6bd78d","src/prng/chacha.rs":"558007276f9c22933d39e5b8e853f4dd9533e823ed66df8dc1f23ad6925b1d51","src/prng/isaac.rs":"a8a2ee8b38d312663308e3bdf03376e342fd91330655f39144e5bba7392b2a8e","src/prng/isaac64.rs":"f28f7596ccab910db265b42671116abb9d2039fa8a421cbc75312bd0e7715d3a","src/prng/mod.rs":"c1a73450f49e819a20942a5b591f84a08ebb5ac33aa0f65b18ac1dc9a19a3084","src/prng/xorshift.rs":"606c308747293652c868b46dc3cad847d0c3717629c04ba75681c887c7634114","src/rand_impls.rs":"e1f27077fc13d5855bb66235f8ccfb216e116337eb38424d9c30c090e112215c","src/read.rs":"bd0eb508a6b659dc578d546fc2f231484aed80c73cfe8c475e0d65c8d699a769","src/reseeding.rs":"a97b86387b87ea1adc5262ddea480fe735c9c2a86762abaace29119022ac9f6e","src/seq.rs":"76dd58af0f580aed2721c393a5c036322186dc7cb3b4abed33436620c7c49288","utils/ziggurat_tables.py":"a9fc0a2fdae9b5c798c238788f94b720c156e13fd96f2356c409aa533191eb94"},"package":"eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"} +\ No newline at end of file diff --git a/user/rust/0040-rls-atomics.patch b/user/rust/0040-rls-atomics.patch new file mode 100644 index 000000000..61811ef4d --- /dev/null +++ b/user/rust/0040-rls-atomics.patch @@ -0,0 +1,63 @@ +diff --git a/src/tools/rls/src/cmd.rs b/src/tools/rls/src/cmd.rs +index 545a129..8285f99 100644 +--- a/src/tools/rls/src/cmd.rs ++++ b/src/tools/rls/src/cmd.rs +@@ -16,7 +16,7 @@ use crate::actions::requests; + use rls_analysis::{AnalysisHost, Target}; + use crate::config::Config; + use crate::server::{self, LsService, Notification, Request, RequestId}; +-use std::sync::atomic::{AtomicU64, Ordering}; ++use std::sync::atomic::{AtomicU32, Ordering}; + use rls_vfs::Vfs; + + use languageserver_types::{ +@@ -415,8 +415,8 @@ fn url(file_name: &str) -> Url { + } + + fn next_id() -> RequestId { +- static ID: AtomicU64 = AtomicU64::new(1); +- RequestId::Num(ID.fetch_add(1, Ordering::SeqCst)) ++ static ID: AtomicU32 = AtomicU32::new(1); ++ RequestId::Num(ID.fetch_add(1, Ordering::SeqCst).into()) + } + + // Custom reader and output for the RLS server. +diff --git a/src/tools/rls/src/server/io.rs b/src/tools/rls/src/server/io.rs +index 5d5060e..55ab545 100644 +--- a/src/tools/rls/src/server/io.rs ++++ b/src/tools/rls/src/server/io.rs +@@ -17,7 +17,7 @@ use crate::lsp_data::{LSPNotification, LSPRequest}; + + use std::fmt; + use std::io::{self, BufRead, Write}; +-use std::sync::atomic::{AtomicU64, Ordering}; ++use std::sync::atomic::{AtomicU32, Ordering}; + use std::sync::Arc; + + use jsonrpc_core::{self as jsonrpc, response, version, Id}; +@@ -190,14 +190,14 @@ pub trait Output: Sync + Send + Clone + 'static { + /// An output that sends notifications and responses on `stdout`. + #[derive(Clone)] + pub(super) struct StdioOutput { +- next_id: Arc<AtomicU64>, ++ next_id: Arc<AtomicU32>, + } + + impl StdioOutput { + /// Construct a new `stdout` output. + crate fn new() -> StdioOutput { + StdioOutput { +- next_id: Arc::new(AtomicU64::new(1)), ++ next_id: Arc::new(AtomicU32::new(1).into()), + } + } + } +@@ -215,7 +215,7 @@ impl Output for StdioOutput { + } + + fn provide_id(&self) -> RequestId { +- RequestId::Num(self.next_id.fetch_add(1, Ordering::SeqCst)) ++ RequestId::Num(self.next_id.fetch_add(1, Ordering::SeqCst).into()) + } + } + diff --git a/user/rust/APKBUILD b/user/rust/APKBUILD new file mode 100644 index 000000000..1a1d55468 --- /dev/null +++ b/user/rust/APKBUILD @@ -0,0 +1,351 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Contributor: Shiz <hi@shiz.me> +# Contributor: Jeizsm <jeizsm@gmail.com> +# Maintainer: Samuel Holland <samuel@sholland.org> +pkgname=rust +pkgver=1.29.1 +_bootcargover=0.30.0 +_bootver=1.29.1 +_llvmver=6 +pkgrel=0 +pkgdesc="The Rust Programming Language" +url="https://www.rust-lang.org" +arch="all" +license="(Apache-2.0 OR MIT) AND (NCSA OR MIT) AND BSD-2-Clause AND BSD-3-Clause" +depends="$pkgname-stdlib=$pkgver-r$pkgrel gcc musl-dev" +makedepends=" + curl-dev + libgit2-dev + libssh2-dev + llvm$_llvmver-dev + llvm$_llvmver-test-utils + openssl-dev + python3 + zlib-dev + " +subpackages=" + $pkgname-dbg + $pkgname-stdlib + $pkgname-analysis + $pkgname-doc + $pkgname-gdb::noarch + $pkgname-lldb::noarch + $pkgname-src::noarch + cargo + cargo-clippy:_cargo_clippy + cargo-fmt:_cargo_fmt + cargo-doc:_cargo_doc:noarch + cargo-bash-completion:_cargo_bashcomp:noarch + cargo-zsh-completion:_cargo_zshcomp:noarch + rls + rustfmt + " +source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.xz + https://distfiles.adelielinux.org/source/rust/cargo-$_bootcargover-$CBUILD.tar.xz + https://distfiles.adelielinux.org/source/rust/rust-std-$_bootver-$CBUILD.tar.xz + https://distfiles.adelielinux.org/source/rust/rustc-$_bootver-$CBUILD.tar.xz + 0001-Require-static-native-libraries-when-linking-static-.patch + 0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch + 0003-Fix-LLVM-build.patch + 0004-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch + 0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch + 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch + 0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch + 0008-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch + 0009-Add-missing-OpenSSL-configurations-for-musl-targets.patch + 0010-test-linkage-visibility-dlsym-only-sees-exported-sym.patch + 0011-test-invalid_const_promotion-Accept-SIGTRAP-as-a-val.patch + 0015-flock-Fix-F_SETLK-F_SETLKW-on-32-bit-O_LARGEFILE.patch + 0016-Add-powerpc-unknown-linux-musl-target.patch + 0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch + 0018-Fix-powerpc64-ELFv2-big-endian-struct-passing-ABI.patch + 0019-Add-powerpc64-unknown-linux-musl-target.patch + 0020-run-pass-const-endianness-negate-before-to_le.patch + 0021-Fix-double_check-tests-on-big-endian-targets.patch + 0022-x.py-Use-python3-instead-of-python.patch + 0023-test-target-feature-gate-Only-run-on-relevant-target.patch + 0024-test-use-extern-for-plugins-Don-t-assume-multilib.patch + 0025-Ignore-broken-and-non-applicable-tests.patch + 0026-Link-stage-2-tools-dynamically-to-libstd.patch + 0027-Move-debugger-scripts-to-usr-share-rust.patch + 0028-Add-foxkit-target-specs.patch + 0029-Work-around-libbacktrace-built-with-fstack-protector.patch + 0030-liblibc-linkage.patch + 0031-liblibc-0163a7ce20b5.patch + 0032-libc-dcff154781e4.patch + 0033-libc-90c01fa6b0f4.patch + 0034-libc-0163a7ce20b5.patch + 0035-libc-checksums.patch + 0035-rand-5b9e5c39d857.patch + 0036-rand-checksums.patch + 0040-rls-atomics.patch + " +builddir="$srcdir/rustc-$pkgver-src" +_rlibdir="/usr/lib/rustlib/$CTARGET/lib" + +prepare() { + cd "$builddir" + + default_prepare + + $srcdir/cargo-$_bootcargover-$CBUILD/install.sh \ + --destdir=$srcdir/prebuilt \ + --prefix=/ \ + --disable-ldconfig + $srcdir/rust-std-$_bootver-$CBUILD/install.sh \ + --destdir=$srcdir/prebuilt \ + --prefix=/ \ + --disable-ldconfig + $srcdir/rustc-$_bootver-$CBUILD/install.sh \ + --destdir=$srcdir/prebuilt \ + --prefix=/ \ + --disable-ldconfig +} + +build() { + cd "$builddir" + + cat > config.toml <<- EOF + [build] + build = "$CBUILD" + host = [ "$CHOST" ] + target = [ "$CTARGET" ] + cargo = "$srcdir/prebuilt/bin/cargo" + rustc = "$srcdir/prebuilt/bin/rustc" + submodules = false + python = "python3" + locked-deps = true + vendor = true + extended = true + tools = [ "analysis", "cargo", "clippy", "rls", "rustfmt", "src" ] + [install] + prefix = "/usr" + [rust] + codegen-units = 1 + debuginfo = true + debuginfo-lines = true + debuginfo-only-std = false + debuginfo-tools = true + use-jemalloc = false + backtrace = true + channel = "stable" + rpath = false + [target.$CTARGET] + cc = "$CTARGET-gcc" + cxx = "$CTARGET-g++" + linker = "$CTARGET-gcc" + llvm-config = "/usr/lib/llvm$_llvmver/bin/llvm-config" + crt-static = false + EOF + + LIBGIT2_SYS_USE_PKG_CONFIG=1 \ + LLVM_LINK_SHARED=1 \ + RUST_BACKTRACE=1 \ + ./x.py build -j ${JOBS:-2} +} + +check() { + cd "$builddir" + + ./x.py test -j ${JOBS:-2} --no-doc --no-fail-fast \ + src/test/codegen \ + src/test/codegen-units \ + src/test/compile-fail \ + src/test/compile-fail-fulldeps \ + src/test/incremental \ + src/test/incremental-fulldeps \ + src/test/mir-opt \ + src/test/parse-fail \ + src/test/pretty \ + src/test/run-fail \ + src/test/run-fail/pretty \ + src/test/run-fail-fulldeps \ + src/test/run-fail-fulldeps/pretty \ + src/test/run-make \ + src/test/run-make-fulldeps \ + src/test/run-pass \ + src/test/run-pass/pretty \ + src/test/run-pass-fulldeps \ + src/test/run-pass-fulldeps/pretty \ + src/test/ui \ + src/test/ui-fulldeps +} + +package() { + cd "$builddir" + + DESTDIR="$pkgdir" ./x.py install + + rm "$pkgdir"/usr/lib/*.so \ + "$pkgdir"/usr/lib/rustlib/components \ + "$pkgdir"/usr/lib/rustlib/install.log \ + "$pkgdir"/usr/lib/rustlib/manifest-* \ + "$pkgdir"/usr/lib/rustlib/rust-installer-version \ + "$pkgdir"/usr/lib/rustlib/uninstall.sh \ + "$pkgdir"/usr/share/doc/rust/*.old +} + +stdlib() { + pkgdesc="Standard library for Rust" + depends="musl-utils" + + _mv "$pkgdir"$_rlibdir/*.so "$subpkgdir"$_rlibdir + + mkdir -p "$subpkgdir"/etc/ld.so.conf.d + echo "$_rlibdir" > "$subpkgdir"/etc/ld.so.conf.d/$pkgname.conf +} + +analysis() { + pkgdesc="Compiler analysis data for the Rust standard library" + depends="$pkgname=$pkgver-r$pkgrel $pkgname-stdlib=$pkgver-r$pkgrel" + + _mv "$pkgdir"${_rlibdir%/*}/analysis "$subpkgdir"${_rlibdir%/*} +} + +gdb() { + pkgdesc="GDB pretty printers for Rust" + license="Apache-2.0 OR MIT" + depends="$pkgname gdb" + install_if="$pkgname=$pkgver-r$pkgrel gdb" + + _mv "$pkgdir"/usr/bin/rust-gdb "$subpkgdir"/usr/bin + _mv "$pkgdir"/usr/share/rust/gdb_*.py "$subpkgdir"/usr/share/rust || true +} + +lldb() { + pkgdesc="LLDB pretty printers for Rust" + license="Apache-2.0 OR MIT" + depends="$pkgname lldb py3-lldb" + install_if="$pkgname=$pkgver-r$pkgrel lldb" + + _mv "$pkgdir"/usr/bin/rust-lldb "$subpkgdir"/usr/bin + _mv "$pkgdir"/usr/share/rust/lldb_*.py "$subpkgdir"/usr/share/rust || true +} + +src() { + pkgdesc="$pkgdesc (source code)" + depends="" + + _mv "$pkgdir"/usr/lib/rustlib/src/rust "$subpkgdir"/usr/src + rmdir -p "$pkgdir"/usr/lib/rustlib/src 2>/dev/null || true + + mkdir -p "$subpkgdir"/usr/lib/rustlib/src + ln -s ../../../src/rust "$subpkgdir"/usr/lib/rustlib/src/rust +} + +cargo() { + pkgdesc="The Rust package manager" + depends="$pkgname-stdlib=$pkgver-r$pkgrel $pkgname" + + _mv "$pkgdir"/usr/bin/cargo "$subpkgdir"/usr/bin +} + +_cargo_clippy() { + pkgdesc="A collection of Rust lints (cargo plugin)" + depends="$pkgname-stdlib=$pkgver-r$pkgrel cargo" + + _mv "$pkgdir"/usr/bin/cargo-clippy \ + "$pkgdir"/usr/bin/clippy-driver \ + "$subpkgdir"/usr/bin +} + +_cargo_fmt() { + pkgdesc="Format Rust code (cargo plugin)" + depends="$pkgname-stdlib=$pkgver-r$pkgrel cargo rustfmt" + install_if="cargo=$pkgver-r$pkgrel rustfmt=$pkgver-r$pkgrel" + + _mv "$pkgdir"/usr/bin/cargo-fmt "$subpkgdir"/usr/bin +} + +_cargo_bashcomp() { + pkgdesc="Bash completion for cargo" + license="Apache-2.0 OR MIT" + depends="" + install_if="cargo=$pkgver-r$pkgrel bash-completion" + + _mv "$pkgdir"/etc/bash_completion.d/cargo \ + "$subpkgdir"/usr/share/bash-completion/completions + rmdir -p "$pkgdir"/etc/bash_completion.d 2>/dev/null || true +} + +_cargo_zshcomp() { + pkgdesc="ZSH completion for cargo" + license="Apache-2.0 OR MIT" + depends="" + install_if="cargo=$pkgver-r$pkgrel zsh" + + _mv "$pkgdir"/usr/share/zsh/site-functions/_cargo \ + "$subpkgdir"/usr/share/zsh/site-functions/_cargo + rmdir -p "$pkgdir"/usr/share/zsh/site-functions 2>/dev/null || true +} + +_cargo_doc() { + pkgdesc="The Rust package manager (documentation)" + license="Apache-2.0 OR MIT" + depends="" + install_if="cargo=$pkgver-r$pkgrel docs" + + # XXX: This is hackish! + _mv "$pkgdir"/../$pkgname-doc/usr/share/man/man1/cargo* \ + "$subpkgdir"/usr/share/man/man1 +} + +rls() { + pkgdesc="The Rust language server" + license="Apache-2.0 OR MIT" + depends="$pkgname-stdlib=$pkgver-r$pkgrel" + + _mv "$pkgdir"/usr/bin/rls "$subpkgdir"/usr/bin +} + +rustfmt() { + pkgdesc="Format Rust code" + depends="$pkgname-stdlib=$pkgver-r$pkgrel" + + _mv "$pkgdir"/usr/bin/rustfmt "$subpkgdir"/usr/bin +} + +_mv() { + local dest; for dest; do true; done # get last argument + mkdir -p "$dest" + mv "$@" +} +sha512sums="1ded651b4c460e11e5e44c26de88a80fb13c2000097de2ee1e5af89638e12a7e8f43dd756689d4cc4fad45c52d4d43a3c70dd6a3ae550735b9dad5f8defea6a7 rustc-1.29.1-src.tar.xz +bd1fd3694947fc192419dab1e1e314fb5a9d7266715b5765dd1766507a234b6ad93bd097f531d560adc8b9f71534f53c440e6986e63b322319fcd0c24325d979 cargo-0.30.0-powerpc64-foxkit-linux-musl.tar.xz +d6ce24de73131702b623e8a146435526457b6d766fe6192df7471f1942119a6396b85121ce2250da3c3ec21b44aaff316e5c0387796654129d074d29d60a25b2 rust-std-1.29.1-powerpc64-foxkit-linux-musl.tar.xz +b649fc30dee7510f656c53f3a5737a66d59726e24be7085134504f0202a899e549274df417c814487e5fbd8bbb69470411c9ed770dbc37af15a99a63f913a508 rustc-1.29.1-powerpc64-foxkit-linux-musl.tar.xz +a242a6cdc95ecfa402e1457bc9e3b98305b8a5bcb5f54904807382cc98720e2a8fd16cee311edba84eb64129c591a58ed1f70798269832ccf19f1af79efe8b70 0001-Require-static-native-libraries-when-linking-static-.patch +2b2dc29d31351e21e10808a0223b8b43d3804f0fbef6a97d6016958bb982850d0a63b73f1133ca4e70ad5c5901a3357c279e40a5c60379eb8ac070a9fb78a203 0002-Don-t-pass-CFLAGS-to-the-C-compiler.patch +6f291642e2ce0cbe57e5354d4eff2745b651b3308771fd122edcb75ff7b809a34ee98c5ab2b64699b60e6be1007a383b29e0f991a9539f85a4c6c19e239c7654 0003-Fix-LLVM-build.patch +4f1a716e22126d65f4b32be6210293a32e54c3b4c8655097962e2d0d44c1b976cb923fc99dbf8d6487541518e9c8ed73d3d2efb6da3b881513d8243808de7adf 0004-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch +7ff0c4cfc040f47b9dcf28d64bbcdf45d674bbd3a05e7d3646474044e0713d80d878d8cc39dd5029cd6f7c2c6d53c08ea445eacf147ccf14de1d729bf6a83734 0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch +f1b9d68d4685db660b6c09cfa5ce0f818a3146e458973b942ac7991cfdd849976da7bc4e7245b9aa0ace498b51c9dbe9def3f2ffc277f52d2883f8b8fd0c47ef 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch +14cd3ff8d3e1d41014008ec8da958b72383c5fab6066d4dd21f4c02043fbea9ef159a1a76b718ec54c135fe971c7269d88b9703692706d23ed409022b0e57221 0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch +e7de9eec874e08d3aaaa1389ed827ccb201659f792d4b64bf430a1b972b1d1f793fb14131d60df92d84af35da01eee4d59f6b8f631acfef95284688cde45fe04 0008-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch +8c2cbe4c0a99c38e4c7f05b30d396acfbe0511c06b433a468c35477cda73e77a4a0d61f809465d29e92bf3960dc25d5d860d28c79be42ac25f336aea40a24881 0009-Add-missing-OpenSSL-configurations-for-musl-targets.patch +38085c8f79a3fda0f31cc733044c50fdfb1bff82da4f4cb40f280bf0924c53cfb1fab31a8345e40ae2960f1c1b495570d8219c9c9958db4da184f7120e07a4ad 0010-test-linkage-visibility-dlsym-only-sees-exported-sym.patch +93faeccf86b7920d48aba11e3345459e828a47a2b709ac65bc1ed71ef928ae18539040390f394c58fadbe0f44459248018c3cf0b0ac64aedd0f27a5ae866d69e 0011-test-invalid_const_promotion-Accept-SIGTRAP-as-a-val.patch +c2208400ee5a9f0f7b7897effe536f5937e05c0c4214f5974194ef8c41fc3013ca5224594add1b9fb83f50c9372bd659b7a34442fc3462d43fe8fe6dbdceb1ad 0015-flock-Fix-F_SETLK-F_SETLKW-on-32-bit-O_LARGEFILE.patch +157b6e658ad39d01a7bcee16de5a7b4cb0c8a95a55ace9ca24ac499dee343db7de5d7455443f868cd02f612ef9f6787001ee8e53d8b046304d451507e25ca7ce 0016-Add-powerpc-unknown-linux-musl-target.patch +2f353c5e29e00f9e8f28b6c9010b204138a6913565674afd40ab79f2b434ed8af8296d2fe92459c103eb6262579466c44be2280e5ec46e129855fcb06f314e32 0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch +c63ce49e7041991e78921d4b6f36e037fbcf478eb30a8590fbb0349bc55ead4639ebf95f8d90d7d572244dbf14f74471c192cc2c7dd020fb8f274e885f130c29 0018-Fix-powerpc64-ELFv2-big-endian-struct-passing-ABI.patch +96d6473a9a1aed1df0911da4583ff8377ecf9cea920aaeafdbf4f4db652027e2937e1108eb21aafc044c0b45a6cd1f152393c5fa527cdabd4ce4e70f69fe15c6 0019-Add-powerpc64-unknown-linux-musl-target.patch +133f2b57e351dd6a75ac3abe3d980c3e1e40af4cdfe7fc4a05ed3e45029ae69ab979db7edb2b890742c107120f436404fc720e20df52fd9d5ff14d22a7d82aa4 0020-run-pass-const-endianness-negate-before-to_le.patch +652420d7bdc9be4e6136577e375e9b43f7c4086b3f0c1b4739c7eb6303c7826df84f40da7811618f296edcf712357e4b046e477b748605d066ab6d8015c6a619 0021-Fix-double_check-tests-on-big-endian-targets.patch +7eb0c8eb095ca0201b26444b275005a89921731e87fb7a82d3d46215f14acc8b987134288955fc90f9d419ebe0cb26e09589906aa954bcbe229e25b737c64c7d 0022-x.py-Use-python3-instead-of-python.patch +231d37dcd04787300a38122f1482b616970e070a4a87349aeaf5ec9f7d15563feeaa88be9cfc0863640b22596f5c2e2acfe7f9b22e43e6f1ee90f3b4730e746b 0023-test-target-feature-gate-Only-run-on-relevant-target.patch +b6c34f9982d6f5b59acc716391a63f922accf69bdcf2631ab57ce3279a62e1874bceb7d0707fdd5290a17ec88e948d803c567476f904f96b7e5d7a240a4ee53c 0024-test-use-extern-for-plugins-Don-t-assume-multilib.patch +cf8d642afcfd27fbc8c982a27d7d09f6097f1d0bfb67251d3a51323bd86743f584ebbd1cb4a8e872bd7711610929aa4bd514a107956fb89dd14f6dc50e9bdd26 0025-Ignore-broken-and-non-applicable-tests.patch +9b9f4625d0a56417fa72d58982e55449b8fb5ed103799327a9017976ddd8ec431e81f592d3f843927068bd0e68e8e5a589650f18fb37bd275100f17bb65a1560 0026-Link-stage-2-tools-dynamically-to-libstd.patch +35fc80eb99d818f8d4c67a5dc72c1acc56a26b529b5a24cad7aa0d5ea4e872384c4eb07084caa3436140cdf377ed0bbcb920e40473a65f2ff90e3ddc1e20e390 0027-Move-debugger-scripts-to-usr-share-rust.patch +ab300269ab18f3d8e82586d0ff1a8f2713027aa675844450cd1dc30f9fd8daf268caa4e61744c927044dd7d62638b9153e123ed6eb242f0ccab892306e1991a8 0028-Add-foxkit-target-specs.patch +542a3aa430eea4142428293e7a9f4077210a319bb7bd91a4f051222277862bc4a8eba1c013ec6d7dddbc848e1b903cc8c4082d1aad623ec85674de14ba95a2ca 0029-Work-around-libbacktrace-built-with-fstack-protector.patch +f94abe390798b968bccfba1c908ab5895220ed0d167314b790a9c28b10cac81fb2e3b08760b4e8551ad5a5d02cd052d3d0d647ad8f8634e97f4d3b0470a21c42 0030-liblibc-linkage.patch +9b761388e3e7d4ac7ced81bf2572439724f4ce3190b49429b92249f4b858cc9bbb79d72e25365825cbd25cb9b3352c627dcc88cc643e5abeb917cf14755cab0b 0031-liblibc-0163a7ce20b5.patch +48a2ea6beb5f333d646fcc7aa15405d24f52f48e82b8f9cd09737dbfef16df0679246b30a28871595d13414b44c316122e0c969e1ae555b7ab18b692057c0d67 0032-libc-dcff154781e4.patch +fcfdd6b2702b8b23d8fd339ceb23b75a6e9814a388f00d226c8101be46a0f29835c77b75ab665e36972fde14364d762816ea2dcf3c1d90dd1e574fb8f6c33c80 0033-libc-90c01fa6b0f4.patch +7773b0c20aee126f90960c29b575f0c3c949d877e6b0e682c34ba8cdf6055a57697d6d6c287eafdf5976125830d5898128c73ac7dc8b4c40347577afcdb086d5 0034-libc-0163a7ce20b5.patch +6c5d68874bb82de214ff0488bd0ff7c1215c48575618d4d37d307004d462b4010df0d4909dd73da7f024c9ea00f5e2680a733235b6b85abdbd352cf1e13a6681 0035-libc-checksums.patch +94ee746f50ba3d88e409cd6b840a0995fa40d38e6a3c4a7e9fa32430242c492f35f6fb95ee22e0da6dba84f39dc83f0196a0921c5ec2bc602ea220b017c78be2 0035-rand-5b9e5c39d857.patch +5e409a7e45afd2104e1bbbcedb0cc2a04b2c3838d820bb3dc6e879a3d4619f0cce562d2bf2b0c55b780375bf26f0d4d4d6b0acdac199e1c39b2d94543d35e017 0036-rand-checksums.patch +9182408b7a87fc2f01dc12a36440e43a721f7693da00310806f6306e711c04b34d43b6ab348ae523656937f61389adb6a5a2b8ff46dec5424ad20c29652d4edf 0040-rls-atomics.patch" |