Refresh of the patches

This commit is contained in:
Sylvestre Ledru 2017-02-09 09:50:38 +01:00
parent 91b4911083
commit f3f050d1b3
9 changed files with 43 additions and 101 deletions

1
debian/changelog vendored
View File

@ -5,6 +5,7 @@ rustc (1.15.0+dfsg1-1~exp1) experimental; urgency=medium
* d/p/patches/disable-doc-build-in-all.diff:
all-no-docs no longer exists. Disable the call to doc in all
* Call to the test renamed from check-notidy => check
* Refresh of the patches
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 03 Feb 2017 15:34:42 +0100

View File

@ -18,9 +18,11 @@ Description: Set DT_SONAME when building dylibs
Author: Angus Lees <gus@debian.org>
Forwarded: no
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -848,6 +848,12 @@
Index: rustc.git/src/librustc_trans/back/link.rs
===================================================================
--- rustc.git.orig/src/librustc_trans/back/link.rs
+++ rustc.git/src/librustc_trans/back/link.rs
@@ -895,6 +895,12 @@ fn link_args(cmd: &mut Linker,
cmd.args(&rpath::get_rpath_flags(&mut rpath_config));
}

View File

@ -1,54 +0,0 @@
Description: Don't download SHA256 if it's already available locally
In Debian we provide the stage0 tarballs as a separate component so that the
buildds don't need to access the network during the build.
Author: Ximin Luo <infinity0@debian.org>
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: rust/src/bootstrap/bootstrap.py
===================================================================
--- rust.orig/src/bootstrap/bootstrap.py
+++ rust/src/bootstrap/bootstrap.py
@@ -22,15 +22,17 @@ import tempfile
from time import time
-def get(url, path, verbose=False):
+def get(url, path, verbose=False, use_local_hash_if_present=False):
sha_url = url + ".sha256"
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
temp_path = temp_file.name
- with tempfile.NamedTemporaryFile(suffix=".sha256", delete=False) as sha_file:
- sha_path = sha_file.name
+ sha_path = path + ".sha256"
try:
- download(sha_path, sha_url, verbose)
+ if use_local_hash_if_present and os.path.exists(sha_path):
+ print("using already-download file " + sha_path)
+ else:
+ download(sha_path, sha_url, verbose)
if os.path.exists(path):
if verify(path, sha_path, False):
print("using already-download file " + path)
@@ -44,7 +46,6 @@ def get(url, path, verbose=False):
print("moving {} to {}".format(temp_path, path))
shutil.move(temp_path, path)
finally:
- delete_if_present(sha_path)
delete_if_present(temp_path)
Index: rust/src/etc/get-stage0.py
===================================================================
--- rust.orig/src/etc/get-stage0.py
+++ rust/src/etc/get-stage0.py
@@ -31,7 +31,7 @@ def main(triple):
filename = 'rustc-{}-{}.tar.gz'.format(channel, triple)
url = 'https://static.rust-lang.org/dist/{}/{}'.format(date, filename)
dst = dl_dir + '/' + filename
- bootstrap.get(url, dst)
+ bootstrap.get(url, dst, use_local_hash_if_present=True)
stage0_dst = triple + '/stage0'
if os.path.exists(stage0_dst):

View File

