rust: update to 1.36.0

build (finally) works!
This commit is contained in:
Muhammad Herdiansyah 2019-07-30 02:02:13 +00:00
parent 18f4294046
commit 46134fa86e
22 changed files with 1011 additions and 4 deletions

View File

@ -1,17 +1,27 @@
#!/bin/sh -e
for patch in *.patch; do
patch -p1 < "$patch"
done
./configure \
--prefix=/usr \
--release-channel=stable \
--disable-rpath \
--disable-docs \
--disable-full-bootstrap \
--disable-codegen-tests \
--enable-vendor \
--llvm-root=/usr \
--build=x86_64-unknown-linux-musl \
--target=x86_64-unknown-linux-musl \
--set=target.x86_64-unknown-linux-musl.llvm-config=/usr/bin/llvm-config \
--set=target.x86_64-unknown-linux-musl.llvm-config=/usr/bin/llvm-config
--set=target.x86_64-unknown-linux-musl.crt-static=false
# rust checksums files in vendor/, but we patch a few files.
for vendor in libc lzma-sys typenum backtrace-sys; do
sed -i 's/\("files":{\)[^}]*/\1/' vendor/$vendor/.cargo-checksum.json
done
make
DESTDIR="$1" ./x.py install -v

View File

@ -1 +1,19 @@
5a4d637a716bac18d085f44dd87ef48b32195f71b967d872d80280b38cff712d rustc-1.35.0-src.tar.gz
04c4e4d7213d036d6aaed392841496d272146312c0290f728b7400fccd15bb1b rustc-1.36.0-src.tar.gz
b65bab8768ab532cb1348f47904b6720b77de242b52c68ed1f0c45759640bba0 0002-Fix-LLVM-build.patch
350e440dd3b63d441f57bd65696665af5b8783cfbf6b1630446a3c0f0d944a48 0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
fecb08af9aae988e07cd71bd484a735c565ab84585663c0398df2c2f7b201ddc 0004-Require-static-native-libraries-when-linking-static-.patch
2d1deb8ad16bf905824414e16b8bde05e932e3ee6731e0bc1fa431c22a8f8fcf 0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
22ce4bc6703790cfbaca71bf5f1528f6b0de9228188fe77ca4140d48542a0600 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
3cc28a1b60b2adc9bb5e23c43a5c0ff6de9fc8dbc0a3af8fbd43ab2b98239bf5 0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch
76400e57acf9cb8583e5e590403bc7c0ee5ecee3a1ca73b994d983210388b4c6 0008-test-use-extern-for-plugins-Don-t-assume-multilib.patch
32092cf8b0d74c7c5bf7facc0b2998a16cac6c98dc40dadd22f6138b0e2205d1 0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
8c7712c0dbe1e9fb81fb8067c6cbb1c59098f921ff2d0f8988eb72da01b64ff0 0010-Ignore-broken-and-non-applicable-tests.patch
c0aef6d87a8a1703cc9c7093dceb186e3667d3003c1a2ca772fb92018b241e57 0011-Link-stage-2-tools-dynamically-to-libstd.patch
fabb9c0450b157f796043547f12579a1433ef33a8545b06c4ee0b8446c6e2d1b 0012-Move-debugger-scripts-to-usr-share-rust.patch
4ac4dccf1d7ab9e4e8b2b64f24d44bf3e93cf6bf6b684f999de585dcfdb98e21 0029-musl-dont-use-crt-static.patch
322c129fdbc0d1e2cc69cd33a1ae968596eaaa1abc2357d09442e7ab981a00ca 0030-libc-linkage.patch
d0f2d0cf934c0d45b412375e32ceba2e53e3271d76ab362f70dd3e18262179e1 0031-typenum-pmmx.patch
ac213e431a01ba0568f0985e2a8bd225fde0a3cfbc1b6e5eb196d71ee70775b5 0091-lzma-sys-cross-ldflags.patch
fe11b80ae978dd76f5cd0afc233fb1ab1fe19551875eea1474640534b4692320 0092-use-correct-llvm-cross.patch
d9cb8e2cb78d73e0ef44dff2638d96187df9646af52a523a3057645e048c8e18 0093-use-elfv2-everywhere.patch
dd06bd69e99c77b81993f470832e1522cd26121f706b82f9b5c82a248231e8dc llvm-with-dependencies.patch

