rust fixups

This commit is contained in:
Cody P Schafer
2015-03-09 22:09:36 -04:00
parent 646ac09232
commit b180bf996d
20 changed files with 127 additions and 30 deletions
+4 -4
View File
@@ -20,14 +20,14 @@ SRC_URI += " \
git://github.com/alexcrichton/libgit2.git;protocol=https;destsuffix=git2-rs/libgit2-sys/libgit2;name=libgit2;branch=libgit2-2014-12-19 \
"
# 0.2.1 / -sys 0.1.14
SRCREV_curl-rust = "e05dcfa59813f2d8c443afa3e37e26482e41091b"
# 0.2.2 / -sys 0.1.16
SRCREV_curl-rust = "24b1508e8d0c8052f10b1c1ed6c88eb14cae0fda"
# 0.1.11 / -sys 0.1.8
SRCREV_ssh2-rs = "bb0c71792799d7261ae6356a26aabd39c9e78430"
SRCREV_ssh2-rs = "80b4350918a236711ed193c06998ddc1af523e17"
# 0.2.2 / -sys 0.2.1
SRCREV_git2-rs = "8b52e3c86cec585038513116654d308f101e4582"
SRCREV_git2-rs = "43d1b116360c013293936058c55556b090950e01"
SRCREV_FORMAT .= "_curl-rust_curl_ssh2-rs_git2-rs"
EXTRA_OECARGO_PATHS = "\
@@ -1,4 +1,4 @@
From 47f506d98444c84f232aefb029c2ec48b7027b8c Mon Sep 17 00:00:00 2001
From bdf481d61083100ecb297c77e812db704ad10a15 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 25 Nov 2014 11:50:28 -0500
Subject: [PATCH 1/2] curl-sys: avoid explicitly linking in openssl. If it is
@@ -10,7 +10,7 @@ Subject: [PATCH 1/2] curl-sys: avoid explicitly linking in openssl. If it is
2 files changed, 18 deletions(-)
diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml
index 5c380ca..cfea848 100644
index ddc6ca0..36f93a0 100644
--- a/curl-sys/Cargo.toml
+++ b/curl-sys/Cargo.toml
@@ -18,21 +18,4 @@ path = "lib.rs"
@@ -1,4 +1,4 @@
From 10407529857b8bb5bb38036fab1e5029627b902d Mon Sep 17 00:00:00 2001
From 66d0d329df945866abe602172980e62668e20f5b Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 25 Nov 2014 12:26:48 -0500
Subject: [PATCH 2/2] remove per-triple deps on openssl-sys
@@ -8,14 +8,14 @@ Subject: [PATCH 2/2] remove per-triple deps on openssl-sys
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 2fc9d87..17cf9f3 100644
index cd886be..3682f8a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,6 +10,7 @@ description = "Rust bindings to libcurl for making HTTP requests"
[dependencies]
url = "0.2.0"
libc = "0.1"
+openssl-sys = "0.5.0"
+openssl-sys = "0.5.1"
[dependencies.curl-sys]
path = "curl-sys"
@@ -26,21 +26,21 @@ index 2fc9d87..17cf9f3 100644
-
-# Unix platforms use OpenSSL for now to provide SSL functionality
-[target.i686-apple-darwin.dependencies]
-openssl-sys = "0.5.0"
-openssl-sys = "0.5.1"
-[target.x86_64-apple-darwin.dependencies]
-openssl-sys = "0.5.0"
-openssl-sys = "0.5.1"
-[target.i686-unknown-linux-gnu.dependencies]
-openssl-sys = "0.5.0"
-openssl-sys = "0.5.1"
-[target.x86_64-unknown-linux-gnu.dependencies]
-openssl-sys = "0.5.0"
-openssl-sys = "0.5.1"
-[target.arm-unknown-linux-gnueabihf.dependencies]
-openssl-sys = "0.5.0"
-openssl-sys = "0.5.1"
-[target.aarch64-unknown-linux-gnu.dependencies]
-openssl-sys = "0.5.0"
-openssl-sys = "0.5.1"
-[target.i686-unknown-freebsd.dependencies]
-openssl-sys = "0.5.0"
-openssl-sys = "0.5.1"
-[target.x86_64-unknown-freebsd.dependencies]
-openssl-sys = "0.5.0"
-openssl-sys = "0.5.1"
--
2.3.1
@@ -1,4 +1,4 @@
From 6a25e761cb76b303e2a5ddd1e91872b30b76f5ee Mon Sep 17 00:00:00 2001
From 04f59e215eb3ebe0a3d5b0ebe99188b4dd4058b9 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 10 Nov 2014 15:06:29 -0500
Subject: [PATCH] Add generic openssl-sys dep
@@ -1,4 +1,4 @@
From 9abdf2a4f8acdc432e83f62d7ac7d0e2eb57bc2e Mon Sep 17 00:00:00 2001
From c9a0ea1470ce440b877cd276fd591c2be4f5c753 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 1 Dec 2014 10:51:31 -0500
Subject: [PATCH] Unconditionally depend on openssl-sys
@@ -1,7 +1,7 @@
From 853675a3609aeb09e0fc6a00e84b8ab4c782a332 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Wed, 26 Nov 2014 10:00:32 -0500
Subject: [PATCH 01/11] libstd/io/process/Command: fully quote and escape the
Subject: [PATCH 01/14] libstd/io/process/Command: fully quote and escape the
command and all args
This makes the command (which may have trailing or leading white space
@@ -1,7 +1,7 @@
From 201c382eb7da7b74915f431617f839281d3451d2 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 1 Dec 2014 15:50:13 -0500
Subject: [PATCH 02/11] std/io/process: add Debug tests
Subject: [PATCH 02/14] std/io/process: add Debug tests
---
src/libstd/old_io/process.rs | 12 ++++++++++++
@@ -1,7 +1,7 @@
From f0e1084b376a00de29a881b3f3a27eefa7ea0a26 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Sat, 15 Nov 2014 20:12:48 -0500
Subject: [PATCH 03/11] platform.mk: avoid choking on i586
Subject: [PATCH 03/14] platform.mk: avoid choking on i586
---
mk/platform.mk | 4 +++-
@@ -1,7 +1,7 @@
From fc801fb0ea65149fcea4ba015338f43d6fb74be2 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 01:40:21 -0500
Subject: [PATCH 04/11] Target: add default target.json path:
Subject: [PATCH 04/14] Target: add default target.json path:
$libdir/rust/targets
---
@@ -1,7 +1,7 @@
From c6f41099f8d1f183b8d08c0b59825ce459bdc2d4 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 14:52:56 -0500
Subject: [PATCH 05/11] mk: for stage0, use RUSTFLAGS to override target libs
Subject: [PATCH 05/14] mk: for stage0, use RUSTFLAGS to override target libs
dir
Setting HLIB specially for stage0 (and even more specially for windows)
@@ -1,7 +1,7 @@
From bb95f40560c254a8e2a605a7cdeaaf4145487749 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 13:48:14 -0500
Subject: [PATCH 06/11] mk: add missing CFG_LIBDIR_RELATIVE
Subject: [PATCH 06/14] mk: add missing CFG_LIBDIR_RELATIVE
---
mk/grammar.mk | 4 ++--
@@ -1,7 +1,7 @@
From 6aa48e1c7e299eda8cc40e95f9027d9c61eabd54 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 24 Nov 2014 13:10:15 -0500
Subject: [PATCH 07/11] configure: support --bindir, and extend libdir to
Subject: [PATCH 07/14] configure: support --bindir, and extend libdir to
non-blessed dirs
Adds --bindir, and:
@@ -1,7 +1,7 @@
From d3e5ed1cd54f4534f830011846fa7a08f5a8db3e Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 24 Nov 2014 13:54:42 -0500
Subject: [PATCH 08/11] Parallelize submake invocations
Subject: [PATCH 08/14] Parallelize submake invocations
---
mk/clean.mk | 2 +-
@@ -1,7 +1,7 @@
From 60877d415f3a1f61c5913de68813e1f869673d57 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Wed, 3 Dec 2014 19:15:19 -0500
Subject: [PATCH 09/11] std/thread_local: workaround for NULL __dso_handle
Subject: [PATCH 09/14] std/thread_local: workaround for NULL __dso_handle
---
src/libstd/thread_local/mod.rs | 2 +-
@@ -1,7 +1,7 @@
From c672135095f7335b98d46f2e378d4dc5b335bbf7 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 2 Mar 2015 12:57:24 -0500
Subject: [PATCH 10/11] configure & install: support disabling calling of
Subject: [PATCH 10/14] configure & install: support disabling calling of
ldconfig
---
@@ -1,7 +1,7 @@
From 513486437ad3ee406edf87ba95651542180df119 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 2 Mar 2015 13:34:59 -0500
Subject: [PATCH 11/11] mk/install: use disable-rewrite-paths
Subject: [PATCH 11/14] mk/install: use disable-rewrite-paths
This stops the install scripts from doing work we've already handled.
@@ -0,0 +1,40 @@
From 7d59fe5bcbb3babc149d70e517506ba3e0b9de4e Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 9 Mar 2015 16:33:27 -0400
Subject: [PATCH 12/14] filesearch: add info! to show path searching
---
src/librustc/metadata/filesearch.rs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs
index ed21d50..d6dc516 100644
--- a/src/librustc/metadata/filesearch.rs
+++ b/src/librustc/metadata/filesearch.rs
@@ -46,6 +46,7 @@ impl<'a> FileSearch<'a> {
let mut found = false;
for (path, kind) in self.search_paths.iter(self.kind) {
+ info!("Searching {:?} for {:?}", path, kind);
match f(path, kind) {
FileMatches => found = true,
FileDoesntMatch => ()
@@ -57,6 +58,7 @@ impl<'a> FileSearch<'a> {
let tlib_path = make_target_lib_path(self.sysroot,
self.triple);
if !visited_dirs.contains(&tlib_path) {
+ info!("Searching {:?} for {:?}", tlib_path, PathKind::All);
match f(&tlib_path, PathKind::All) {
FileMatches => found = true,
FileDoesntMatch => ()
@@ -76,6 +78,7 @@ impl<'a> FileSearch<'a> {
visited_dirs.insert(tlib_path.clone());
// Don't keep searching the RUST_PATH if one match turns up --
// if we did, we'd get a "multiple matching crates" error
+ info!("Searching {:?} for {:?}", tlib_path, PathKind::All);
match f(&tlib_path, PathKind::All) {
FileMatches => {
break;
--
2.3.1
@@ -0,0 +1,26 @@
From f5e0324c7de14e7c264ce717f2aeb1ebcfd78933 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 9 Mar 2015 16:33:48 -0400
Subject: [PATCH 13/14] configure: --enable-debug now also sets -C
debug-assertions=y so `debug!()` works again
---
mk/main.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mk/main.mk b/mk/main.mk
index 65d6f70..22b0224 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -130,7 +130,7 @@ ifdef CFG_DISABLE_DEBUG
CFG_RUSTC_FLAGS += --cfg ndebug
else
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
- CFG_RUSTC_FLAGS += --cfg debug
+ CFG_RUSTC_FLAGS += --cfg debug -C debug-assertions=on
endif
ifdef SAVE_TEMPS
--
2.3.1
@@ -0,0 +1,28 @@
From 2c23c8dba0769ad0e9c4b0a1130410fdccbf8671 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 9 Mar 2015 17:29:02 -0400
Subject: [PATCH 14/14] filesearch: fix for new path
---
src/librustc/metadata/filesearch.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs
index d6dc516..3946376 100644
--- a/src/librustc/metadata/filesearch.rs
+++ b/src/librustc/metadata/filesearch.rs
@@ -217,6 +217,11 @@ pub fn get_or_default_sysroot() -> PathBuf {
while rel.pop() {
p.pop();
}
+
+ // The last element in a relative path can't be popped, so remove it here.
+ if let Some(_) = p.file_name() {
+ p.pop();
+ }
p
}
None => panic!("can't determine value for sysroot")
--
2.3.1
+3
View File
@@ -14,6 +14,9 @@ SRC_URI_append = "\
file://0009-std-thread_local-workaround-for-NULL-__dso_handle.patch \
file://0010-configure-install-support-disabling-calling-of-ldcon.patch \
file://0011-mk-install-use-disable-rewrite-paths.patch \
file://0012-filesearch-add-info-to-show-path-searching.patch \
file://0013-configure-enable-debug-now-also-sets-C-debug-asserti.patch \
file://0014-filesearch-fix-for-new-path.patch \
\
file://rust-installer/0001-add-option-to-disable-rewriting-of-install-paths.patch;patchdir=src/rust-installer \
"