@ -9,13 +9,13 @@ Author: Ximin Luo <infinity0@debian.org>
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: rust/src/librustc_llvm/build.rs
Index: rustc.git/src/librustc_llvm/build.rs
===================================================================
--- rust.orig/src/librustc_llvm/build.rs
+++ rust/src/librustc_llvm/build.rs
@@ -123,63 +123,10 @@ fn main() {
.cpp_link_stdlib(None) // we handle this below
.compile("librustllvm.a");
--- rustc.git.orig/src/librustc_llvm/build.rs
+++ rustc.git/src/librustc_llvm/build.rs
@@ -157,55 +157,10 @@ fn main() {
let (llvm_kind, llvm_link_arg) = detect_llvm_link(&llvm_config);
- // Link in all LLVM libraries, if we're uwring the "wrong" llvm-config then
- // we don't pick up system libs because unfortunately they're for the host
@ -23,16 +23,8 @@ Index: rust/src/librustc_llvm/build.rs
- let mut cmd = Command::new(&llvm_config);
- cmd.arg("--libs");
-
- // Force static linking with "--link-static" if available.
- let mut version_cmd = Command::new(&llvm_config);
- version_cmd.arg("--version");
- let version_output = output(&mut version_cmd);
- let mut parts = version_output.split('.');
- if let (Some(major), Some(minor)) = (parts.next().and_then(|s| s.parse::<u32>().ok()),
- parts.next().and_then(|s| s.parse::<u32>().ok())) {
- if major > 3 || (major == 3 && minor >= 8) {
- cmd.arg("--link-static");
- }
- if let Some(link_arg) = llvm_link_arg {
- cmd.arg(link_arg);
- }
-
- if !is_crossed {
@ -68,7 +60,7 @@ Index: rust/src/librustc_llvm/build.rs
- }
-
- let kind = if name.starts_with("LLVM") {
- "static"
- llvm_kind
- } else {
- "dylib"
- };
@ -81,10 +73,10 @@ Index: rust/src/librustc_llvm/build.rs
// LLVM ldflags
//
Index: rust/src/etc/mklldeps.py
Index: rustc.git/src/etc/mklldeps.py
===================================================================
--- rust.orig/src/etc/mklldeps.py
+++ rust/src/etc/mklldeps.py
--- rustc.git.orig/src/etc/mklldeps.py
+++ rustc.git/src/etc/mklldeps.py
@@ -56,38 +56,13 @@ def runErr(args):
f.write("\n")

View File

@ -1,8 +1,8 @@
Index: rust/src/librustdoc/html/render.rs
Index: rustc.git/src/librustdoc/html/render.rs
===================================================================
--- rust.orig/src/librustdoc/html/render.rs
+++ rust/src/librustdoc/html/render.rs
@@ -653,8 +653,16 @@ fn write_shared(cx: &Context,
--- rustc.git.orig/src/librustdoc/html/render.rs
+++ rustc.git/src/librustdoc/html/render.rs
@@ -656,8 +656,16 @@ fn write_shared(cx: &Context,
// Add all the static files. These may already exist, but we just
// overwrite them anyway to make sure that they're fresh and up-to-date.

View File

@ -14,7 +14,6 @@ u-detect-mips-cpu.patch
d-rust-gdb-paths
d-rust-lldb-paths
d-add-soname.patch
d-dont-download-stage0.patch
d-fix-configure-for-deb-arches.patch
d-dynamic-link-llvm.patch
d-use-system-jquery.patch

View File

@ -1,7 +1,7 @@
Index: rust/src/test/run-pass-valgrind/down-with-thread-dtors.rs
Index: rustc.git/src/test/run-pass-valgrind/down-with-thread-dtors.rs
===================================================================
--- rust.orig/src/test/run-pass-valgrind/down-with-thread-dtors.rs 2016-11-26 23:37:52.792391857 +0000
+++ rust/src/test/run-pass-valgrind/down-with-thread-dtors.rs 2016-11-26 23:37:52.792391857 +0000
--- rustc.git.orig/src/test/run-pass-valgrind/down-with-thread-dtors.rs
+++ rustc.git/src/test/run-pass-valgrind/down-with-thread-dtors.rs
@@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
@ -10,10 +10,10 @@ Index: rust/src/test/run-pass-valgrind/down-with-thread-dtors.rs
// no-prefer-dynamic
thread_local!(static FOO: Foo = Foo);
Index: rust/src/test/debuginfo/macro-stepping.rs
Index: rustc.git/src/test/debuginfo/macro-stepping.rs
===================================================================
--- rust.orig/src/test/debuginfo/macro-stepping.rs 2016-11-26 23:31:56.315657113 +0000
+++ rust/src/test/debuginfo/macro-stepping.rs 2016-11-26 23:39:44.602821432 +0000
--- rustc.git.orig/src/test/debuginfo/macro-stepping.rs
+++ rustc.git/src/test/debuginfo/macro-stepping.rs
@@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
@ -21,4 +21,4 @@ Index: rust/src/test/debuginfo/macro-stepping.rs
+// ignore-aarch64
// ignore-windows
// ignore-android
// min-lldb-version: 310
// ignore-aarch64

View File

@ -10,11 +10,11 @@ Author: Ximin Luo <infinity0@debian.org>
Forwarded: TODO pending enabling armhf in Debian
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: rust/src/doc/reference.md
Index: rustc.git/src/doc/reference.md
===================================================================
--- rust.orig/src/doc/reference.md
+++ rust/src/doc/reference.md
@@ -1106,7 +1106,7 @@ bodies defined in Rust code _can be call
--- rustc.git.orig/src/doc/reference.md
+++ rustc.git/src/doc/reference.md
@@ -1133,7 +1133,7 @@ bodies defined in Rust code _can be call
in the same way as any other Rust function, except that they have the `extern`
modifier.

View File

@ -4,14 +4,16 @@ Author: Ximin Luo <infinity0@debian.org>
Forwarded: TODO
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -63,7 +63,7 @@
".DownloadFile('{}', '{}')".format(url, path)],
verbose=verbose)
else:
- run(["curl", "-o", path, url], verbose=verbose)
+ run(["curl", "-R", "-o", path, url], verbose=verbose)
Index: rustc.git/src/bootstrap/bootstrap.py
===================================================================
--- rustc.git.orig/src/bootstrap/bootstrap.py
+++ rustc.git/src/bootstrap/bootstrap.py
@@ -72,7 +72,7 @@ def download(path, url, probably_big, ve
option = "-#"
else:
option = "-s"
- run(["curl", option, "-Sf", "-o", path, url], verbose=verbose)
+ run(["curl", "-R", option, "-Sf", "-o", path, url], verbose=verbose)
def verify(path, sha_path, verbose):