View File

@ -0,0 +1,26 @@
From 59faa3f7b9b07d986bcd810d750daad956bd612b Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Fri, 8 Sep 2017 00:04:29 -0500
Subject: [PATCH 02/12] 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 ca4489655..7618a6e6d 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -774,7 +774,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<String>>();
// If we're compiling on macOS then we add a few unconditional flags
--
2.22.0

View File

@ -0,0 +1,45 @@
From 681f46ea92719a419c3dadbe3376062cc5bde8b8 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 2 Dec 2017 17:25:44 -0600
Subject: [PATCH 03/12] 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 | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index 1c9f6e1ab..7e90be8d8 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -23,9 +23,6 @@ fn main() {
Err(_) => 0,
};
- let mut dylib_path = bootstrap::util::dylib_path();
- dylib_path.insert(0, PathBuf::from(libdir.clone()));
-
//FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox`
//arguments here
let mut cmd = Command::new(rustdoc);
@@ -37,7 +34,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
@@ -86,7 +83,7 @@ fn main() {
eprintln!(
"rustdoc command: {:?}={:?} {:?}",
bootstrap::util::dylib_path_var(),
- env::join_paths(&dylib_path).unwrap(),
+ PathBuf::from(libdir.clone()),
cmd,
);
eprintln!("sysroot: {:?}", sysroot);
--
2.22.0

View File

@ -0,0 +1,56 @@
From b0de26f4cef75c63a7901990ed92fe0616a971fc Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Fri, 8 Sep 2017 00:05:18 -0500
Subject: [PATCH 04/12] Require static native libraries when linking static
executables
On ELF targets like Linux, gcc/ld will create a dynamically-linked
executable without warning, even when passed `-static`, when asked to
link to a `.so`. Avoid this confusing and unintended behavior by always
using the static version of libraries when trying to link static
executables.
Fixes #54243
---
src/librustc_codegen_ssa/back/link.rs | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs
index d5a56f6a0..bb06d80d8 100644
--- a/src/librustc_codegen_ssa/back/link.rs
+++ b/src/librustc_codegen_ssa/back/link.rs
@@ -1548,9 +1548,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(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
-// dependencies. We've got two cases then:
+// Link in all of our upstream crates' native dependencies. We have two cases:
//
// 1. The upstream crate is an rlib. In this case we *must* link in the
// native dependency because the rlib is just an archive.
@@ -1593,7 +1591,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker,
continue
}
match lib.kind {
- NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
+ NativeLibraryKind::NativeUnknown => {
+ // On some targets, like Linux, linking a static executable inhibits using
+ // dylibs at all. Force native libraries to be static, even if for example
+ // an upstream rlib was originally linked against a native shared library.
+ if crate_type == config::CrateType::Executable
+ && sess.crt_static()
+ && !sess.target.target.options.crt_static_allows_dylibs
+ {
+ 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.22.0

View File

@ -0,0 +1,392 @@
From 9e646efacc9459f05bcefe9ad6d8e65dd06ba2d7 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/12] 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 | 21 +-------------
src/bootstrap/config.rs | 7 -----
src/bootstrap/configure.py | 22 ---------------
src/bootstrap/lib.rs | 8 ------
src/bootstrap/sanity.rs | 28 -------------------
.../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/ci/docker/test-various/Dockerfile | 1 -
src/librustc_target/spec/linux_musl_base.rs | 16 -----------
13 files changed, 4 insertions(+), 152 deletions(-)
diff --git a/config.toml.example b/config.toml.example
index 556625b53..3c6f18728 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -474,12 +474,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 = "..."
-
# The root location of the `wasm32-wasi` sysroot.
#wasi-root = "..."
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index 821c37dc2..906af787f 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -122,16 +122,6 @@ fn main() {
cmd.arg("-Cprefer-dynamic");
}
- // Help the libc crate compile by assisting it in finding various
- // sysroot native libraries.
- if let Some(s) = env::var_os("MUSL_ROOT") {
- if target.contains("musl") {
- let mut root = OsString::from("native=");
- root.push(&s);
- root.push("/lib");
- cmd.arg("-L").arg(&root);
- }
- }
if let Some(s) = env::var_os("WASI_ROOT") {
let mut root = OsString::from("native=");
root.push(&s);
diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
index dfc243b70..848d1d4b2 100644
--- a/src/bootstrap/cc_detect.rs
+++ b/src/bootstrap/cc_detect.rs
@@ -84,7 +84,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();
@@ -113,7 +113,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()));
@@ -124,8 +124,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
@@ -165,26 +164,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 e1cdd226f..05442c6c6 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -115,20 +115,7 @@ impl Step for Std {
fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>) {
let libdir = builder.sysroot_libdir(*compiler, target);
- // 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.
- if target.contains("musl") {
- for &obj in &["crt1.o", "crti.o", "crtn.o"] {
- builder.copy(
- &builder.musl_root(target).unwrap().join("lib").join(obj),
- &libdir.join(obj),
- );
- }
- } else if target.ends_with("-wasi") {
+ if target.ends_with("-wasi") {
for &obj in &["crt1.o"] {
builder.copy(
&builder.wasi_root(target).unwrap().join("lib/wasm32-wasi").join(obj),
@@ -191,12 +178,6 @@ pub fn std_cargo(builder: &Builder<'_>,
.arg("--manifest-path")
.arg(builder.src.join("src/libstd/Cargo.toml"));
- if target.contains("musl") {
- if let Some(p) = builder.musl_root(target) {
- cargo.env("MUSL_ROOT", p);
- }
- }
-
if target.ends_with("-wasi") {
if let Some(p) = builder.wasi_root(target) {
cargo.env("WASI_ROOT", p);
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index b1d009a67..cc567839f 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -135,8 +135,6 @@ pub struct Config {
pub print_step_timings: bool,
pub missing_tools: bool,
- // Fallback musl-root for all targets
- pub musl_root: Option<PathBuf>,
pub prefix: Option<PathBuf>,
pub sysconfdir: Option<PathBuf>,
pub datadir: Option<PathBuf>,
@@ -171,7 +169,6 @@ pub struct Target {
pub linker: Option<PathBuf>,
pub ndk: Option<PathBuf>,
pub crt_static: Option<bool>,
- pub musl_root: Option<PathBuf>,
pub wasi_root: Option<PathBuf>,
pub qemu_rootfs: Option<PathBuf>,
pub no_std: bool,
@@ -308,7 +305,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>,
@@ -348,7 +344,6 @@ struct TomlTarget {
linker: Option<String>,
android_ndk: Option<String>,
crt_static: Option<bool>,
- musl_root: Option<String>,
wasi_root: Option<String>,
qemu_rootfs: Option<String>,
}
@@ -568,7 +563,6 @@ impl Config {
set(&mut config.llvm_tools_enabled, rust.llvm_tools);
config.rustc_parallel = rust.parallel_compiler.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);
@@ -611,7 +605,6 @@ impl Config {
target.ranlib = cfg.ranlib.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.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index ade8afee7..f9ccf7aed 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -111,28 +111,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 7618a6e6d..49cdb526e 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -852,14 +852,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 the sysroot for the wasi target, if defined
fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
self.config.target_config.get(&target)
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
index dc65fb9b7..060ba6d9e 100644
--- a/src/bootstrap/sanity.rs
+++ b/src/bootstrap/sanity.rs
@@ -176,34 +176,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_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 ba2d32a92..412c37fdd 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 a722a4183..44e6728de 100644
--- a/src/ci/docker/dist-various-1/Dockerfile
+++ b/src/ci/docker/dist-various-1/Dockerfile
@@ -132,13 +132,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
CXX_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++
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 385eefde8..81d4f7737 100644
--- a/src/ci/docker/dist-x86_64-musl/Dockerfile
+++ b/src/ci/docker/dist-x86_64-musl/Dockerfile
@@ -31,7 +31,6 @@ RUN sh /scripts/sccache.sh
ENV HOSTS=x86_64-unknown-linux-musl
ENV RUST_CONFIGURE_ARGS \
- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
--enable-extended \
--disable-docs \
--set target.x86_64-unknown-linux-musl.crt-static=false \
diff --git a/src/ci/docker/test-various/Dockerfile b/src/ci/docker/test-various/Dockerfile
index 611a24a69..99c2b866b 100644
--- a/src/ci/docker/test-various/Dockerfile
+++ b/src/ci/docker/test-various/Dockerfile
@@ -31,7 +31,6 @@ COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
ENV RUST_CONFIGURE_ARGS \
- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
--set build.nodejs=/node-v9.2.0-linux-x64/bin/node \
--set rust.lld
diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
index e294e6398..58ae91a96 100644
--- a/src/librustc_target/spec/linux_musl_base.rs
+++ b/src/librustc_target/spec/linux_musl_base.rs
@@ -3,28 +3,12 @@ use crate::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());
- // 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.22.0

View File

@ -0,0 +1,24 @@
From b8815ecb4ec9ecf7c2469703005bede91c0f6f82 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/12] 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 0ccffea31..935175dd8 100644
--- a/src/libunwind/lib.rs
+++ b/src/libunwind/lib.rs
@@ -26,6 +26,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.22.0

View File

@ -0,0 +1,39 @@
From 0401335b6e3724d4868c9c4b556f586c7fcf60b8 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 6 Jul 2019 17:49:18 +0200
Subject: [PATCH 07/12] runtest: Fix proc-macro tests on musl hosts
---
src/tools/compiletest/src/runtest.rs | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 2082de7cb..03c7a4c58 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1649,9 +1649,6 @@ impl<'test> TestCx<'test> {
(true, None)
} else if self.config.target.contains("cloudabi")
|| self.config.target.contains("emscripten")
- || (self.config.target.contains("musl")
- && !aux_props.force_host
- && !self.config.host.contains("musl"))
|| self.config.target.contains("wasm32")
|| self.config.target.contains("nvptx")
{
@@ -1660,10 +1657,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.
(false, Some("lib"))
} else {
(true, Some("dylib"))
--
2.22.0

View File

@ -0,0 +1,30 @@
From a10b846716f923b3c5c28fc86e9b07103600ed52 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 6 Jul 2019 17:50:54 +0200
Subject: [PATCH 08/12] 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 838b1a271..94fa9f6d0 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 @@
# ignore-openbsd
# ignore-sunos
-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.22.0

View File

@ -0,0 +1,25 @@
From 9f457d208f0e916a5fb61401f6558e1302b97fd5 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 01:32:20 +0000
Subject: [PATCH 09/12] 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 a35174b3c..9e7707068 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.22.0

View File

@ -0,0 +1,104 @@
From 8c4cc90bccacf5ebbb837e5c72de47ab862238f4 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 16 Sep 2018 16:38:48 +0000
Subject: [PATCH 10/12] Ignore broken and non-applicable tests
c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
long-linker-command-lines: takes >10 minutes to run (but still passes)
simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
simd-intrinsic-generic-select.rs: broken on BE, #59356
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/c-link-to-rust-va-list-fn/Makefile | 2 ++
src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 2 ++
src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++
src/test/run-pass/env-funky-keys.rs | 1 +
src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs | 2 ++
src/test/run-pass/simd/simd-intrinsic-generic-select.rs | 2 ++
7 files changed, 12 insertions(+)
diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs
index 78e5b14a2..6f93e9328 100644
--- a/src/test/codegen/sparc-struct-abi.rs
+++ b/src/test/codegen/sparc-struct-abi.rs
@@ -4,6 +4,7 @@
// only-sparc64
// 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/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
index f124ca2ab..363b18f09 100644
--- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
+++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
@@ -1,3 +1,5 @@
+# ignore-aarch64
+
-include ../tools.mk
all:
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 5876fbc94..5f167ece1 100644
--- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
+++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
@@ -1,3 +1,5 @@
+# ignore-test
+
-include ../tools.mk
all:
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 9e7707068..6d92ec5ce 100644
--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
@@ -1,3 +1,5 @@
+# ignore-test
+
-include ../tools.mk
all:
diff --git a/src/test/run-pass/env-funky-keys.rs b/src/test/run-pass/env-funky-keys.rs
index 3b236e2b3..7284d25de 100644
--- a/src/test/run-pass/env-funky-keys.rs
+++ b/src/test/run-pass/env-funky-keys.rs
@@ -1,5 +1,6 @@
// Ignore this test on Android, because it segfaults there.
+// ignore-test
// ignore-android
// ignore-windows
// ignore-cloudabi no execve
diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs b/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
index b28f742a9..3ee4ccce7 100644
--- a/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
+++ b/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
@@ -2,6 +2,8 @@
#![allow(non_camel_case_types)]
// ignore-emscripten
+// ignore-powerpc
+// ignore-powerpc64
// Test that the simd_bitmask intrinsic produces correct results.
diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
index f79b14049..39080c8c9 100644
--- a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
+++ b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
@@ -2,6 +2,8 @@
#![allow(non_camel_case_types)]
// ignore-emscripten
+// ignore-powerpc
+// ignore-powerpc64
// Test that the simd_select intrinsics produces correct results.
--
2.22.0

View File

@ -0,0 +1,27 @@
From 7171338ff6f967b6f2c30bdb8804c8f49670a0de Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 24 Sep 2018 23:42:23 +0000
Subject: [PATCH 11/12] 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 edcd68d01..b5acf43bb 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -209,7 +209,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.22.0

View File

@ -0,0 +1,53 @@
From 6b0dc5093cc23c74dcf1d3bf3a0772b08426785a Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 02:09:10 +0000
Subject: [PATCH 12/12] 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 b0616ff66..7a1225a93 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -597,7 +597,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 23ba93da8..dc51b16c5 100755
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -4,7 +4,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 424302d49..460e11921 100755
--- a/src/etc/rust-lldb
+++ b/src/etc/rust-lldb
@@ -26,7 +26,7 @@ display the contents of local variables!"
fi
# Prepare commands that will be loaded before any file on the command line has been loaded
-script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\""
+script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_rust_formatters.py\""
category_definition="type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust"
category_enable="type category enable Rust"
--
2.22.0

View File

@ -0,0 +1,12 @@
Reason: https://gist.github.com/ab75b3796a9383423deecc0828494ac5
--- rustc-1.36.0-src/src/librustc_target/spec/linux_musl_base.rs
+++ rustc-1.36.0-src/src/librustc_target/spec/linux_musl_base.rs
@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
// These targets statically link libc by default
- base.crt_static_default = true;
+ base.crt_static_default = false;
// These targets allow the user to choose between static and dynamic linking.
base.crt_static_respected = true;

View File

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

View File

@ -0,0 +1,28 @@
From a2062b2ec252bb8be9337a6d5b384c8cdda4463d Mon Sep 17 00:00:00 2001
From: Michael Hudson-Doyle <michael.hudson@canonical.com>
Date: Wed, 13 Mar 2019 15:55:30 +1300
Subject: [PATCH] round result of (highest as f64).log(2.0)
Even though (1024f64).log(2.0) has an exact, representable, value, with
rustc 1.32 on i386 it comes out as +9.999999999999999985 with
optimization enabled. And the rustc doesn't like having two defintions
for U1024 etc.
---
vendor/typenum/build/main.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git rustc-1.36.0-src/vendor/typenum/build/main.rs rustc-1.36.0-src/vendor/typenum/build/main.rs
index 9c9f237cd..153031a2f 100644
--- rustc-1.36.0-src/vendor/typenum/build/main.rs
+++ rustc-1.36.0-src/vendor/typenum/build/main.rs
@@ -77,7 +77,7 @@ pub fn no_std() {}
fn main() {
let highest: u64 = 1024;
- let first2: u32 = (highest as f64).log(2.0) as u32 + 1;
+ let first2: u32 = (highest as f64).log(2.0).round() as u32 + 1;
let first10: u32 = (highest as f64).log(10.0) as u32 + 1;
let uints = (0..(highest + 1))
.chain((first2..64).map(|i| 2u64.pow(i)))
--
2.22.0

View File

@ -0,0 +1,11 @@
This allows lzma-sys to build in a cross-compiling environment.
--- rustc-1.36.0-src/vendor/lzma-sys/build.rs
+++ rustc-1.36.0-src/vendor/lzma-sys/build.rs
@@ -101,6 +101,7 @@ fn main() {
}
cmd.env("CC", compiler.path())
.env("CFLAGS", cflags)
+ .env("LDFLAGS", "")
.current_dir(&dst.join("build"))
.arg(sanitize_sh(&src.join("configure")));
cmd.arg(format!("--prefix={}", sanitize_sh(&dst)));

View File

@ -0,0 +1,14 @@
Reason: rustc_codegen_llvm attempts to link against the host's llvm without this patch
--- rustc-1.36.0-src/src/librustc_llvm/build.rs
+++ rustc-1.36.0-src/src/librustc_llvm/build.rs
@@ -224,8 +224,8 @@ fn main() {
println!("cargo:rustc-link-search=native={}", &lib[9..]);
} else if is_crossed {
if lib.starts_with("-L") {
- println!("cargo:rustc-link-search=native={}",
- lib[2..].replace(&host, &target));
+ println!("cargo:rustc-link-search=native={}{}",
+ env::var("XBPS_CROSS_BASE").unwrap(), &lib[2..]);
}
} else if lib.starts_with("-l") {
println!("cargo:rustc-link-lib={}", &lib[2..]);

View File

@ -0,0 +1,35 @@
This patches librustc_target so that ELFv2 is used everywhere, matching our
LLVM. While this is not perfect (it does not allow rustc to compile legacy
binaries), rustc never requests specific ABI from llvm in the first place,
so at least match the environment we have.
--- rustc-1.36.0-src/src/librustc_target/abi/call/powerpc64.rs
+++ rustc-1.36.0-src/src/librustc_target/abi/call/powerpc64.rs
@@ -124,7 +124,7 @@ 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 = if cx.target_spec().target_env == "musl" {
+ let abi = if cx.target_spec().target_env == "musl" || cx.target_spec().target_env == "gnu" {
ELFv2
} else {
match cx.data_layout().endian {
--- rustc-1.36.0-src/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
+++ rustc-1.36.0-src/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
@@ -1,4 +1,4 @@
-use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult, RelroLevel};
+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
pub fn target() -> TargetResult {
let mut base = super::linux_base::opts();
@@ -6,10 +6,6 @@ pub fn target() -> TargetResult {
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
base.max_atomic_width = Some(64);
- // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
- // for now. https://github.com/rust-lang/rust/pull/43170#issuecomment-315411474
- base.relro_level = RelroLevel::Partial;
-
Ok(Target {
llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
target_endian: "big".to_string(),

View File

@ -0,0 +1,13 @@
--- rustc-1.30.0-src/src/librustc_llvm/lib.rs.orig
+++ rustc-1.30.0-src/src/librustc_llvm/lib.rs
@@ -121,3 +121,10 @@
LLVMInitializeWebAssemblyTargetMC,
LLVMInitializeWebAssemblyAsmPrinter);
}
+
+#[link(name = "ffi")]
+extern {}
+#[link(name = "z")]
+extern {}
+#[link(name = "ncursesw")]
+extern {}

View File

@ -1 +1,19 @@
https://static.rust-lang.org/dist/rustc-1.35.0-src.tar.gz
https://static.rust-lang.org/dist/rustc-1.36.0-src.tar.gz
patches/0002-Fix-LLVM-build.patch
patches/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
patches/0004-Require-static-native-libraries-when-linking-static-.patch
patches/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
patches/0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch
patches/0008-test-use-extern-for-plugins-Don-t-assume-multilib.patch
patches/0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
patches/0010-Ignore-broken-and-non-applicable-tests.patch
patches/0011-Link-stage-2-tools-dynamically-to-libstd.patch
patches/0012-Move-debugger-scripts-to-usr-share-rust.patch
patches/0029-musl-dont-use-crt-static.patch
patches/0030-libc-linkage.patch
patches/0031-typenum-pmmx.patch
patches/0091-lzma-sys-cross-ldflags.patch
patches/0092-use-correct-llvm-cross.patch
patches/0093-use-elfv2-everywhere.patch
patches/llvm-with-dependencies.patch

View File

@ -1 +1 @@
1.35.0 1
1.36.0 1