Rust: cleanup recipes and WIP for 1.73.0 (#9752)

This commit cleans out all previous Rust recipes, and provides a work
in progress recipe for 1.73.0.

The current status of the 1.73.0 recipe is that it contains all changes
that are needed to do a successful build. I am running into an error,
where the intermediate stage1 compiler is not able to find the core
and standard libraries. This is not an issue building outside of
`haikuporter`. I suspect the chroot environment may be the reason, but
it requires more investigation.
This commit is contained in:
Niels Sascha Reedijk
2023-11-20 06:38:23 +00:00
committed by GitHub
parent b299ceb40e
commit 556ef50e0e
86 changed files with 45 additions and 20271 deletions

View File

@@ -1,175 +0,0 @@
From 34ba38e6435e94312f7f83b0fb1eb67f8c743dcd Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 08:09:26 +0000
Subject: [PATCH 1/4] Update dependencies to packages with Haiku support
* num_cpus from 1.1.0 to 1.4.0
* fs2 from 0.3.0 to 0.4.2
---
Cargo.lock | 12 ++++++------
Cargo.toml | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 679ed04..4c23ac6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -12,7 +12,7 @@ dependencies = [
"env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "fs2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"git2 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -22,7 +22,7 @@ dependencies = [
"libgit2-sys 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
"psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -181,7 +181,7 @@ dependencies = [
[[package]]
name = "fs2"
-version = "0.3.0"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -435,7 +435,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
-version = "1.1.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -660,7 +660,7 @@ dependencies = [
"checksum error-chain 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "318cb3c71ee4cdea69fdc9e15c173b245ed6063e1709029e8fd32525a881120f"
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
"checksum flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "3eeb481e957304178d2e782f2da1257f1434dfecbae883bafb61ada2a9fea3bb"
-"checksum fs2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "640001e1bd865c7c32806292822445af576a6866175b5225aa2087ca5e3de551"
+"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum gcc 0.3.39 (registry+https://github.com/rust-lang/crates.io-index)" = "771e4a97ff6f237cf0f7d5f5102f6e28bb9743814b6198d684da5c58b76c11e0"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
"checksum git2 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0534ca86640c6a3a0687cc6bee9ec4032509a0d112d97e8241fa6b7e075f6119"
@@ -688,7 +688,7 @@ dependencies = [
"checksum num-iter 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "287a1c9969a847055e1122ec0ea7a5c5d6f72aad97934e131c83d5c08ab4e45c"
"checksum num-rational 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "54ff603b8334a72fbb27fe66948aac0abaaa40231b3cecd189e76162f6f38aaf"
"checksum num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a16a42856a256b39c6d3484f097f6713e14feacd9bfb02290917904fae46c81c"
-"checksum num_cpus 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8890e6084723d57d0df8d2720b0d60c6ee67d6c93e7169630e4371e88765dcad"
+"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167"
"checksum openssl 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0c00da69323449142e00a5410f0e022b39e8bbb7dc569cee8fc6af279279483c"
"checksum openssl-probe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "756d49c8424483a3df3b5d735112b4da22109ced9a8294f1f5cdf80fb3810919"
"checksum openssl-sys 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b1482f9a06f56c906007e17ea14d73d102210b5d27bc948bf5e175f493f3f7c3"
diff --git a/Cargo.toml b/Cargo.toml
index 54ca093..ea6c16a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,7 +24,7 @@ docopt = "0.6"
env_logger = "0.3"
filetime = "0.1"
flate2 = "0.2"
-fs2 = "0.3"
+fs2 = "0.4.2"
git2 = "0.6"
git2-curl = "0.7"
glob = "0.2"
--
2.7.0
From 3757cd1452455ebeef36e6e7b91edf8f6e23824f Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 08:10:10 +0000
Subject: [PATCH 2/4] Haiku: libc does not define SIGSYS. Use the constant
instead.
To be fixed in future versions of liblibc
---
src/cargo/util/errors.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo/util/errors.rs b/src/cargo/util/errors.rs
index c54199f..f821085 100644
--- a/src/cargo/util/errors.rs
+++ b/src/cargo/util/errors.rs
@@ -429,7 +429,7 @@ pub fn process_error(msg: &str,
libc::SIGSEGV => ", SIGSEGV: invalid memory reference",
libc::SIGTERM => ", SIGTERM: termination signal",
libc::SIGBUS => ", SIGBUS: access to undefined memory",
- libc::SIGSYS => ", SIGSYS: bad system call",
+ 25 => ", SIGSYS: bad system call",
libc::SIGTRAP => ", SIGTRAP: trace/breakpoint trap",
_ => "",
};
--
2.7.0
From ee129f92b11a54d127c33ae7498c6ceecb54d654 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 11:30:02 +0000
Subject: [PATCH 3/4] Haiku: properly process the SYSCONFDIR for Haiku
packaging
---
configure | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure b/configure
index 55e9bb0..ea47e82 100755
--- a/configure
+++ b/configure
@@ -379,6 +379,7 @@ CFG_INFODIR=${CFG_INFODIR#${CFG_PREFIX}}
CFG_DOCDIR=${CFG_DOCDIR#${CFG_PREFIX}}
CFG_MANDIR=${CFG_MANDIR#${CFG_PREFIX}}
CFG_LIBDIR=${CFG_LIBDIR#${CFG_PREFIX}}
+CFG_SYSCONFDIR=${CFG_SYSCONFDIR#${CFG_PREFIX}}
# copy host-triples to target-triples so that hosts are a subset of targets
V_TEMP=""
@@ -407,6 +408,7 @@ putvar CFG_DOCDIR
putvar CFG_INFODIR
putvar CFG_MANDIR
putvar CFG_LIBDIR
+putvar CFG_SYSCONFDIR
putvar CFG_RUSTC
putvar CFG_RUSTDOC
putvar CFG_CARGO
--
2.7.0
From cadf34e1936325e1ddd2c79f22f97359ef5b931f Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 17:54:43 +0000
Subject: [PATCH 4/4] Haiku: rename() gives an error when the filenames are the
same. Backport of future fix
---
src/cargo/ops/cargo_rustc/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo/ops/cargo_rustc/mod.rs b/src/cargo/ops/cargo_rustc/mod.rs
index fd8c379..d004b73 100644
--- a/src/cargo/ops/cargo_rustc/mod.rs
+++ b/src/cargo/ops/cargo_rustc/mod.rs
@@ -373,7 +373,7 @@ fn rustc(cx: &mut Context, unit: &Unit, exec: Arc<Executor>) -> CargoResult<Work
let src = dst.with_file_name(dst.file_name().unwrap()
.to_str().unwrap()
.replace(&real_name, &crate_name));
- if src.exists() {
+ if src.exists() && src.file_name() != dst.file_name() {
fs::rename(&src, &dst).chain_error(|| {
internal(format!("could not rename crate {:?}", src))
})?;
--
2.7.0

View File

@@ -1,351 +0,0 @@
From 919eca059d280e4b73403d4d1013a52525fc72e2 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 08:09:26 +0000
Subject: [PATCH 1/5] Update dependencies to packages with Haiku support
* num_cpus from 1.3.0 to 1.4.0
* fs2 from 0.4.1 to 0.4.2
---
Cargo.lock | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 44c3a43b..ef6d2223 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -13,7 +13,7 @@ dependencies = [
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -23,7 +23,7 @@ dependencies = [
"libgit2-sys 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -211,7 +211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "fs2"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -468,7 +468,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
-version = "1.3.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -833,7 +833,7 @@ dependencies = [
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
"checksum flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "d4e4d0c15ef829cbc1b7cda651746be19cceeb238be7b1049227b14891df9e25"
"checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d"
-"checksum fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34edaee07555859dc13ca387e6ae05686bb4d0364c95d649b6dab959511f4baf"
+"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
"checksum git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "046ae03385257040b2a35e56d9669d950dd911ba2bf48202fbef73ee6aab27b2"
@@ -862,7 +862,7 @@ dependencies = [
"checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e"
"checksum num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dc5ea04020a8f18318ae485c751f8cfa1c0e69dcf465c29ddaaa64a313cc44"
"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
-"checksum num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a18c392466409c50b87369414a2680c93e739aedeb498eb2bff7d7eb569744e2"
+"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167"
"checksum openssl 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8aa0eb7aad44f0da6f7dda13ddb4559d91a0f40cfab150b1f76ad5b39ec523f"
"checksum openssl-probe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "756d49c8424483a3df3b5d735112b4da22109ced9a8294f1f5cdf80fb3810919"
"checksum openssl-sys 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "14f5bfd12054d764510b887152d564ba11d99ae24ea7d740781778f646620576"
--
2.16.2
From c8a25f5dc277550dbd18fbe530337c92464fbf18 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 08:10:10 +0000
Subject: [PATCH 2/5] Haiku: libc does not define SIGSYS. Use the constant
instead.
To be fixed in future versions of liblibc
---
src/cargo/util/errors.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo/util/errors.rs b/src/cargo/util/errors.rs
index 80a25401..2ccfc2b0 100644
--- a/src/cargo/util/errors.rs
+++ b/src/cargo/util/errors.rs
@@ -431,7 +431,7 @@ pub fn process_error(msg: &str,
libc::SIGSEGV => ", SIGSEGV: invalid memory reference",
libc::SIGTERM => ", SIGTERM: termination signal",
libc::SIGBUS => ", SIGBUS: access to undefined memory",
- libc::SIGSYS => ", SIGSYS: bad system call",
+ 25 => ", SIGSYS: bad system call",
libc::SIGTRAP => ", SIGTRAP: trace/breakpoint trap",
_ => "",
};
--
2.16.2
From 69d9620d86d523874414ab26dc4f2a1589ca2b19 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 11:30:02 +0000
Subject: [PATCH 3/5] Haiku: properly process the SYSCONFDIR for Haiku
packaging
---
configure | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure b/configure
index 55e9bb0d..ea47e820 100755
--- a/configure
+++ b/configure
@@ -379,6 +379,7 @@ CFG_INFODIR=${CFG_INFODIR#${CFG_PREFIX}}
CFG_DOCDIR=${CFG_DOCDIR#${CFG_PREFIX}}
CFG_MANDIR=${CFG_MANDIR#${CFG_PREFIX}}
CFG_LIBDIR=${CFG_LIBDIR#${CFG_PREFIX}}
+CFG_SYSCONFDIR=${CFG_SYSCONFDIR#${CFG_PREFIX}}
# copy host-triples to target-triples so that hosts are a subset of targets
V_TEMP=""
@@ -407,6 +408,7 @@ putvar CFG_DOCDIR
putvar CFG_INFODIR
putvar CFG_MANDIR
putvar CFG_LIBDIR
+putvar CFG_SYSCONFDIR
putvar CFG_RUSTC
putvar CFG_RUSTDOC
putvar CFG_CARGO
--
2.16.2
From 0351ea70283314d9b88fd9af529a864b07028877 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 17:54:43 +0000
Subject: [PATCH 4/5] Haiku: rename() gives an error when the filenames are the
same. Backport of future fix
---
src/cargo/ops/cargo_rustc/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo/ops/cargo_rustc/mod.rs b/src/cargo/ops/cargo_rustc/mod.rs
index 14ebcc28..4b029c99 100644
--- a/src/cargo/ops/cargo_rustc/mod.rs
+++ b/src/cargo/ops/cargo_rustc/mod.rs
@@ -364,7 +364,7 @@ fn rustc(cx: &mut Context, unit: &Unit, exec: Arc<Executor>) -> CargoResult<Work
let src = dst.with_file_name(dst.file_name().unwrap()
.to_str().unwrap()
.replace(&real_name, &crate_name));
- if src.exists() {
+ if src.exists() && src.file_name() != dst.file_name() {
fs::rename(&src, &dst).chain_error(|| {
internal(format!("could not rename crate {:?}", src))
})?;
--
2.16.2
From ea9b64608a85e070796a4679e211488d2437cb31 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 9 May 2018 18:17:02 +0000
Subject: [PATCH 5/5] Haiku: update libgit2-sys to 0.6.18
This includes PR #276 for the git2-rs repository. git_libgit2_shutdown is no
longer called atexit(). This call created segfaults regularly in cargo.
---
Cargo.lock | 49 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 34 insertions(+), 15 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index ef6d2223..6ec09033 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14,13 +14,13 @@ dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -71,6 +71,11 @@ name = "bitflags"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "bitflags"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "bufstream"
version = "0.1.2"
@@ -84,7 +89,7 @@ dependencies = [
"cargo 0.18.0",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -99,6 +104,11 @@ dependencies = [
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "cc"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "cfg-if"
version = "0.1.0"
@@ -142,7 +152,7 @@ name = "curl"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -151,7 +161,7 @@ dependencies = [
[[package]]
name = "curl-sys"
-version = "0.3.11"
+version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -159,6 +169,7 @@ dependencies = [
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -235,12 +246,12 @@ dependencies = [
[[package]]
name = "git2"
-version = "0.6.4"
+version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -252,7 +263,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -307,12 +318,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libgit2-sys"
-version = "0.6.8"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
- "curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -791,6 +802,11 @@ name = "utf8-ranges"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "vcpkg"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "void"
version = "1.0.2"
@@ -820,13 +836,15 @@ dependencies = [
"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66"
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
+"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum bufstream 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7b48dbe2ff0e98fa2f03377d204a9637d3c9816cd431bfe05a8abbd0ea11d074"
+"checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba"
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
"checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac"
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
"checksum curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c90e1240ef340dd4027ade439e5c7c2064dd9dc652682117bd50d1486a3add7b"
-"checksum curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "23e7e544dc5e1ba42c4a4a678bd47985e84b9c3f4d3404c29700622a029db9c3"
+"checksum curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "f00c8ba847fb0730c293069b4d1203dc01bf3c2e1f90b4e55f426ed8f4a1eeac"
"checksum docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab32ea6e284d87987066f21a9e809a73c14720571ef34516f0890b3d355ccfd8"
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
"checksum env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e3856f1697098606fc6cb97a93de88ca3f3bc35bb878c725920e6e82ecf05e83"
@@ -836,7 +854,7 @@ dependencies = [
"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
-"checksum git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "046ae03385257040b2a35e56d9669d950dd911ba2bf48202fbef73ee6aab27b2"
+"checksum git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "40a111aecd59985496012976beca164b4f6c930d507a099831e06b07f19d54f1"
"checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf088f042a467089e9baa4972f57f9247e42a0cc549ba264c7a04fbb8ecb89d4"
@@ -845,7 +863,7 @@ dependencies = [
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum lazy_static 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4732c563b9a21a406565c4747daa7b46742f082911ae4753f390dc9ec7ee1a97"
"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135"
-"checksum libgit2-sys 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68bed1d1198da5d2b047af68fd71613ddfaa3d5b68797181b33e9d8547263b4b"
+"checksum libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "82fc20bd8beefe7c9f98aae2d3cff78e57f544cdd83d58fe181ec37a5fbe0c77"
"checksum libssh2-sys 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "91e135645c2e198a39552c8c7686bb5b83b1b99f64831c040a6c2798a1195934"
"checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c"
"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad"
@@ -904,6 +922,7 @@ dependencies = [
"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
+"checksum vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed0f6789c8a85ca41bbc1c9d175422116a9869bd1cf31bb08e1493ecce60380"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
--
2.16.2

View File

@@ -1,351 +0,0 @@
From 154b259a1235f3be3cf8d4d89d45897846820026 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 08:09:26 +0000
Subject: [PATCH 1/5] Update dependencies to packages with Haiku support
* num_cpus from 1.3.0 to 1.4.0
* fs2 from 0.4.1 to 0.4.2
---
Cargo.lock | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 2af99367..d696cf27 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -13,7 +13,7 @@ dependencies = [
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -23,7 +23,7 @@ dependencies = [
"libgit2-sys 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -211,7 +211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "fs2"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -468,7 +468,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
-version = "1.3.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -833,7 +833,7 @@ dependencies = [
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
"checksum flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "d4e4d0c15ef829cbc1b7cda651746be19cceeb238be7b1049227b14891df9e25"
"checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d"
-"checksum fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34edaee07555859dc13ca387e6ae05686bb4d0364c95d649b6dab959511f4baf"
+"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
"checksum git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "046ae03385257040b2a35e56d9669d950dd911ba2bf48202fbef73ee6aab27b2"
@@ -862,7 +862,7 @@ dependencies = [
"checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e"
"checksum num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dc5ea04020a8f18318ae485c751f8cfa1c0e69dcf465c29ddaaa64a313cc44"
"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
-"checksum num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a18c392466409c50b87369414a2680c93e739aedeb498eb2bff7d7eb569744e2"
+"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167"
"checksum openssl 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8aa0eb7aad44f0da6f7dda13ddb4559d91a0f40cfab150b1f76ad5b39ec523f"
"checksum openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d98df0270d404ccd3c050a41d579c52d1db15375168bb3471e04ec0f5f378daf"
"checksum openssl-sys 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "14f5bfd12054d764510b887152d564ba11d99ae24ea7d740781778f646620576"
--
2.16.2
From 755b0c67b94534c936df99ed0b2d9a28ef3d09d3 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 08:10:10 +0000
Subject: [PATCH 2/5] Haiku: libc does not define SIGSYS. Use the constant
instead.
To be fixed in future versions of liblibc
---
src/cargo/util/errors.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo/util/errors.rs b/src/cargo/util/errors.rs
index 94f422f8..1bf0a9d8 100644
--- a/src/cargo/util/errors.rs
+++ b/src/cargo/util/errors.rs
@@ -459,7 +459,7 @@ pub fn process_error(msg: &str,
libc::SIGSEGV => ", SIGSEGV: invalid memory reference",
libc::SIGTERM => ", SIGTERM: termination signal",
libc::SIGBUS => ", SIGBUS: access to undefined memory",
- libc::SIGSYS => ", SIGSYS: bad system call",
+ 25 => ", SIGSYS: bad system call",
libc::SIGTRAP => ", SIGTRAP: trace/breakpoint trap",
_ => "",
};
--
2.16.2
From 6520893d37b540e4ced1531c2eabcb51da234ff4 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 11:30:02 +0000
Subject: [PATCH 3/5] Haiku: properly process the SYSCONFDIR for Haiku
packaging
---
configure | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure b/configure
index 55e9bb0d..ea47e820 100755
--- a/configure
+++ b/configure
@@ -379,6 +379,7 @@ CFG_INFODIR=${CFG_INFODIR#${CFG_PREFIX}}
CFG_DOCDIR=${CFG_DOCDIR#${CFG_PREFIX}}
CFG_MANDIR=${CFG_MANDIR#${CFG_PREFIX}}
CFG_LIBDIR=${CFG_LIBDIR#${CFG_PREFIX}}
+CFG_SYSCONFDIR=${CFG_SYSCONFDIR#${CFG_PREFIX}}
# copy host-triples to target-triples so that hosts are a subset of targets
V_TEMP=""
@@ -407,6 +408,7 @@ putvar CFG_DOCDIR
putvar CFG_INFODIR
putvar CFG_MANDIR
putvar CFG_LIBDIR
+putvar CFG_SYSCONFDIR
putvar CFG_RUSTC
putvar CFG_RUSTDOC
putvar CFG_CARGO
--
2.16.2
From 63c5596d0ea8cdfcb5100e5b1a36fbe160988ad8 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 8 Oct 2017 17:54:43 +0000
Subject: [PATCH 4/5] Haiku: rename() gives an error when the filenames are the
same. Backport of future fix
---
src/cargo/ops/cargo_rustc/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo/ops/cargo_rustc/mod.rs b/src/cargo/ops/cargo_rustc/mod.rs
index b20f5709..ae3af71a 100644
--- a/src/cargo/ops/cargo_rustc/mod.rs
+++ b/src/cargo/ops/cargo_rustc/mod.rs
@@ -369,7 +369,7 @@ fn rustc(cx: &mut Context, unit: &Unit, exec: Arc<Executor>) -> CargoResult<Work
let src = dst.with_file_name(dst.file_name().unwrap()
.to_str().unwrap()
.replace(&real_name, &crate_name));
- if src.exists() {
+ if src.exists() && src.file_name() != dst.file_name() {
fs::rename(&src, &dst).chain_error(|| {
internal(format!("could not rename crate {:?}", src))
})?;
--
2.16.2
From 35add04124629d0a357523f781076164180de7d4 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Thu, 10 May 2018 06:39:45 +0000
Subject: [PATCH 5/5] Haiku: update libgit2-sys to 0.6.18 This includes PR #276
for the git2-rs repository. git_libgit2_shutdown is no longer called
atexit(). This call created segfaults regularly in cargo.
---
Cargo.lock | 49 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 34 insertions(+), 15 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index d696cf27..47566652 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14,13 +14,13 @@ dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -71,6 +71,11 @@ name = "bitflags"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "bitflags"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "bufstream"
version = "0.1.2"
@@ -84,7 +89,7 @@ dependencies = [
"cargo 0.19.0",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -99,6 +104,11 @@ dependencies = [
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "cc"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "cfg-if"
version = "0.1.0"
@@ -142,7 +152,7 @@ name = "curl"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "curl-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -151,7 +161,7 @@ dependencies = [
[[package]]
name = "curl-sys"
-version = "0.3.10"
+version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -159,6 +169,7 @@ dependencies = [
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -235,12 +246,12 @@ dependencies = [
[[package]]
name = "git2"
-version = "0.6.4"
+version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -252,7 +263,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -307,12 +318,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libgit2-sys"
-version = "0.6.7"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
- "curl-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -791,6 +802,11 @@ name = "utf8-ranges"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "vcpkg"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "void"
version = "1.0.2"
@@ -820,13 +836,15 @@ dependencies = [
"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66"
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
+"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum bufstream 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7b48dbe2ff0e98fa2f03377d204a9637d3c9816cd431bfe05a8abbd0ea11d074"
+"checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba"
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
"checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac"
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
"checksum curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c90e1240ef340dd4027ade439e5c7c2064dd9dc652682117bd50d1486a3add7b"
-"checksum curl-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d909dc402ae80b6f7b0118c039203436061b9d9a3ca5d2c2546d93e0a61aaa"
+"checksum curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "f00c8ba847fb0730c293069b4d1203dc01bf3c2e1f90b4e55f426ed8f4a1eeac"
"checksum docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab32ea6e284d87987066f21a9e809a73c14720571ef34516f0890b3d355ccfd8"
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
"checksum env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e3856f1697098606fc6cb97a93de88ca3f3bc35bb878c725920e6e82ecf05e83"
@@ -836,7 +854,7 @@ dependencies = [
"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
-"checksum git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "046ae03385257040b2a35e56d9669d950dd911ba2bf48202fbef73ee6aab27b2"
+"checksum git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "40a111aecd59985496012976beca164b4f6c930d507a099831e06b07f19d54f1"
"checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf088f042a467089e9baa4972f57f9247e42a0cc549ba264c7a04fbb8ecb89d4"
@@ -845,7 +863,7 @@ dependencies = [
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum lazy_static 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4732c563b9a21a406565c4747daa7b46742f082911ae4753f390dc9ec7ee1a97"
"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135"
-"checksum libgit2-sys 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d951fd5eccae07c74e8c2c1075b05ea1e43be7f8952245af8c2840d1480b1d95"
+"checksum libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "82fc20bd8beefe7c9f98aae2d3cff78e57f544cdd83d58fe181ec37a5fbe0c77"
"checksum libssh2-sys 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "91e135645c2e198a39552c8c7686bb5b83b1b99f64831c040a6c2798a1195934"
"checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c"
"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad"
@@ -904,6 +922,7 @@ dependencies = [
"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
+"checksum vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed0f6789c8a85ca41bbc1c9d175422116a9869bd1cf31bb08e1493ecce60380"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
--
2.16.2

View File

@@ -1,128 +0,0 @@
From 2d73065e47d30dcab54155493388f06e1fd69db6 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 16 Oct 2017 06:42:09 +0000
Subject: [PATCH] Haiku: fix dependencies
---
Cargo.lock | 26 +++++++++++++-------------
Cargo.toml | 2 +-
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index fd03cdd..40ae3ca 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,8 +1,8 @@
[root]
name = "cargo-vendor"
-version = "0.1.5"
+version = "0.1.6"
dependencies = [
- "cargo 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cargo 0.17.0 (git+https://github.com/nielx/cargo?branch=cargo-haiku-0.17.0)",
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -40,17 +40,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cargo"
version = "0.17.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/nielx/cargo?branch=cargo-haiku-0.17.0#ee129f92b11a54d127c33ae7498c6ceecb54d654"
dependencies = [
"advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "crates-io 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "crates-io 0.6.0 (git+https://github.com/nielx/cargo?branch=cargo-haiku-0.17.0)",
"crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"curl 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"docopt 0.6.86 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "fs2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -59,7 +59,7 @@ dependencies = [
"libgit2-sys 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
"psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -90,7 +90,7 @@ dependencies = [
[[package]]
name = "crates-io"
version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/nielx/cargo?branch=cargo-haiku-0.17.0#ee129f92b11a54d127c33ae7498c6ceecb54d654"
dependencies = [
"curl 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -180,7 +180,7 @@ dependencies = [
[[package]]
name = "fs2"
-version = "0.3.0"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -367,7 +367,7 @@ dependencies = [
[[package]]
name = "num_cpus"
-version = "1.2.1"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -635,10 +635,10 @@ dependencies = [
"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66"
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
-"checksum cargo 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d743b5e0ae7ef24e1053780bce3dc5ac47a923dfafe5759244980607716571a"
+"checksum cargo 0.17.0 (git+https://github.com/nielx/cargo?branch=cargo-haiku-0.17.0)" = "<none>"
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
"checksum cmake 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "a3a6805df695087e7c1bcd9a82e03ad6fb864c8e67ac41b1348229ce5b7f0407"
-"checksum crates-io 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "14982f07738e88d42b575b67b8a902da50473efdcb30b9c43a27e08f399a1943"
+"checksum crates-io 0.6.0 (git+https://github.com/nielx/cargo?branch=cargo-haiku-0.17.0)" = "<none>"
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
"checksum curl 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "52f97f136f098f09c5d377e150afde7b29f43690cd1d80edb71409fda11c904e"
"checksum curl-sys 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ec50c305e9de46198e8911556355f4aea46f2002cb25d2388d421404e91b60d9"
@@ -648,7 +648,7 @@ dependencies = [
"checksum error-chain 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "318cb3c71ee4cdea69fdc9e15c173b245ed6063e1709029e8fd32525a881120f"
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
"checksum flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "d4e4d0c15ef829cbc1b7cda651746be19cceeb238be7b1049227b14891df9e25"
-"checksum fs2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "640001e1bd865c7c32806292822445af576a6866175b5225aa2087ca5e3de551"
+"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)" = "c07c758b972368e703a562686adb39125707cc1ef3399da8c019fc6c2498a75d"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
"checksum git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "046ae03385257040b2a35e56d9669d950dd911ba2bf48202fbef73ee6aab27b2"
@@ -669,7 +669,7 @@ dependencies = [
"checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726"
"checksum miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3e690c5df6b2f60acd45d56378981e827ff8295562fc8d34f573deb267a59cd1"
"checksum net2 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "5edf9cb6be97212423aed9413dd4729d62b370b5e1c571750e882cebbbc1e3e2"
-"checksum num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a225d1e2717567599c24f88e49f00856c6e825a12125181ee42c4257e3688d39"
+"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167"
"checksum openssl 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0c00da69323449142e00a5410f0e022b39e8bbb7dc569cee8fc6af279279483c"
"checksum openssl-probe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "756d49c8424483a3df3b5d735112b4da22109ced9a8294f1f5cdf80fb3810919"
"checksum openssl-sys 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b1482f9a06f56c906007e17ea14d73d102210b5d27bc948bf5e175f493f3f7c3"
diff --git a/Cargo.toml b/Cargo.toml
index d9f2992..8afd80a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,6 +12,6 @@ filesystem.
"""
[dependencies]
-cargo = "0.17"
+cargo = { git = "https://github.com/nielx/cargo", branch = "cargo-haiku-0.17.0" }
rustc-serialize = "0.3"
env_logger = "0.4"
--
2.7.0

View File

@@ -1,101 +0,0 @@
From 6383a6c04ef2c915391563de62b01456a6723f87 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 18:20:13 +0000
Subject: Patches for Haiku
diff --git a/mk/cfg/i686-unknown-haiku.mk b/mk/cfg/i686-unknown-haiku.mk
index cbacbff..d1bcc7a 100644
--- a/mk/cfg/i686-unknown-haiku.mk
+++ b/mk/cfg/i686-unknown-haiku.mk
@@ -9,7 +9,7 @@ CFG_STATIC_LIB_NAME_i686-unknown-haiku=lib$(1).a
CFG_LIB_GLOB_i686-unknown-haiku=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_i686-unknown-haiku=lib$(1)-*.dylib.dSYM
CFG_CFLAGS_i686-unknown-haiku := -m32 $(CFLAGS)
-CFG_GCCISH_CFLAGS_i686-unknown-haiku := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
+CFG_GCCISH_CFLAGS_i686-unknown-haiku := -Wall -g -fPIC -m32 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_i686-unknown-haiku := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_i686-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m32
CFG_GCCISH_PRE_LIB_FLAGS_i686-unknown-haiku := -Wl,-whole-archive
diff --git a/mk/cfg/x86_64-unknown-haiku.mk b/mk/cfg/x86_64-unknown-haiku.mk
index 4c2d888..476327a 100644
--- a/mk/cfg/x86_64-unknown-haiku.mk
+++ b/mk/cfg/x86_64-unknown-haiku.mk
@@ -9,7 +9,7 @@ CFG_STATIC_LIB_NAME_x86_64-unknown-haiku=lib$(1).a
CFG_LIB_GLOB_x86_64-unknown-haiku=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_x86_64-unknown-haiku=lib$(1)-*.dylib.dSYM
CFG_CFLAGS_x86_64-unknown-haiku := -m64 $(CFLAGS)
-CFG_GCCISH_CFLAGS_x86_64-unknown-haiku := -Wall -Werror -g -fPIC -m64 $(CFLAGS)
+CFG_GCCISH_CFLAGS_x86_64-unknown-haiku := -Wall -g -fPIC -m64 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_x86_64-unknown-haiku := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m64
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-haiku := -Wl,-whole-archive
diff --git a/src/librustc_back/target/haiku_base.rs b/src/librustc_back/target/haiku_base.rs
index 5e319ba..7f79330 100644
--- a/src/librustc_back/target/haiku_base.rs
+++ b/src/librustc_back/target/haiku_base.rs
@@ -16,7 +16,7 @@ pub fn opts() -> TargetOptions {
linker: "cc".to_string(),
dynamic_linking: true,
executables: true,
- has_rpath: true,
+ has_rpath: false,
linker_is_gnu: true,
.. Default::default()
}
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
index 0870780..4cabd47 100644
--- a/src/librustc_back/target/mod.rs
+++ b/src/librustc_back/target/mod.rs
@@ -166,8 +166,8 @@ supported_targets! {
("x86_64-unknown-netbsd", x86_64_unknown_netbsd),
("x86_64-rumprun-netbsd", x86_64_rumprun_netbsd),
- ("i686_unknown_haiku", i686_unknown_haiku),
- ("x86_64_unknown_haiku", x86_64_unknown_haiku),
+ ("i686-unknown-haiku", i686_unknown_haiku),
+ ("x86_64-unknown-haiku", x86_64_unknown_haiku),
("x86_64-apple-darwin", x86_64_apple_darwin),
("i686-apple-darwin", i686_apple_darwin),
diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs
index 510c9ce..c1546e0 100644
--- a/src/librustc_data_structures/flock.rs
+++ b/src/librustc_data_structures/flock.rs
@@ -109,6 +109,7 @@ mod imp {
pub l_sysid: libc::c_int,
}
+ pub const F_RDLCK: libc::c_short = 0x0040;
pub const F_UNLCK: libc::c_short = 0x0200;
pub const F_WRLCK: libc::c_short = 0x0400;
pub const F_SETLK: libc::c_int = 0x0080;
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index b6dc755..88e5af9 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -98,7 +98,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
let s = env::args().collect::<Vec<_>>();
main_args(&s)
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs
index 18280e4..609e43e 100644
--- a/src/libstd/sys/common/net.rs
+++ b/src/libstd/sys/common/net.rs
@@ -29,7 +29,7 @@ use sys::net::netc::IPV6_JOIN_GROUP as IPV6_ADD_MEMBERSHIP;
#[cfg(not(any(target_os = "dragonfly", target_os = "freebsd",
target_os = "ios", target_os = "macos",
target_os = "openbsd", target_os = "netbsd",
- target_os = "solaris", taget_os = "haiku")))]
+ target_os = "solaris", target_os = "haiku")))]
use sys::net::netc::IPV6_ADD_MEMBERSHIP;
#[cfg(any(target_os = "dragonfly", target_os = "freebsd",
target_os = "ios", target_os = "macos",
--
2.7.0

View File

@@ -1,116 +0,0 @@
From 9918d5c2612a5474cbcb16ee8d4ef11438565b39 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:25:06 +0000
Subject: [PATCH 1/4] Haiku: remove -Werror from compiler-rt build commands
---
mk/cfg/i686-unknown-haiku.mk | 2 +-
mk/cfg/x86_64-unknown-haiku.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mk/cfg/i686-unknown-haiku.mk b/mk/cfg/i686-unknown-haiku.mk
index cbacbff..d1bcc7a 100644
--- a/mk/cfg/i686-unknown-haiku.mk
+++ b/mk/cfg/i686-unknown-haiku.mk
@@ -9,7 +9,7 @@ CFG_STATIC_LIB_NAME_i686-unknown-haiku=lib$(1).a
CFG_LIB_GLOB_i686-unknown-haiku=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_i686-unknown-haiku=lib$(1)-*.dylib.dSYM
CFG_CFLAGS_i686-unknown-haiku := -m32 $(CFLAGS)
-CFG_GCCISH_CFLAGS_i686-unknown-haiku := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
+CFG_GCCISH_CFLAGS_i686-unknown-haiku := -Wall -g -fPIC -m32 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_i686-unknown-haiku := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_i686-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m32
CFG_GCCISH_PRE_LIB_FLAGS_i686-unknown-haiku := -Wl,-whole-archive
diff --git a/mk/cfg/x86_64-unknown-haiku.mk b/mk/cfg/x86_64-unknown-haiku.mk
index 4c2d888..476327a 100644
--- a/mk/cfg/x86_64-unknown-haiku.mk
+++ b/mk/cfg/x86_64-unknown-haiku.mk
@@ -9,7 +9,7 @@ CFG_STATIC_LIB_NAME_x86_64-unknown-haiku=lib$(1).a
CFG_LIB_GLOB_x86_64-unknown-haiku=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_x86_64-unknown-haiku=lib$(1)-*.dylib.dSYM
CFG_CFLAGS_x86_64-unknown-haiku := -m64 $(CFLAGS)
-CFG_GCCISH_CFLAGS_x86_64-unknown-haiku := -Wall -Werror -g -fPIC -m64 $(CFLAGS)
+CFG_GCCISH_CFLAGS_x86_64-unknown-haiku := -Wall -g -fPIC -m64 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_x86_64-unknown-haiku := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m64
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-haiku := -Wl,-whole-archive
--
2.7.0
From 19a7a308a5713dc4b71a058665f72ad4fc45fc53 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:26:48 +0000
Subject: [PATCH 2/4] Haiku: disable rpath as standard option on the compiler
---
src/librustc_back/target/haiku_base.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustc_back/target/haiku_base.rs b/src/librustc_back/target/haiku_base.rs
index 5e319ba..7f79330 100644
--- a/src/librustc_back/target/haiku_base.rs
+++ b/src/librustc_back/target/haiku_base.rs
@@ -16,7 +16,7 @@ pub fn opts() -> TargetOptions {
linker: "cc".to_string(),
dynamic_linking: true,
executables: true,
- has_rpath: true,
+ has_rpath: false,
linker_is_gnu: true,
.. Default::default()
}
--
2.7.0
From 6ddec4cdb6ea6eebfca9f2fcf1c2c90b31811d5b Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:27:38 +0000
Subject: [PATCH 3/4] Haiku: add missing F_RDLCK constant
---
src/librustc_data_structures/flock.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs
index 510c9ce..c1546e0 100644
--- a/src/librustc_data_structures/flock.rs
+++ b/src/librustc_data_structures/flock.rs
@@ -109,6 +109,7 @@ mod imp {
pub l_sysid: libc::c_int,
}
+ pub const F_RDLCK: libc::c_short = 0x0040;
pub const F_UNLCK: libc::c_short = 0x0200;
pub const F_WRLCK: libc::c_short = 0x0400;
pub const F_SETLK: libc::c_int = 0x0080;
--
2.7.0
From e2986a4d189cc122ab29c93d2e7a6b0e71f1cf90 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 17:36:59 +0000
Subject: [PATCH 4/4] Haiku: reduce stack memory to 16MB (max on Haiku)
---
src/librustdoc/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index ee395e0..75ae3be 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -98,7 +98,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
let s = env::args().collect::<Vec<_>>();
main_args(&s)
--
2.7.0

View File

@@ -1,116 +0,0 @@
From cdf6b56465759702bc9ecbe2a488c47e719a1db6 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:25:06 +0000
Subject: [PATCH 1/4] Haiku: remove -Werror from compiler-rt build commands
---
mk/cfg/i686-unknown-haiku.mk | 2 +-
mk/cfg/x86_64-unknown-haiku.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mk/cfg/i686-unknown-haiku.mk b/mk/cfg/i686-unknown-haiku.mk
index cbacbff..d1bcc7a 100644
--- a/mk/cfg/i686-unknown-haiku.mk
+++ b/mk/cfg/i686-unknown-haiku.mk
@@ -9,7 +9,7 @@ CFG_STATIC_LIB_NAME_i686-unknown-haiku=lib$(1).a
CFG_LIB_GLOB_i686-unknown-haiku=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_i686-unknown-haiku=lib$(1)-*.dylib.dSYM
CFG_CFLAGS_i686-unknown-haiku := -m32 $(CFLAGS)
-CFG_GCCISH_CFLAGS_i686-unknown-haiku := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
+CFG_GCCISH_CFLAGS_i686-unknown-haiku := -Wall -g -fPIC -m32 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_i686-unknown-haiku := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_i686-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m32
CFG_GCCISH_PRE_LIB_FLAGS_i686-unknown-haiku := -Wl,-whole-archive
diff --git a/mk/cfg/x86_64-unknown-haiku.mk b/mk/cfg/x86_64-unknown-haiku.mk
index 4c2d888..476327a 100644
--- a/mk/cfg/x86_64-unknown-haiku.mk
+++ b/mk/cfg/x86_64-unknown-haiku.mk
@@ -9,7 +9,7 @@ CFG_STATIC_LIB_NAME_x86_64-unknown-haiku=lib$(1).a
CFG_LIB_GLOB_x86_64-unknown-haiku=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_x86_64-unknown-haiku=lib$(1)-*.dylib.dSYM
CFG_CFLAGS_x86_64-unknown-haiku := -m64 $(CFLAGS)
-CFG_GCCISH_CFLAGS_x86_64-unknown-haiku := -Wall -Werror -g -fPIC -m64 $(CFLAGS)
+CFG_GCCISH_CFLAGS_x86_64-unknown-haiku := -Wall -g -fPIC -m64 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_x86_64-unknown-haiku := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m64
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-haiku := -Wl,-whole-archive
--
2.7.0
From 31d4c16ca09f2d8731cb3a2781e7a5308e622b81 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:26:48 +0000
Subject: [PATCH 2/4] Haiku: disable rpath as standard option on the compiler
---
src/librustc_back/target/haiku_base.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustc_back/target/haiku_base.rs b/src/librustc_back/target/haiku_base.rs
index 5e319ba..7f79330 100644
--- a/src/librustc_back/target/haiku_base.rs
+++ b/src/librustc_back/target/haiku_base.rs
@@ -16,7 +16,7 @@ pub fn opts() -> TargetOptions {
linker: "cc".to_string(),
dynamic_linking: true,
executables: true,
- has_rpath: true,
+ has_rpath: false,
linker_is_gnu: true,
.. Default::default()
}
--
2.7.0
From 0868d4b686eb87205fc0a1c546e7ec39aa9201df Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:27:38 +0000
Subject: [PATCH 3/4] Haiku: add missing F_RDLCK constant
---
src/librustc_data_structures/flock.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs
index 33d71ba..2211854 100644
--- a/src/librustc_data_structures/flock.rs
+++ b/src/librustc_data_structures/flock.rs
@@ -113,6 +113,7 @@ mod imp {
pub l_sysid: libc::c_int,
}
+ pub const F_RDLCK: libc::c_short = 0x0040;
pub const F_UNLCK: libc::c_short = 0x0200;
pub const F_WRLCK: libc::c_short = 0x0400;
pub const F_SETLK: libc::c_int = 0x0080;
--
2.7.0
From 0931756a613172ab78adee33975636e4d6beb41d Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 17:36:59 +0000
Subject: [PATCH 4/4] Haiku: reduce stack memory to 16MB (max on Haiku)
---
src/librustdoc/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 174118d..4517992 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -99,7 +99,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
let s = env::args().collect::<Vec<_>>();
main_args(&s)
--
2.7.0

View File

@@ -1,116 +0,0 @@
From 7262f52ac892f442bfaf5af959ec053724529071 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:25:06 +0000
Subject: [PATCH 1/4] Haiku: remove -Werror from compiler-rt build commands
---
mk/cfg/i686-unknown-haiku.mk | 2 +-
mk/cfg/x86_64-unknown-haiku.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mk/cfg/i686-unknown-haiku.mk b/mk/cfg/i686-unknown-haiku.mk
index cbacbff..d1bcc7a 100644
--- a/mk/cfg/i686-unknown-haiku.mk
+++ b/mk/cfg/i686-unknown-haiku.mk
@@ -9,7 +9,7 @@ CFG_STATIC_LIB_NAME_i686-unknown-haiku=lib$(1).a
CFG_LIB_GLOB_i686-unknown-haiku=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_i686-unknown-haiku=lib$(1)-*.dylib.dSYM
CFG_CFLAGS_i686-unknown-haiku := -m32 $(CFLAGS)
-CFG_GCCISH_CFLAGS_i686-unknown-haiku := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
+CFG_GCCISH_CFLAGS_i686-unknown-haiku := -Wall -g -fPIC -m32 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_i686-unknown-haiku := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_i686-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m32
CFG_GCCISH_PRE_LIB_FLAGS_i686-unknown-haiku := -Wl,-whole-archive
diff --git a/mk/cfg/x86_64-unknown-haiku.mk b/mk/cfg/x86_64-unknown-haiku.mk
index 4c2d888..476327a 100644
--- a/mk/cfg/x86_64-unknown-haiku.mk
+++ b/mk/cfg/x86_64-unknown-haiku.mk
@@ -9,7 +9,7 @@ CFG_STATIC_LIB_NAME_x86_64-unknown-haiku=lib$(1).a
CFG_LIB_GLOB_x86_64-unknown-haiku=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_x86_64-unknown-haiku=lib$(1)-*.dylib.dSYM
CFG_CFLAGS_x86_64-unknown-haiku := -m64 $(CFLAGS)
-CFG_GCCISH_CFLAGS_x86_64-unknown-haiku := -Wall -Werror -g -fPIC -m64 $(CFLAGS)
+CFG_GCCISH_CFLAGS_x86_64-unknown-haiku := -Wall -g -fPIC -m64 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_x86_64-unknown-haiku := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m64
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-haiku := -Wl,-whole-archive
--
2.7.0
From 1856aaed09c3618697d338c506bb659beb971662 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:26:48 +0000
Subject: [PATCH 2/4] Haiku: disable rpath as standard option on the compiler
---
src/librustc_back/target/haiku_base.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustc_back/target/haiku_base.rs b/src/librustc_back/target/haiku_base.rs
index bfdc9fa..3fd0389 100644
--- a/src/librustc_back/target/haiku_base.rs
+++ b/src/librustc_back/target/haiku_base.rs
@@ -16,7 +16,7 @@ pub fn opts() -> TargetOptions {
linker: "cc".to_string(),
dynamic_linking: true,
executables: true,
- has_rpath: true,
+ has_rpath: false,
target_family: Some("unix".to_string()),
linker_is_gnu: true,
.. Default::default()
--
2.7.0
From e7702e1341d602923a5a4fe898750d36b7cbb287 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:27:38 +0000
Subject: [PATCH 3/4] Haiku: add missing F_RDLCK constant
---
src/librustc_data_structures/flock.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs
index 33d71ba..2211854 100644
--- a/src/librustc_data_structures/flock.rs
+++ b/src/librustc_data_structures/flock.rs
@@ -113,6 +113,7 @@ mod imp {
pub l_sysid: libc::c_int,
}
+ pub const F_RDLCK: libc::c_short = 0x0040;
pub const F_UNLCK: libc::c_short = 0x0200;
pub const F_WRLCK: libc::c_short = 0x0400;
pub const F_SETLK: libc::c_int = 0x0080;
--
2.7.0
From 147fba7e207e3d66853fba32e3ba916905e18e5c Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 17:36:59 +0000
Subject: [PATCH 4/4] Haiku: reduce stack memory to 16MB (max on Haiku)
---
src/librustdoc/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 503ef4c..d7df8af 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -98,7 +98,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
let s = env::args().collect::<Vec<_>>();
main_args(&s)
--
2.7.0

View File

@@ -1,228 +0,0 @@
From 29a293b243ccc2af78b471af767176713a3c8468 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:26:48 +0000
Subject: [PATCH 1/6] Haiku: disable rpath as standard option on the compiler
---
src/librustc_back/target/haiku_base.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustc_back/target/haiku_base.rs b/src/librustc_back/target/haiku_base.rs
index bfdc9fa..3fd0389 100644
--- a/src/librustc_back/target/haiku_base.rs
+++ b/src/librustc_back/target/haiku_base.rs
@@ -16,7 +16,7 @@ pub fn opts() -> TargetOptions {
linker: "cc".to_string(),
dynamic_linking: true,
executables: true,
- has_rpath: true,
+ has_rpath: false,
target_family: Some("unix".to_string()),
linker_is_gnu: true,
.. Default::default()
--
2.7.0
From 3f4cea9e6f171322f04e28b0057cda30c916c46d Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:27:38 +0000
Subject: [PATCH 2/6] Haiku: add missing F_RDLCK constant
---
src/librustc_data_structures/flock.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs
index 26417e3..32f0fd4 100644
--- a/src/librustc_data_structures/flock.rs
+++ b/src/librustc_data_structures/flock.rs
@@ -113,6 +113,7 @@ mod imp {
pub l_sysid: libc::c_int,
}
+ pub const F_RDLCK: libc::c_short = 0x0040;
pub const F_UNLCK: libc::c_short = 0x0200;
pub const F_WRLCK: libc::c_short = 0x0400;
pub const F_SETLK: libc::c_int = 0x0080;
--
2.7.0
From 1270fb2a678dbe246d6ed0135687b09aa3fe0ae3 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 17:36:59 +0000
Subject: [PATCH 3/6] Haiku: reduce stack memory to 16MB (max on Haiku)
---
src/librustdoc/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 84f69cd..8c31464 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -98,7 +98,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
let s = env::args().collect::<Vec<_>>();
main_args(&s)
--
2.7.0
From 9181d72c5d6199534714df0f4dc76d6961af7e16 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 9 Oct 2017 21:31:02 +0000
Subject: [PATCH 4/6] Haiku: link libunwind to libgcc_s
---
src/libunwind/build.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
index ed3d521..d2d895a 100644
--- a/src/libunwind/build.rs
+++ b/src/libunwind/build.rs
@@ -38,5 +38,7 @@ fn main() {
println!("cargo:rustc-link-lib=gcc_eh");
} else if target.contains("fuchsia") {
println!("cargo:rustc-link-lib=unwind");
+ } else if target.contains("haiku") {
+ println!("cargo:rustc-link-lib=gcc_s");
}
}
--
2.7.0
From c237d65e40d80bdd4f1a55e7dc2571bb2cc724bd Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Tue, 10 Oct 2017 06:32:35 +0000
Subject: [PATCH 5/6] Haiku: depend on a num_cpus package with Haiku support
---
src/Cargo.lock | 6 +++---
src/bootstrap/Cargo.toml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Cargo.lock b/src/Cargo.lock
index b34007d..50a22f1 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -68,7 +68,7 @@ dependencies = [
"gcc 0.3.43 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -301,7 +301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
-version = "0.2.13"
+version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -980,7 +980,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum mdbook 0.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "06a68e8738e42b38a02755d3ce5fa12d559e17acb238e4326cbc3cc056e65280"
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
-"checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3"
+"checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584"
"checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842"
"checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8"
"checksum pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1058d7bb927ca067656537eec4e02c2b4b70eaaa129664c5b90c111e20326f41"
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml
index 1eda160..6bcb4e6 100644
--- a/src/bootstrap/Cargo.toml
+++ b/src/bootstrap/Cargo.toml
@@ -27,7 +27,7 @@ test = false
build_helper = { path = "../build_helper" }
cmake = "0.1.17"
filetime = "0.1"
-num_cpus = "0.2"
+num_cpus = "1.4"
toml = "0.1"
getopts = "0.2"
rustc-serialize = "0.3"
--
2.7.0
From 7aeb3052d02f83dd85eb75f21306e2aa8c765077 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Mon, 24 Apr 2017 14:21:36 +0000
Subject: [PATCH 6/6] Haiku: add missing cases of using LIBRARY_PATH
---
src/bootstrap/bootstrap.py | 3 +++
src/bootstrap/util.rs | 2 ++
src/librustc_back/dynamic_lib.rs | 2 ++
src/tools/compiletest/src/procsrv.rs | 2 ++
4 files changed, 9 insertions(+)
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index b326f95..1e9e2d4 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -364,6 +364,9 @@ class RustBuild(object):
env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
(os.pathsep + env["DYLD_LIBRARY_PATH"]) \
if "DYLD_LIBRARY_PATH" in env else ""
+ env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+ (os.pathsep + env["LIBRARY_PATH"]) \
+ if "LIBRARY_PATH" in env else ""
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
os.pathsep + env["PATH"]
if not os.path.isfile(self.cargo()):
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
index dab20f4..e01c06b 100644
--- a/src/bootstrap/util.rs
+++ b/src/bootstrap/util.rs
@@ -139,6 +139,8 @@ pub fn dylib_path_var() -> &'static str {
"PATH"
} else if cfg!(target_os = "macos") {
"DYLD_LIBRARY_PATH"
+ } else if cfg!(target_os = "haiku") {
+ "LIBRARY_PATH"
} else {
"LD_LIBRARY_PATH"
}
diff --git a/src/librustc_back/dynamic_lib.rs b/src/librustc_back/dynamic_lib.rs
index 38e6006..e6f305c 100644
--- a/src/librustc_back/dynamic_lib.rs
+++ b/src/librustc_back/dynamic_lib.rs
@@ -68,6 +68,8 @@ impl DynamicLibrary {
"PATH"
} else if cfg!(target_os = "macos") {
"DYLD_LIBRARY_PATH"
+ } else if cfg!(target_os = "haiku") {
+ "LIBRARY_PATH"
} else {
"LD_LIBRARY_PATH"
}
diff --git a/src/tools/compiletest/src/procsrv.rs b/src/tools/compiletest/src/procsrv.rs
index 7e4f40a..20933ad 100644
--- a/src/tools/compiletest/src/procsrv.rs
+++ b/src/tools/compiletest/src/procsrv.rs
@@ -20,6 +20,8 @@ pub fn dylib_env_var() -> &'static str {
"PATH"
} else if cfg!(target_os = "macos") {
"DYLD_LIBRARY_PATH"
+ } else if cfg!(target_os = "haiku") {
+ "LIBRARY_PATH"
} else {
"LD_LIBRARY_PATH"
}
--
2.7.0

View File

@@ -1,228 +0,0 @@
From f8a252b85663a5bedb19b8a3a284124f46d392ef Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:26:48 +0000
Subject: [PATCH 1/6] Haiku: disable rpath as standard option on the compiler
---
src/librustc_back/target/haiku_base.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustc_back/target/haiku_base.rs b/src/librustc_back/target/haiku_base.rs
index bfdc9fa..3fd0389 100644
--- a/src/librustc_back/target/haiku_base.rs
+++ b/src/librustc_back/target/haiku_base.rs
@@ -16,7 +16,7 @@ pub fn opts() -> TargetOptions {
linker: "cc".to_string(),
dynamic_linking: true,
executables: true,
- has_rpath: true,
+ has_rpath: false,
target_family: Some("unix".to_string()),
linker_is_gnu: true,
.. Default::default()
--
2.7.0
From c31264103ad45685d400ad213b924d87ac016d85 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 07:27:38 +0000
Subject: [PATCH 2/6] Haiku: add missing F_RDLCK constant
---
src/librustc_data_structures/flock.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs
index 26417e3..32f0fd4 100644
--- a/src/librustc_data_structures/flock.rs
+++ b/src/librustc_data_structures/flock.rs
@@ -113,6 +113,7 @@ mod imp {
pub l_sysid: libc::c_int,
}
+ pub const F_RDLCK: libc::c_short = 0x0040;
pub const F_UNLCK: libc::c_short = 0x0200;
pub const F_WRLCK: libc::c_short = 0x0400;
pub const F_SETLK: libc::c_int = 0x0080;
--
2.7.0
From cf245f081dc220efb6645f3c06e07745a1eadd91 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 17:36:59 +0000
Subject: [PATCH 3/6] Haiku: reduce stack memory to 16MB (max on Haiku)
---
src/librustdoc/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 2a6134f..5c126fc 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -102,7 +102,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
env_logger::init().unwrap();
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
let s = env::args().collect::<Vec<_>>();
--
2.7.0
From d4df22eed703c3b8413a0dee4a71807a23c66f20 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 9 Oct 2017 21:31:02 +0000
Subject: [PATCH 4/6] Haiku: link libunwind to libgcc_s
---
src/libunwind/build.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
index 9b8099d..15557ad 100644
--- a/src/libunwind/build.rs
+++ b/src/libunwind/build.rs
@@ -39,5 +39,7 @@ fn main() {
println!("cargo:rustc-link-lib=static-nobundle=pthread");
} else if target.contains("fuchsia") {
println!("cargo:rustc-link-lib=unwind");
+ } else if target.contains("haiku") {
+ println!("cargo:rustc-link-lib=gcc_s");
}
}
--
2.7.0
From 816c3c70b1c7bd051bfb09ad20043f5da696e02e Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Tue, 10 Oct 2017 06:32:35 +0000
Subject: [PATCH 5/6] Haiku: depend on a num_cpus package with Haiku support
---
src/Cargo.lock | 6 +++---
src/bootstrap/Cargo.toml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Cargo.lock b/src/Cargo.lock
index f4c3571..0b785a3 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -78,7 +78,7 @@ dependencies = [
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -299,7 +299,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
-version = "0.2.13"
+version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1004,7 +1004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum mdbook 0.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "2598843aeda0c5bb2e8e4d714564f1c3fc40f7844157e34563bf96ae3866b56e"
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
-"checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3"
+"checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584"
"checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842"
"checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8"
"checksum pulldown-cmark 0.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9ab1e588ef8efd702c7ed9d2bd774db5e6f4d878bb5a1a9f371828fbdff6973"
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml
index 1eda160..6bcb4e6 100644
--- a/src/bootstrap/Cargo.toml
+++ b/src/bootstrap/Cargo.toml
@@ -27,7 +27,7 @@ test = false
build_helper = { path = "../build_helper" }
cmake = "0.1.17"
filetime = "0.1"
-num_cpus = "0.2"
+num_cpus = "1.4"
toml = "0.1"
getopts = "0.2"
rustc-serialize = "0.3"
--
2.7.0
From e9d851a1e77448b9f06d0e868b20ea744bd4eff3 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Mon, 24 Apr 2017 14:21:36 +0000
Subject: [PATCH 6/6] Haiku: add missing cases of using LIBRARY_PATH
---
src/bootstrap/bootstrap.py | 3 +++
src/bootstrap/util.rs | 2 ++
src/librustc_back/dynamic_lib.rs | 2 ++
src/tools/compiletest/src/procsrv.rs | 2 ++
4 files changed, 9 insertions(+)
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 6cd9496..5d05db0 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -367,6 +367,9 @@ class RustBuild(object):
env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
(os.pathsep + env["DYLD_LIBRARY_PATH"]) \
if "DYLD_LIBRARY_PATH" in env else ""
+ env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+ (os.pathsep + env["LIBRARY_PATH"]) \
+ if "LIBRARY_PATH" in env else ""
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
os.pathsep + env["PATH"]
if not os.path.isfile(self.cargo()):
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
index dab20f4..e01c06b 100644
--- a/src/bootstrap/util.rs
+++ b/src/bootstrap/util.rs
@@ -139,6 +139,8 @@ pub fn dylib_path_var() -> &'static str {
"PATH"
} else if cfg!(target_os = "macos") {
"DYLD_LIBRARY_PATH"
+ } else if cfg!(target_os = "haiku") {
+ "LIBRARY_PATH"
} else {
"LD_LIBRARY_PATH"
}
diff --git a/src/librustc_back/dynamic_lib.rs b/src/librustc_back/dynamic_lib.rs
index 38e6006..e6f305c 100644
--- a/src/librustc_back/dynamic_lib.rs
+++ b/src/librustc_back/dynamic_lib.rs
@@ -68,6 +68,8 @@ impl DynamicLibrary {
"PATH"
} else if cfg!(target_os = "macos") {
"DYLD_LIBRARY_PATH"
+ } else if cfg!(target_os = "haiku") {
+ "LIBRARY_PATH"
} else {
"LD_LIBRARY_PATH"
}
diff --git a/src/tools/compiletest/src/procsrv.rs b/src/tools/compiletest/src/procsrv.rs
index 3d8f229..dbda8f4 100644
--- a/src/tools/compiletest/src/procsrv.rs
+++ b/src/tools/compiletest/src/procsrv.rs
@@ -20,6 +20,8 @@ pub fn dylib_env_var() -> &'static str {
"PATH"
} else if cfg!(target_os = "macos") {
"DYLD_LIBRARY_PATH"
+ } else if cfg!(target_os = "haiku") {
+ "LIBRARY_PATH"
} else {
"LD_LIBRARY_PATH"
}
--
2.7.0

View File

@@ -1,646 +0,0 @@
From e83d9584c435d07743ac67f2ca0fba5e1d43104f Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 17:36:59 +0000
Subject: [PATCH 1/5] Haiku: reduce stack memory to 16MB (max on Haiku)
---
src/librustdoc/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 380ee9c06a..d03c11d8f6 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -104,7 +104,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
env_logger::init().unwrap();
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
get_args().map(|args| main_args(&args)).unwrap_or(1)
--
2.16.2
From 61fde85d115a502a1e04b286bbc84c9f8794666b Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Tue, 8 May 2018 12:33:03 +0000
Subject: [PATCH 2/5] Haiku: update libc dependency to 0.2.31
---
src/Cargo.lock | 64 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/src/Cargo.lock b/src/Cargo.lock
index dcda218ff4..36dd6c445c 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -74,7 +74,7 @@ dependencies = [
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -85,7 +85,7 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -117,7 +117,7 @@ dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -165,7 +165,7 @@ dependencies = [
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -199,7 +199,7 @@ dependencies = [
"git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -227,7 +227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-segmentation 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -300,7 +300,7 @@ version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -312,7 +312,7 @@ version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -375,7 +375,7 @@ name = "filetime"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -391,7 +391,7 @@ name = "flate2"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -410,7 +410,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -443,7 +443,7 @@ version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -528,7 +528,7 @@ name = "jobserver"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -555,7 +555,7 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.22"
+version = "0.2.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -566,7 +566,7 @@ dependencies = [
"cmake 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -579,7 +579,7 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -591,7 +591,7 @@ version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -611,7 +611,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -641,7 +641,7 @@ name = "memchr"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -649,7 +649,7 @@ name = "memchr"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -658,7 +658,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -679,7 +679,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -755,7 +755,7 @@ name = "num_cpus"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -771,7 +771,7 @@ dependencies = [
"bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -787,7 +787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -892,7 +892,7 @@ name = "rand"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1531,7 +1531,7 @@ version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1562,7 +1562,7 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1580,7 +1580,7 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1589,7 +1589,7 @@ version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1745,7 +1745,7 @@ name = "xattr"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1802,7 +1802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "443ae8bc0af6c106e6e8b77e04684faecc1a5ce94e058f4c2b0a037b0ea1b133"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
-"checksum libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "babb8281da88cba992fa1f4ddec7d63ed96280a1a53ec9b919fd37b53d71e502"
+"checksum libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d1419b2939a0bc44b77feb34661583c7546b532b192feab36249ab584b86856c"
"checksum libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df18a822100352d9863b302faf6f8f25c0e77f0e60feb40e5dbe1238b7f13b1d"
"checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75"
"checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c"
--
2.16.2
From 3d47278dc981d381cd2661662900464e33f7bdff Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 9 May 2018 17:31:41 +0000
Subject: [PATCH 3/5] Haiku: there is no setpriority on this platform.
---
src/bootstrap/lib.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 00cbc589ae..7b9e996f48 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -112,7 +112,7 @@ pub mod util;
#[cfg(windows)]
mod job;
-#[cfg(unix)]
+#[cfg(all(unix, not(target_os = "haiku")))]
mod job {
use libc;
@@ -123,7 +123,7 @@ mod job {
}
}
-#[cfg(not(any(unix, windows)))]
+#[cfg(any(target_os = "haiku", not(any(unix, windows))))]
mod job {
pub unsafe fn setup(_build: &mut ::Build) {
}
--
2.16.2
From 8f1cbeb66d97bd2590ef22455bd8d78e754f1a2a Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Fri, 25 Aug 2017 17:12:20 -0500
Subject: [PATCH 4/5] haiku/librustc_back: Remove incorrect no_integrated_as
* Makes rust bootstrap incorrectly search for xxx.s vs xxx.0.s
* Not needed or incorrect fix for another issue.
---
src/librustc_back/target/haiku_base.rs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/librustc_back/target/haiku_base.rs b/src/librustc_back/target/haiku_base.rs
index 8e7f463563..3fd0389104 100644
--- a/src/librustc_back/target/haiku_base.rs
+++ b/src/librustc_back/target/haiku_base.rs
@@ -19,7 +19,6 @@ pub fn opts() -> TargetOptions {
has_rpath: false,
target_family: Some("unix".to_string()),
linker_is_gnu: true,
- no_integrated_as: true,
.. Default::default()
}
}
--
2.16.2
From d13a1a067c5c3cad7d16cbc79162ded7cfdf2a27 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Fri, 11 May 2018 20:27:24 +0000
Subject: [PATCH 5/5] Haiku: add dependency on patched version of backtrace
---
src/Cargo.lock | 68 +++++++++++++++++++++++++++++++++++++---------------------
src/Cargo.toml | 4 ++++
2 files changed, 48 insertions(+), 24 deletions(-)
diff --git a/src/Cargo.lock b/src/Cargo.lock
index 36dd6c445c..47497bb5e1 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -67,10 +67,10 @@ version = "0.0.0"
[[package]]
name = "backtrace"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+version = "0.3.2"
+source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2#e5abec2fdb6023facae1819558dd55a80419a881"
dependencies = [
- "backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace-sys 0.1.10 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)",
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -79,10 +79,16 @@ dependencies = [
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "backtrace"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+replace = "backtrace 0.3.2 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)"
+
[[package]]
name = "backtrace-sys"
version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2#e5abec2fdb6023facae1819558dd55a80419a881"
dependencies = [
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -158,15 +164,15 @@ dependencies = [
"error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -196,7 +202,7 @@ dependencies = [
"cargo 0.20.0",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -215,6 +221,11 @@ dependencies = [
name = "cargotest2"
version = "0.1.0"
+[[package]]
+name = "cc"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "cfg-if"
version = "0.1.0"
@@ -299,7 +310,7 @@ name = "curl"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -308,7 +319,7 @@ dependencies = [
[[package]]
name = "curl-sys"
-version = "0.3.11"
+version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -316,6 +327,7 @@ dependencies = [
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -363,7 +375,7 @@ name = "error-chain"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -406,7 +418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "fs2"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -439,12 +451,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "git2"
-version = "0.6.6"
+version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.12 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -456,7 +468,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -560,12 +572,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libgit2-sys"
-version = "0.6.12"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)",
+ "curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1701,6 +1713,11 @@ name = "utf8-ranges"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+[[package]]
+name = "vcpkg"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "vec_map"
version = "0.6.0"
@@ -1766,19 +1783,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66"
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"
-"checksum backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80"
-"checksum backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d192fd129132fbc97497c1f2ec2c2c5174e376b95f535199ef4fe0a293d33842"
+"checksum backtrace 0.3.2 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" = "<none>"
+"checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76"
+"checksum backtrace-sys 0.1.10 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" = "<none>"
"checksum bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32"
+"checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba"
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
"checksum clap 2.19.3 (registry+https://github.com/rust-lang/crates.io-index)" = "95b78f3fe0fc94c13c731714363260e04b557a637166f33a4570d3189d642374"
"checksum cmake 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)" = "92278eb79412c8f75cfc89e707a1bb3a6490b68f7f2e78d15c774f30fe701122"
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
"checksum curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c90e1240ef340dd4027ade439e5c7c2064dd9dc652682117bd50d1486a3add7b"
-"checksum curl-sys 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "23e7e544dc5e1ba42c4a4a678bd47985e84b9c3f4d3404c29700622a029db9c3"
+"checksum curl-sys 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "f00c8ba847fb0730c293069b4d1203dc01bf3c2e1f90b4e55f426ed8f4a1eeac"
"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
"checksum diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0a515461b6c8c08419850ced27bc29e86166dcdcde8fbe76f8b1f0589bb49472"
"checksum docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab32ea6e284d87987066f21a9e809a73c14720571ef34516f0890b3d355ccfd8"
@@ -1788,11 +1807,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
"checksum flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c"
"checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d"
-"checksum fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34edaee07555859dc13ca387e6ae05686bb4d0364c95d649b6dab959511f4baf"
+"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum gcc 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)" = "5f837c392f2ea61cb1576eac188653df828c861b7137d74ea4a5caa89621f9e6"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
-"checksum git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa01936ac96555c083c0e8553f672616274408d9d3fc5b8696603fbf63ff43ee"
+"checksum git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "40a111aecd59985496012976beca164b4f6c930d507a099831e06b07f19d54f1"
"checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf088f042a467089e9baa4972f57f9247e42a0cc549ba264c7a04fbb8ecb89d4"
@@ -1803,7 +1822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
"checksum libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d1419b2939a0bc44b77feb34661583c7546b532b192feab36249ab584b86856c"
-"checksum libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df18a822100352d9863b302faf6f8f25c0e77f0e60feb40e5dbe1238b7f13b1d"
+"checksum libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "82fc20bd8beefe7c9f98aae2d3cff78e57f544cdd83d58fe181ec37a5fbe0c77"
"checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75"
"checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c"
"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad"
@@ -1882,6 +1901,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
+"checksum vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed0f6789c8a85ca41bbc1c9d175422116a9869bd1cf31bb08e1493ecce60380"
"checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
diff --git a/src/Cargo.toml b/src/Cargo.toml
index 015d658d22..883e8d7278 100644
--- a/src/Cargo.toml
+++ b/src/Cargo.toml
@@ -33,3 +33,7 @@ debug-assertions = false
[profile.test]
debug = false
debug-assertions = false
+
+[replace]
+"backtrace:0.3.2" = { git = "https://github.com/nielx/backtrace-rs", branch = "haiku-0.3.2" }
+
--
2.16.2

View File

@@ -1,20 +0,0 @@
From 1a8c2d6b712cd60d195cccf229b59707ccdd0989 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 13 Nov 2015 20:34:38 +0000
Subject: Haiku: add a snapshot for x86_64.
diff --git a/src/snapshots.txt b/src/snapshots.txt
index c1c040e..0f57164 100644
--- a/src/snapshots.txt
+++ b/src/snapshots.txt
@@ -1,3 +1,6 @@
+S 2015-11-13 c386da0
+ haiku-x86_64 d09b23db0ef31209a1ebc42e54177449db0985ef
+
S 2015-08-13 8c5c388
haiku-i386 716818c2428eeb1ba418b7d6db1b7956bd38cdf8
--
2.2.2

View File

@@ -1,529 +0,0 @@
From 271dd253327d535048ce75580e9082e28e20ccac Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 17:36:59 +0000
Subject: [PATCH 1/4] Haiku: reduce stack memory to 16MB (max on Haiku)
---
src/librustdoc/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 6c092d01a0..2ff3e96fb6 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -100,7 +100,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
env_logger::init().unwrap();
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
get_args().map(|args| main_args(&args)).unwrap_or(1)
--
2.16.2
From bb87ff71f29b95dcaba8419fe585fc1934407658 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 9 May 2018 17:31:41 +0000
Subject: [PATCH 2/4] Haiku: there is no setpriority on this platform.
---
src/bootstrap/lib.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 032231582e..c9450e503c 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -112,7 +112,7 @@ pub mod util;
#[cfg(windows)]
mod job;
-#[cfg(unix)]
+#[cfg(all(unix, not(target_os = "haiku")))]
mod job {
use libc;
@@ -123,7 +123,7 @@ mod job {
}
}
-#[cfg(not(any(unix, windows)))]
+#[cfg(any(target_os = "haiku", not(any(unix, windows))))]
mod job {
pub unsafe fn setup(_build: &mut ::Build) {
}
--
2.16.2
From a112651ec39a992e7e801f6b3488158f195766f6 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Fri, 25 Aug 2017 17:12:20 -0500
Subject: [PATCH 3/4] haiku/librustc_back: Remove incorrect no_integrated_as
* Makes rust bootstrap incorrectly search for xxx.s vs xxx.0.s
* Not needed or incorrect fix for another issue.
---
src/librustc_back/target/haiku_base.rs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/librustc_back/target/haiku_base.rs b/src/librustc_back/target/haiku_base.rs
index 8e7f463563..3fd0389104 100644
--- a/src/librustc_back/target/haiku_base.rs
+++ b/src/librustc_back/target/haiku_base.rs
@@ -19,7 +19,6 @@ pub fn opts() -> TargetOptions {
has_rpath: false,
target_family: Some("unix".to_string()),
linker_is_gnu: true,
- no_integrated_as: true,
.. Default::default()
}
}
--
2.16.2
From ba1a536cce7fec231f8df12302ed8ca0153486c9 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Tue, 8 May 2018 12:33:03 +0000
Subject: [PATCH 4/4] Haiku: update various Cargo dependencies to versions that
build on Haiku * (external) liblibc, from 0.2.26 to 0.2.31 * backtrace, to
a customized backtrace that contains fixes for Haiku * libgit2-sys to
version 0.6.18 (includes a fix for a bug that causes cargo to exit on a
crash) * git2 to version 0.6.10 * socket2 to version 0.2.3
---
src/Cargo.lock | 115 ++++++++++++++++++++++++++++++++-------------------------
src/Cargo.toml | 4 ++
2 files changed, 68 insertions(+), 51 deletions(-)
diff --git a/src/Cargo.lock b/src/Cargo.lock
index bcec823403..cd76389b99 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -75,31 +75,37 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "backtrace"
version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2#e5abec2fdb6023facae1819558dd55a80419a881"
dependencies = [
- "backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace-sys 0.1.10 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "backtrace-sys"
-version = "0.1.11"
+name = "backtrace"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
+replace = "backtrace 0.3.2 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)"
+
+[[package]]
+name = "backtrace-sys"
+version = "0.1.10"
+source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2#e5abec2fdb6023facae1819558dd55a80419a881"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -121,7 +127,7 @@ dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -164,15 +170,15 @@ dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -201,11 +207,11 @@ dependencies = [
"cargo 0.21.0",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -219,6 +225,11 @@ dependencies = [
name = "cargotest2"
version = "0.1.0"
+[[package]]
+name = "cc"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "cfg-if"
version = "0.1.2"
@@ -273,7 +284,7 @@ dependencies = [
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -308,10 +319,10 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "socket2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "socket2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -321,7 +332,7 @@ version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -394,7 +405,7 @@ name = "filetime"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -402,7 +413,7 @@ name = "flate2"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -421,7 +432,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -437,12 +448,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "git2"
-version = "0.6.6"
+version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -454,7 +465,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -531,7 +542,7 @@ name = "jobserver"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -558,18 +569,18 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.26"
+version = "0.2.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libgit2-sys"
-version = "0.6.12"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -582,7 +593,7 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -594,7 +605,7 @@ version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -615,7 +626,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -645,7 +656,7 @@ name = "memchr"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -653,7 +664,7 @@ name = "memchr"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -662,7 +673,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -683,7 +694,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -759,7 +770,7 @@ name = "num_cpus"
version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -775,7 +786,7 @@ dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -790,7 +801,7 @@ version = "0.9.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -891,7 +902,7 @@ name = "rand"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1434,12 +1445,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "socket2"
-version = "0.2.1"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1542,7 +1553,7 @@ version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1564,7 +1575,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1599,7 +1610,7 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1760,7 +1771,7 @@ name = "xattr"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1782,11 +1793,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"
"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"
+"checksum backtrace 0.3.2 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" = "<none>"
"checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76"
-"checksum backtrace-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3a0d842ea781ce92be2bf78a9b38883948542749640b8378b3b2f03d1fd9f1ff"
+"checksum backtrace-sys 0.1.10 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" = "<none>"
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32"
+"checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba"
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
"checksum clap 2.25.0 (registry+https://github.com/rust-lang/crates.io-index)" = "867a885995b4184be051b70a592d4d70e32d7a188db6e8dff626af286a962771"
"checksum cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f"
@@ -1806,7 +1819,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a"
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
-"checksum git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa01936ac96555c083c0e8553f672616274408d9d3fc5b8696603fbf63ff43ee"
+"checksum git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "40a111aecd59985496012976beca164b4f6c930d507a099831e06b07f19d54f1"
"checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf088f042a467089e9baa4972f57f9247e42a0cc549ba264c7a04fbb8ecb89d4"
@@ -1817,8 +1830,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "443ae8bc0af6c106e6e8b77e04684faecc1a5ce94e058f4c2b0a037b0ea1b133"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
-"checksum libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "30885bcb161cf67054244d10d4a7f4835ffd58773bc72e07d35fecf472295503"
-"checksum libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df18a822100352d9863b302faf6f8f25c0e77f0e60feb40e5dbe1238b7f13b1d"
+"checksum libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d1419b2939a0bc44b77feb34661583c7546b532b192feab36249ab584b86856c"
+"checksum libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "82fc20bd8beefe7c9f98aae2d3cff78e57f544cdd83d58fe181ec37a5fbe0c77"
"checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75"
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
@@ -1869,7 +1882,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum serde_ignored 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c10e798e4405d7dcec3658989e35ee6706f730a9ed7c1184d5ebd84317e82f46"
"checksum serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "48b04779552e92037212c3615370f6bd57a40ebba7f20e554ff9f55e41a69a7b"
"checksum shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5cc96481d54583947bfe88bf30c23d53f883c6cd0145368b69989d97b84ef8"
-"checksum socket2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "12cdbddbaa27bf94cc194b8e37f5811db6fe83cea96cf99cf1f8e92b65a41371"
+"checksum socket2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9e76b159741052c7deaa9fd0b5ca6b5f79cecf525ed665abfe5002086c6b2791"
"checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
diff --git a/src/Cargo.toml b/src/Cargo.toml
index dd775280f4..eee06b8599 100644
--- a/src/Cargo.toml
+++ b/src/Cargo.toml
@@ -34,3 +34,7 @@ debug-assertions = false
[profile.test]
debug = false
debug-assertions = false
+
+[replace]
+"backtrace:0.3.2" = { git = "https://github.com/nielx/backtrace-rs", branch = "haiku-0.3.2" }
+
--
2.16.2

View File

@@ -1,546 +0,0 @@
From 2567868d660e7e4524d2850c493e606c49faff15 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 17:36:59 +0000
Subject: [PATCH 1/3] Haiku: reduce stack memory to 16MB (max on Haiku)
---
src/librustdoc/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 61a8165d26..130b7ba15d 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -99,7 +99,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
env_logger::init().unwrap();
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
get_args().map(|args| main_args(&args)).unwrap_or(1)
--
2.16.4
From b119cb6a3e00bacc275f6ddf29075fdb0454597d Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 9 May 2018 17:31:41 +0000
Subject: [PATCH 2/3] Haiku: there is no setpriority on this platform.
---
src/bootstrap/lib.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 84a9e56b64..b12ec2bf60 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -168,7 +168,7 @@ mod tool;
#[cfg(windows)]
mod job;
-#[cfg(unix)]
+#[cfg(all(unix, not(target_os = "haiku")))]
mod job {
use libc;
@@ -179,7 +179,7 @@ mod job {
}
}
-#[cfg(not(any(unix, windows)))]
+#[cfg(any(target_os = "haiku", not(any(unix, windows))))]
mod job {
pub unsafe fn setup(_build: &mut ::Build) {
}
--
2.16.4
From 61479b9ff89c1cc9a8feb8bf9adea2d1aa766754 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 20 May 2018 17:21:13 +0000
Subject: [PATCH 3/3] Haiku: update various Cargo dependencies to versions that
build on Haiku * (external) liblibc, from 0.2.29 to 0.2.31 * backtrace, to
a customized backtrace that contains fixes for Haiku * libgit2-sys to
version 0.6.18 (includes a fix for a bug that causes cargo to exit on a
crash) * git2 to version 0.6.10 * socket2 to version 0.2.3
---
src/Cargo.lock | 123 +++++++++++++++++++++++++++++++--------------------------
src/Cargo.toml | 3 ++
2 files changed, 71 insertions(+), 55 deletions(-)
diff --git a/src/Cargo.lock b/src/Cargo.lock
index 19f3042c70..8b84065cbb 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -80,31 +80,37 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "backtrace"
version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2#e5abec2fdb6023facae1819558dd55a80419a881"
dependencies = [
- "backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace-sys 0.1.10 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "backtrace-sys"
-version = "0.1.12"
+name = "backtrace"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
+replace = "backtrace 0.3.2 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)"
+
+[[package]]
+name = "backtrace-sys"
+version = "0.1.10"
+source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2#e5abec2fdb6023facae1819558dd55a80419a881"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -140,7 +146,7 @@ dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -191,7 +197,7 @@ dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -200,8 +206,8 @@ dependencies = [
"ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -230,7 +236,7 @@ dependencies = [
"cargo 0.22.0",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -243,6 +249,11 @@ dependencies = [
name = "cargotest2"
version = "0.1.0"
+[[package]]
+name = "cc"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
[[package]]
name = "cfg-if"
version = "0.1.2"
@@ -297,7 +308,7 @@ dependencies = [
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -319,7 +330,7 @@ version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"core-foundation-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -327,7 +338,7 @@ name = "core-foundation-sys"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -353,10 +364,10 @@ version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "socket2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "socket2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -366,7 +377,7 @@ version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -468,7 +479,7 @@ name = "filetime"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -488,7 +499,7 @@ name = "flate2"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -512,7 +523,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -533,12 +544,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "git2"
-version = "0.6.6"
+version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -550,7 +561,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -690,7 +701,7 @@ name = "jobserver"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -742,18 +753,18 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.29"
+version = "0.2.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libgit2-sys"
-version = "0.6.12"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -766,7 +777,7 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -778,7 +789,7 @@ version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -799,7 +810,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -829,7 +840,7 @@ name = "memchr"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -837,7 +848,7 @@ name = "memchr"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -846,7 +857,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -871,7 +882,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -947,7 +958,7 @@ name = "num_cpus"
version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -967,7 +978,7 @@ dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -982,7 +993,7 @@ version = "0.9.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1103,7 +1114,7 @@ name = "rand"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1652,7 +1663,7 @@ dependencies = [
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1752,12 +1763,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "socket2"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1875,7 +1886,7 @@ name = "syntex_errors"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_pos 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1897,7 +1908,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1912,7 +1923,7 @@ version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1943,7 +1954,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1978,7 +1989,7 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2167,7 +2178,7 @@ name = "xattr"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2190,12 +2201,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"
"checksum ar 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b24e4eef8e3fa7e2ca75b157e6039cdf8d9d3a68213ddc19d0fd9d576b9717c9"
"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"
+"checksum backtrace 0.3.2 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" = "<none>"
"checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76"
-"checksum backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "afccc5772ba333abccdf60d55200fa3406f8c59dcf54d5f7998c9107d3799c7c"
+"checksum backtrace-sys 0.1.10 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.2)" = "<none>"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32"
+"checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba"
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
"checksum clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2267a8fdd4dce6956ba6649e130f62fb279026e5e84b92aa939ac8f85ce3f9f0"
"checksum cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ebbb35d3dc9cd09497168f33de1acb79b265d350ab0ac34133b98f8509af1f"
@@ -2222,7 +2235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4b63a4792d4f8f686defe3b39b92127fea6344de5d38202b2ee5a11bbbf29d6a"
"checksum gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a"
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
-"checksum git2 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa01936ac96555c083c0e8553f672616274408d9d3fc5b8696603fbf63ff43ee"
+"checksum git2 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "40a111aecd59985496012976beca164b4f6c930d507a099831e06b07f19d54f1"
"checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum globset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "feeb1b6840809ef5efcf7a4a990bc4e1b7ee3df8cf9e2379a75aeb2ba42ac9c3"
@@ -2238,8 +2251,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum languageserver-types 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d52e477b23bf52cd3ca0f9fc6c5d14be954eec97e3b9cdfbd962d911bd533caf"
"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
-"checksum libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8a014d9226c2cc402676fbe9ea2e15dd5222cd1dd57f576b5b283178c944a264"
-"checksum libgit2-sys 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "df18a822100352d9863b302faf6f8f25c0e77f0e60feb40e5dbe1238b7f13b1d"
+"checksum libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d1419b2939a0bc44b77feb34661583c7546b532b192feab36249ab584b86856c"
+"checksum libgit2-sys 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "82fc20bd8beefe7c9f98aae2d3cff78e57f544cdd83d58fe181ec37a5fbe0c77"
"checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75"
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
@@ -2297,7 +2310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum serde_ignored 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c10e798e4405d7dcec3658989e35ee6706f730a9ed7c1184d5ebd84317e82f46"
"checksum serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "48b04779552e92037212c3615370f6bd57a40ebba7f20e554ff9f55e41a69a7b"
"checksum shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5cc96481d54583947bfe88bf30c23d53f883c6cd0145368b69989d97b84ef8"
-"checksum socket2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4daf80fcf54186fac4fe049e0b39d36a5cfde69a11a06413e61e77f553cccf9a"
+"checksum socket2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9e76b159741052c7deaa9fd0b5ca6b5f79cecf525ed665abfe5002086c6b2791"
"checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
"checksum strings 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da75d8bf2c4d210d63dd09581a041b036001f9f6e03d9b151dbff810fb7ba26a"
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
diff --git a/src/Cargo.toml b/src/Cargo.toml
index 8754d5b2b6..f0ced265de 100644
--- a/src/Cargo.toml
+++ b/src/Cargo.toml
@@ -39,6 +39,9 @@ members = [
"tools/rls/test_data/omit_init_build",
]
+[replace]
+"backtrace:0.3.2" = { git = "https://github.com/nielx/backtrace-rs", branch = "haiku-0.3.2" }
+
# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit
# MSVC when running the compile-fail test suite when a should-fail test panics.
# But hey if this is removed and it gets past the bots, sounds good to me.
--
2.16.4

View File

@@ -1,765 +0,0 @@
From a0db0ad4ef54e89d61d55bd350326e3b2baf9776 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 20 Sep 2017 17:36:59 +0000
Subject: [PATCH 1/9] Haiku: reduce stack memory to 16MB (max on Haiku)
---
src/librustdoc/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 059d416989..f628edbfab 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -102,7 +102,7 @@ struct Output {
}
pub fn main() {
- const STACK_SIZE: usize = 32_000_000; // 32MB
+ const STACK_SIZE: usize = 16_000_000; // 16MB on Haiku
rustc_driver::set_sigpipe_handler();
env_logger::init();
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
--
2.16.4
From 02cd183d8c0679fa2cb9cc7da9fd259dae11c203 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 9 May 2018 17:31:41 +0000
Subject: [PATCH 2/9] Haiku: there is no setpriority on this platform.
---
src/bootstrap/lib.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index e53fef0678..ad71386ce6 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -177,7 +177,7 @@ mod toolstate;
#[cfg(windows)]
mod job;
-#[cfg(unix)]
+#[cfg(all(unix, not(target_os = "haiku")))]
mod job {
use libc;
@@ -188,7 +188,7 @@ mod job {
}
}
-#[cfg(not(any(unix, windows)))]
+#[cfg(any(target_os = "haiku", not(any(unix, windows))))]
mod job {
pub unsafe fn setup(_build: &mut ::Build) {
}
--
2.16.4
From 9bb7ba3ff02e7d081f51e828daad071cb7ea9b2b Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Thu, 7 Jun 2018 21:13:17 +0200
Subject: [PATCH 3/9] Haiku: Revert "std: Handle OS errors when joining
threads"
This reverts commit dc7c7ba0c9f401f5597a245e05ee9e8d760715d3.
There is an issue with threading in cargo, where thread::join fails after completing a build. This prevents building Rust on Haiku (as the build system kills itself after failure).
The problem is documented at rust-on-haiku.com issue #10
---
src/libstd/sys/unix/thread.rs | 3 +--
src/libstd/sys/windows/c.rs | 1 -
src/libstd/sys/windows/thread.rs | 6 +-----
src/libstd/thread/mod.rs | 5 -----
4 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index 9e38880803..5f2bbf7dc1 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -175,8 +175,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0,
- "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 6d929f2136..8a6cba2968 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -269,7 +269,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
#[cfg(target_env = "msvc")]
#[cfg(feature = "backtrace")]
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index b6f63303dc..2826975f60 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -66,11 +66,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}",
- io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 1b976b79b4..63c487d0e4 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1303,11 +1303,6 @@ impl<T> JoinHandle<T> {
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
/// [`panic`]: ../../std/macro.panic.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
--
2.16.4
From 710ece3e310bc486a4f87b4fc6e7ed8b560c0252 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sat, 9 Jun 2018 14:08:45 +0000
Subject: [PATCH 4/9] Haiku: make it explicit that Haiku uses position
independent executables on x86_64
With the switch to gcc 7 the linker scripts don't always explicitly
add the `-pie` flag anymore. This creates build failures on x86_64.
Interestingly enough, adding this flag on i686 will lead to executables
that fail to run when ASLR is enabled, so let's keep it x86_64 only.
---
src/librustc_target/spec/x86_64_unknown_haiku.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/librustc_target/spec/x86_64_unknown_haiku.rs b/src/librustc_target/spec/x86_64_unknown_haiku.rs
index 1e78461861..c910fd8d40 100644
--- a/src/librustc_target/spec/x86_64_unknown_haiku.rs
+++ b/src/librustc_target/spec/x86_64_unknown_haiku.rs
@@ -16,6 +16,8 @@ pub fn target() -> TargetResult {
base.max_atomic_width = Some(64);
base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m64".to_string()]);
base.stack_probes = true;
+ // This option is required to build executables on Haiku x86_64
+ base.position_independent_executables = true;
Ok(Target {
llvm_target: "x86_64-unknown-haiku".to_string(),
--
2.16.4
From d743f18f4b29f28f937bc2a168b4b282306e5e4b Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Fri, 22 Jun 2018 19:10:04 +0000
Subject: [PATCH 5/9] Haiku: move to libc 0.2.41, which contains proper
definitions for RTLD_LAZY and RTLD_GLOBAL
---
src/Cargo.lock | 88 +++++++++++++++++++++++++++++-----------------------------
src/liblibc | 2 +-
2 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/src/Cargo.lock b/src/Cargo.lock
index ea2d146ff6..a1caa4439d 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -95,7 +95,7 @@ name = "atty"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -107,7 +107,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -118,7 +118,7 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -150,7 +150,7 @@ dependencies = [
"filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"petgraph 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -219,7 +219,7 @@ dependencies = [
"jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libgit2-sys 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -392,7 +392,7 @@ name = "commoncrypto-sys"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -412,7 +412,7 @@ dependencies = [
"filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -431,7 +431,7 @@ dependencies = [
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -458,7 +458,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -466,7 +466,7 @@ name = "core-foundation-sys"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -535,7 +535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl-sys 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.28 (registry+https://github.com/rust-lang/crates.io-index)",
"schannel 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -549,7 +549,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.28 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -708,7 +708,7 @@ version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -718,7 +718,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -740,7 +740,7 @@ name = "flate2"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -771,7 +771,7 @@ name = "fs2"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -814,7 +814,7 @@ version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libgit2-sys 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -986,7 +986,7 @@ name = "jobserver"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1056,7 +1056,7 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.40"
+version = "0.2.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -1067,7 +1067,7 @@ dependencies = [
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.28 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1080,7 +1080,7 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.28 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1092,7 +1092,7 @@ version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1132,7 +1132,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1199,7 +1199,7 @@ name = "memchr"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1213,7 +1213,7 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1278,7 +1278,7 @@ name = "num_cpus"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1294,7 +1294,7 @@ dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.28 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1309,7 +1309,7 @@ version = "0.9.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1361,7 +1361,7 @@ name = "parking_lot_core"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1553,7 +1553,7 @@ version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1563,7 +1563,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1583,7 +1583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2009,7 +2009,7 @@ dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"build_helper 0.1.0",
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_cratesio_shim 0.0.0",
]
@@ -2174,7 +2174,7 @@ dependencies = [
"env_logger 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
@@ -2282,7 +2282,7 @@ dependencies = [
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-ap-rustc_target 121.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2444,7 +2444,7 @@ version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2622,7 +2622,7 @@ name = "syntex_errors"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_pos 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2644,7 +2644,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2659,7 +2659,7 @@ version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"filetime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"xattr 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2678,7 +2678,7 @@ name = "tempfile"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2730,7 +2730,7 @@ name = "termion"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2774,7 +2774,7 @@ name = "time"
version = "0.1.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3001,7 +3001,7 @@ name = "xattr"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3106,7 +3106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef"
-"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b"
+"checksum libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)" = "ac8ebf8343a981e2fa97042b14768f02ed3e1d602eac06cae6166df3c8ced206"
"checksum libgit2-sys 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1ecbd6428006c321c29b6c8a895f0d90152f1cf4fd8faab69fc436a3d9594f63"
"checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75"
"checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16"
--
2.16.4
From d20be1ca798d39a01e82e9373dfa79c4da946e26 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Fri, 22 Jun 2018 19:18:59 +0000
Subject: [PATCH 7/9] Haiku: use a fixed version of backtrace for Haiku
---
src/Cargo.lock | 16 ++++++++--------
src/Cargo.toml | 1 +
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/Cargo.lock b/src/Cargo.lock
index a1caa4439d..bef3e0702a 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -103,9 +103,9 @@ dependencies = [
[[package]]
name = "backtrace"
version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.6#663beca1e8a476209b478fc28c776d2e633c001e"
dependencies = [
- "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace-sys 0.1.16 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.6)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -115,7 +115,7 @@ dependencies = [
[[package]]
name = "backtrace-sys"
version = "0.1.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.6#663beca1e8a476209b478fc28c776d2e633c001e"
dependencies = [
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -669,7 +669,7 @@ name = "error-chain"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "backtrace 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.6 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.6)",
]
[[package]]
@@ -684,7 +684,7 @@ name = "failure"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "backtrace 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.6 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.6)",
"failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1741,7 +1741,7 @@ name = "rustc"
version = "0.0.0"
dependencies = [
"arena 0.0.0",
- "backtrace 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.6 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.6)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3025,8 +3025,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef"
"checksum assert_cli 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "72342c21057a3cb5f7c2d849bf7999a83795434dd36d74fa8c24680581bd1930"
"checksum atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "af80143d6f7608d746df1520709e5d141c96f240b0e62b0aa41bdfb53374d9d4"
-"checksum backtrace 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbe525f66f42d207968308ee86bc2dd60aa5fab535b22e616323a173d097d8e"
-"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661"
+"checksum backtrace 0.3.6 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.6)" = "<none>"
+"checksum backtrace-sys 0.1.16 (git+https://github.com/nielx/backtrace-rs?branch=haiku-0.3.6)" = "<none>"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf"
diff --git a/src/Cargo.toml b/src/Cargo.toml
index 35858ee286..e3fdaf106d 100644
--- a/src/Cargo.toml
+++ b/src/Cargo.toml
@@ -65,3 +65,4 @@ cargo = { path = "tools/cargo" }
# for crates.io
rustfmt-nightly = { path = "tools/rustfmt" }
clippy_lints = { path = "tools/clippy/clippy_lints" }
+backtrace = { git = "https://github.com/nielx/backtrace-rs", branch = "haiku-0.3.6" }
--
2.16.4
From ccb8daca4d4dbdc0f575e42d4bb13ee5f6f99527 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Fri, 22 Jun 2018 20:11:40 +0000
Subject: [PATCH 8/9] Haiku: hotfix for socket2 for missing constants in libc
---
src/Cargo.lock | 8 ++++----
src/Cargo.toml | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/Cargo.lock b/src/Cargo.lock
index bef3e0702a..25713ea807 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -539,7 +539,7 @@ dependencies = [
"openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.28 (registry+https://github.com/rust-lang/crates.io-index)",
"schannel 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
- "socket2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "socket2 0.3.5 (git+https://github.com/nielx/socket2-rs?branch=haiku-0.3.5)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1221,7 +1221,7 @@ name = "miow"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "socket2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "socket2 0.3.5 (git+https://github.com/nielx/socket2-rs?branch=haiku-0.3.5)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2441,7 +2441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "socket2"
version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/nielx/socket2-rs?branch=haiku-0.3.5#78a6592b5732bfdfefc2fd6a04846083b1671636"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3201,7 +3201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
"checksum skeptic 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c8431f8fca168e2db4be547bd8329eac70d095dff1444fee4b0fa0fabc7df75a"
"checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9"
-"checksum socket2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ff606e0486e88f5fc6cfeb3966e434fb409abbc7a3ab495238f70a1ca97f789d"
+"checksum socket2 0.3.5 (git+https://github.com/nielx/socket2-rs?branch=haiku-0.3.5)" = "<none>"
"checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
"checksum string_cache 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39cb4173bcbd1319da31faa5468a7e3870683d7a237150b0b0aaafd546f6ad12"
"checksum string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "479cde50c3539481f33906a387f2bd17c8e87cb848c35b6021d41fb81ff9b4d7"
diff --git a/src/Cargo.toml b/src/Cargo.toml
index e3fdaf106d..a1e6b280db 100644
--- a/src/Cargo.toml
+++ b/src/Cargo.toml
@@ -66,3 +66,4 @@ cargo = { path = "tools/cargo" }
rustfmt-nightly = { path = "tools/rustfmt" }
clippy_lints = { path = "tools/clippy/clippy_lints" }
backtrace = { git = "https://github.com/nielx/backtrace-rs", branch = "haiku-0.3.6" }
+socket2 = { git = "https://github.com/nielx/socket2-rs", branch = "haiku-0.3.5" }
--
2.16.4
From edd2d028bb1d8624cff2739397027ac8d9eb2e42 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 2 Jul 2018 21:12:34 +0200
Subject: [PATCH 9/9] The stack size is also okay if the current limit matches
the maximum
NOTE: this is actually an incorrect patch, but it works on Haiku because
it gets the proper response. This patch will be improved in the mainline.
---
src/librustc_driver/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index a1052ca6c3..2edee1d011 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -1489,7 +1489,7 @@ pub fn in_rustc_thread<F, R>(f: F) -> Result<R, Box<Any + Send>>
let err = io::Error::last_os_error();
error!("in_rustc_thread: error calling getrlimit: {}", err);
true
- } else if rlim.rlim_max < STACK_SIZE as libc::rlim_t {
+ } else if rlim.rlim_max <= STACK_SIZE as libc::rlim_t {
true
} else {
std::rt::deinit_stack_guard();
--
2.16.4

File diff suppressed because it is too large Load Diff

View File

@@ -1,491 +0,0 @@
From 7bd3beff1d9d834a3be5c0ba6ee7dd0c25dd6338 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sat, 15 Sep 2018 21:03:27 +0200
Subject: Haiku-specific patches from https://github.com/nielx/rust
diff --git a/src/Cargo.lock b/src/Cargo.lock
index 64f6b71..1386e3b 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -90,7 +90,7 @@ name = "atty"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -102,7 +102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -113,7 +113,7 @@ version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -136,7 +136,7 @@ dependencies = [
"filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"petgraph 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -196,7 +196,7 @@ dependencies = [
"jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"libgit2-sys 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -243,7 +243,7 @@ dependencies = [
"jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazycell 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"libgit2-sys 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -425,7 +425,7 @@ name = "commoncrypto-sys"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -445,7 +445,7 @@ dependencies = [
"filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -464,7 +464,7 @@ dependencies = [
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -487,7 +487,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -496,7 +496,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"core-foundation-sys 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -504,7 +504,7 @@ name = "core-foundation-sys"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -626,7 +626,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"curl-sys 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)",
"schannel 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -640,7 +640,7 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -789,7 +789,7 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -803,7 +803,7 @@ name = "flate2"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -834,7 +834,7 @@ name = "fs2"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -891,7 +891,7 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"libgit2-sys 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1039,7 +1039,7 @@ name = "isatty"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1062,7 +1062,7 @@ name = "jobserver"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1133,7 +1133,7 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.42"
+version = "0.2.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -1144,7 +1144,7 @@ dependencies = [
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1157,7 +1157,7 @@ version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1170,7 +1170,7 @@ version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1210,7 +1210,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1277,7 +1277,7 @@ name = "memchr"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1285,7 +1285,7 @@ name = "memmap"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1308,7 +1308,7 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1376,7 +1376,7 @@ name = "num_cpus"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1393,7 +1393,7 @@ dependencies = [
"cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1416,7 +1416,7 @@ version = "0.9.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-src 110.0.5+1.1.0h (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1474,7 +1474,7 @@ name = "parking_lot_core"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1670,7 +1670,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1681,7 +1681,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1707,7 +1707,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2129,7 +2129,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2202,7 +2202,7 @@ dependencies = [
"env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
@@ -2342,7 +2342,7 @@ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"build_helper 0.1.0",
"cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_cratesio_shim 0.0.0",
]
@@ -2702,7 +2702,7 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2889,7 +2889,7 @@ version = "0.4.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2899,7 +2899,7 @@ name = "tempfile"
version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2950,7 +2950,7 @@ name = "termion"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2994,7 +2994,7 @@ name = "time"
version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -3194,7 +3194,7 @@ name = "xattr"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3307,7 +3307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fb497c35d362b6a331cfd94956a07fc2c78a4604cdbee844a81170386b996dd3"
"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef"
"checksum lazycell 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d33a48d0365c96081958cc663eef834975cb1e8d8bea3378513fc72bdbf11e50"
-"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1"
+"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
"checksum libgit2-sys 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c9051a4b288ba6f8728e9e52bb2510816946b8bcb2e20259e4d4cdc93b9ecafd"
"checksum libssh2-sys 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c628b499e8d1a4f4bd09a95d6cb1f8aeb231b46a9d40959bbd0408f14dd63adf"
"checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16"
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index e26306c..e794ced 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -175,8 +175,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0,
- "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 30aba2f..2507e00 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -269,7 +269,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
#[cfg(target_env = "msvc")]
#[cfg(feature = "backtrace")]
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index 44ec872..b3c21d5 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -66,11 +66,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}",
- io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index ae804ad..9e919a6 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1311,11 +1311,6 @@ impl<T> JoinHandle<T> {
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
/// [`panic`]: ../../std/macro.panic.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm/lib/Support/Unix/Path.inc b/src/llvm/lib/Support/Unix/Path.inc
index b8fea5b..908efd4 100644
--- a/src/llvm/lib/Support/Unix/Path.inc
+++ b/src/llvm/lib/Support/Unix/Path.inc
@@ -371,6 +371,9 @@ static bool is_local_impl(struct STATVFS &Vfs) {
#elif defined(__Fuchsia__)
// Fuchsia doesn't yet support remote filesystem mounts.
return true;
+#elif defined(__HAIKU__)
+ // Haiku doesn't expose this information
+ return false;
#elif defined(__sun)
// statvfs::f_basetype contains a null-terminated FSType name of the mounted target
StringRef fstype(Vfs.f_basetype);
--
2.19.0

View File

@@ -1,182 +0,0 @@
From 761416de96a80c7ee94d8d31dd307e3bdc657667 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Thu, 7 Jun 2018 21:13:17 +0200
Subject: Haiku: Revert "std: Handle OS errors when joining threads"
This reverts commit dc7c7ba0c9f401f5597a245e05ee9e8d760715d3.
There is an issue with threading in cargo, where thread::join fails after completing a build. This prevents building Rust on Haiku (as the build system kills itself after failure).
The problem is documented at rust-on-haiku.com issue #10
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index f3a45d2..c345bd6 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -176,8 +176,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0,
- "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index c84874a..1a75141 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -274,7 +274,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
#[cfg(target_env = "msvc")]
#[cfg(feature = "backtrace")]
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index 85588cc..1d3df78 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -67,11 +67,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}",
- io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 3a9f3ec..39d3987 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1409,11 +1409,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
--
2.19.0
From 077126354b05643a6b4bc148a2813b18bf08d4b8 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Fri, 18 Jan 2019 23:24:52 +0100
Subject: Haiku: hotfix for libssh2-sys to build on Haiku
diff --git a/Cargo.lock b/Cargo.lock
index 4831d03..00ae568 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1131,7 +1131,7 @@ dependencies = [
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
- "libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)",
"libz-sys 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.38 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1148,7 +1148,7 @@ dependencies = [
[[package]]
name = "libssh2-sys"
version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04#74d7f04dbee9997510bdad5608bb06970c6b4c8a"
dependencies = [
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3380,7 +3380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2857ec59fadc0773853c664d2d18e7198e83883e7060b63c924cb077bd5c74"
"checksum libgit2-sys 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4916b5addc78ec36cc309acfcdf0b9f9d97ab7b84083118b248709c5b7029356"
"checksum libnghttp2-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ffbfb81475cc9f625e44f3a8f8b9cf7173815ae1c7cc2fa91853ec009e38198"
-"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
+"checksum libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)" = "<none>"
"checksum libz-sys 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "4401fe74560a0d46fce3464625ac8aa7a79d291dd28cee021d18852d5191c280"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
diff --git a/Cargo.toml b/Cargo.toml
index b763caa..4eff14f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -60,6 +60,7 @@ cargo = { path = "src/tools/cargo" }
# that we're shipping as well (to ensure that the rustfmt in RLS and the
# `rustfmt` executable are the same exact version).
rustfmt-nightly = { path = "src/tools/rustfmt" }
+libssh2-sys = { git = "https://github.com/alexcrichton/ssh2-rs", rev = "74d7f04" }
# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
# here
--
2.19.0
From ec3dde3335e77fa5474f5438d1afe3885785125f Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 27 Jan 2019 09:25:25 +0100
Subject: Haiku: the maximum stack size is 16 MB, so keep it there on that
platform.
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 061c19e..3940750 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -1469,9 +1469,14 @@ fn parse_crate_attrs<'a>(sess: &'a Session, input: &Input) -> PResult<'a, Vec<as
}
// Temporarily have stack size set to 32MB to deal with various crates with long method
-// chains or deep syntax trees.
+// chains or deep syntax trees, except when on Haiku
// FIXME(oli-obk): get https://github.com/rust-lang/rust/pull/55617 the finish line
-const STACK_SIZE: usize = 32 * 1024 * 1024; // 32MB
+
+#[cfg(not(target_os = "haiku"))]
+const STACK_SIZE: usize = 32 * 1024 * 1024;
+
+#[cfg(target_os = "haiku")]
+const STACK_SIZE: usize = 16 * 1024 * 1024;
/// Runs `f` in a suitable thread for running `rustc`; returns a `Result` with either the return
/// value of `f` or -- if a panic occurs -- the panic value.
--
2.19.0
From 54db645f7a0e814eb1b885f486a19ee809ae1565 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sat, 16 Feb 2019 09:33:19 +0100
Subject: Fix llvm; add bsd source
diff --git a/src/llvm/lib/Support/Unix/Signals.inc b/src/llvm/lib/Support/Unix/Signals.inc
index ad88d5e..9d320b7 100644
--- a/src/llvm/lib/Support/Unix/Signals.inc
+++ b/src/llvm/lib/Support/Unix/Signals.inc
@@ -47,7 +47,9 @@
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
+#define _BSD_SOURCE
#include <sysexits.h>
+#undef _BSD_SOURCE
#ifdef HAVE_BACKTRACE
# include BACKTRACE_HEADER // For backtrace().
#endif
--
2.19.0

View File

@@ -1,173 +0,0 @@
From 8be1b79b06dae145da5300a17b59618e1db3b0d3 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 5 Jun 2019 20:01:20 +0200
Subject: Add Haiku-specific patches for Rust 1.33.0
diff --git a/Cargo.lock b/Cargo.lock
index 9f2bba2..c44be08 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1164,7 +1164,7 @@ dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
- "libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)",
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1182,7 +1182,7 @@ dependencies = [
[[package]]
name = "libssh2-sys"
version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04#74d7f04dbee9997510bdad5608bb06970c6b4c8a"
dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1813,7 +1813,7 @@ name = "rand_chacha"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1835,7 +1835,7 @@ name = "rand_hc"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1860,7 +1860,7 @@ name = "rand_xorshift"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3495,7 +3495,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)" = "023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd"
"checksum libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "48441cb35dc255da8ae72825689a95368bf510659ae1ad55dc4aa88cb1789bf1"
"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
-"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
+"checksum libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)" = "<none>"
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
diff --git a/Cargo.toml b/Cargo.toml
index cb3c0ee..1bb1bca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -59,6 +59,7 @@ cargo = { path = "src/tools/cargo" }
# that we're shipping as well (to ensure that the rustfmt in RLS and the
# `rustfmt` executable are the same exact version).
rustfmt-nightly = { path = "src/tools/rustfmt" }
+libssh2-sys = { git = "https://github.com/alexcrichton/ssh2-rs", rev = "74d7f04" }
# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
# here
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 889e1ec..f7166ef 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -1443,9 +1443,14 @@ fn parse_crate_attrs<'a>(sess: &'a Session, input: &Input) -> PResult<'a, Vec<as
}
// Temporarily have stack size set to 32MB to deal with various crates with long method
-// chains or deep syntax trees.
+// chains or deep syntax trees, except when on Haiku
// FIXME(oli-obk): get https://github.com/rust-lang/rust/pull/55617 the finish line
-const STACK_SIZE: usize = 32 * 1024 * 1024; // 32MB
+
+#[cfg(not(target_os = "haiku"))]
+const STACK_SIZE: usize = 32 * 1024 * 1024;
+
+#[cfg(target_os = "haiku")]
+const STACK_SIZE: usize = 16 * 1024 * 1024;
/// Runs `f` in a suitable thread for running `rustc`; returns a `Result` with either the return
/// value of `f` or -- if a panic occurs -- the panic value.
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index e29557f..c2d4692 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -167,8 +167,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0,
- "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 28fd4df..feb7954 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -264,7 +264,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
#[cfg(target_env = "msvc")]
#[cfg(feature = "backtrace")]
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index bd7cb67..695f2bf 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -58,11 +58,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}",
- io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index a55b32c..12f9617 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1432,11 +1432,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm/lib/Support/Unix/Signals.inc b/src/llvm/lib/Support/Unix/Signals.inc
index ad88d5e..9d320b7 100644
--- a/src/llvm/lib/Support/Unix/Signals.inc
+++ b/src/llvm/lib/Support/Unix/Signals.inc
@@ -47,7 +47,9 @@
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
+#define _BSD_SOURCE
#include <sysexits.h>
+#undef _BSD_SOURCE
#ifdef HAVE_BACKTRACE
# include BACKTRACE_HEADER // For backtrace().
#endif
--
2.19.0

View File

@@ -1,574 +0,0 @@
From b6eb8a50d7a02ef39ace5c8eb63d25b6a0044b23 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Thu, 6 Jun 2019 23:35:35 +0200
Subject: Haiku-specific patches for Rust 1.34.2
diff --git a/Cargo.lock b/Cargo.lock
index e8bab07..ca03fc3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1280,7 +1280,7 @@ dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
- "libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)",
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1298,7 +1298,7 @@ dependencies = [
[[package]]
name = "libssh2-sys"
version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04#74d7f04dbee9997510bdad5608bb06970c6b4c8a"
dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2103,7 +2103,7 @@ name = "rand_chacha"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2125,7 +2125,7 @@ name = "rand_hc"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2150,7 +2150,7 @@ name = "rand_xorshift"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4071,7 +4071,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)" = "023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd"
"checksum libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "48441cb35dc255da8ae72825689a95368bf510659ae1ad55dc4aa88cb1789bf1"
"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
-"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
+"checksum libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)" = "<none>"
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
diff --git a/Cargo.toml b/Cargo.toml
index cb3c0ee..1bb1bca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -59,6 +59,7 @@ cargo = { path = "src/tools/cargo" }
# that we're shipping as well (to ensure that the rustfmt in RLS and the
# `rustfmt` executable are the same exact version).
rustfmt-nightly = { path = "src/tools/rustfmt" }
+libssh2-sys = { git = "https://github.com/alexcrichton/ssh2-rs", rev = "74d7f04" }
# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
# here
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index a471af2..b0587ce 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -669,20 +669,19 @@ impl<'a> Builder<'a> {
.map(|entry| entry.path())
}
- pub fn rustdoc(&self, host: Interned<String>) -> PathBuf {
- self.ensure(tool::Rustdoc { host })
+ pub fn rustdoc(&self, compiler: Compiler) -> PathBuf {
+ self.ensure(tool::Rustdoc { compiler })
}
- pub fn rustdoc_cmd(&self, host: Interned<String>) -> Command {
+ pub fn rustdoc_cmd(&self, compiler: Compiler) -> Command {
let mut cmd = Command::new(&self.out.join("bootstrap/debug/rustdoc"));
- let compiler = self.compiler(self.top_stage, host);
cmd.env("RUSTC_STAGE", compiler.stage.to_string())
.env("RUSTC_SYSROOT", self.sysroot(compiler))
// Note that this is *not* the sysroot_libdir because rustdoc must be linked
// equivalently to rustc.
.env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler))
.env("CFG_RELEASE_CHANNEL", &self.config.channel)
- .env("RUSTDOC_REAL", self.rustdoc(host))
+ .env("RUSTDOC_REAL", self.rustdoc(compiler))
.env("RUSTDOC_CRATE_VERSION", self.rust_version())
.env("RUSTC_BOOTSTRAP", "1");
@@ -690,7 +689,7 @@ impl<'a> Builder<'a> {
cmd.env_remove("MAKEFLAGS");
cmd.env_remove("MFLAGS");
- if let Some(linker) = self.linker(host) {
+ if let Some(linker) = self.linker(compiler.host) {
cmd.env("RUSTC_TARGET_LINKER", linker);
}
cmd
@@ -752,7 +751,7 @@ impl<'a> Builder<'a> {
// This is the intended out directory for compiler documentation.
my_out = self.compiler_doc_out(target);
}
- let rustdoc = self.rustdoc(compiler.host);
+ let rustdoc = self.rustdoc(compiler);
self.clear_if_dirty(&my_out, &rustdoc);
} else if cmd != "test" {
match mode {
@@ -898,7 +897,7 @@ impl<'a> Builder<'a> {
.env(
"RUSTDOC_REAL",
if cmd == "doc" || cmd == "rustdoc" || (cmd == "test" && want_rustdoc) {
- self.rustdoc(compiler.host)
+ self.rustdoc(compiler)
} else {
PathBuf::from("/path/to/nowhere/rustdoc/not/required")
},
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 2dae3f9..3045cda 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -479,7 +479,7 @@ impl Step for Rustc {
t!(fs::create_dir_all(image.join("bin")));
builder.cp_r(&src.join("bin"), &image.join("bin"));
- builder.install(&builder.rustdoc(compiler.host), &image.join("bin"), 0o755);
+ builder.install(&builder.rustdoc(compiler), &image.join("bin"), 0o755);
// Copy runtime DLLs needed by the compiler
if libdir != "bin" {
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index f81c640..dceb8e6 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -335,7 +335,7 @@ fn invoke_rustdoc(
let footer = builder.src.join("src/doc/footer.inc");
let version_info = out.join("version_info.html");
- let mut cmd = builder.rustdoc_cmd(compiler.host);
+ let mut cmd = builder.rustdoc_cmd(compiler);
let out = out.join("book");
@@ -412,7 +412,7 @@ impl Step for Standalone {
}
let html = out.join(filename).with_extension("html");
- let rustdoc = builder.rustdoc(compiler.host);
+ let rustdoc = builder.rustdoc(compiler);
if up_to_date(&path, &html) &&
up_to_date(&footer, &html) &&
up_to_date(&favicon, &html) &&
@@ -422,7 +422,7 @@ impl Step for Standalone {
continue
}
- let mut cmd = builder.rustdoc_cmd(compiler.host);
+ let mut cmd = builder.rustdoc_cmd(compiler);
cmd.arg("--html-after-content").arg(&footer)
.arg("--html-before-content").arg(&version_info)
.arg("--html-in-header").arg(&favicon)
@@ -823,7 +823,7 @@ impl Step for Rustdoc {
builder.ensure(Rustc { stage, target });
// Build rustdoc.
- builder.ensure(tool::Rustdoc { host: compiler.host });
+ builder.ensure(tool::Rustdoc { compiler: compiler });
// Symlink compiler docs to the output directory of rustdoc documentation.
let out_dir = builder.stage_out(compiler, Mode::ToolRustc)
@@ -882,7 +882,11 @@ impl Step for ErrorIndex {
builder.info(&format!("Documenting error index ({})", target));
let out = builder.doc_out(target);
t!(fs::create_dir_all(&out));
- let mut index = builder.tool_cmd(Tool::ErrorIndex);
+ let compiler = builder.compiler(2, builder.config.build);
+ let mut index = tool::ErrorIndex::command(
+ builder,
+ compiler,
+ );
index.arg("html");
index.arg(out.join("error-index.html"));
index.arg(crate::channel::CFG_RELEASE_NUM);
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index b7323b2..57995eb 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -177,7 +177,7 @@ impl Step for Cargotest {
cmd.arg(&builder.initial_cargo)
.arg(&out_dir)
.env("RUSTC", builder.rustc(compiler))
- .env("RUSTDOC", builder.rustdoc(compiler.host)),
+ .env("RUSTDOC", builder.rustdoc(compiler)),
);
}
}
@@ -414,7 +414,6 @@ impl Step for Miri {
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct CompiletestTest {
- stage: u32,
host: Interned<String>,
}
@@ -427,16 +426,14 @@ impl Step for CompiletestTest {
fn make_run(run: RunConfig<'_>) {
run.builder.ensure(CompiletestTest {
- stage: run.builder.top_stage,
host: run.target,
});
}
/// Runs `cargo test` for compiletest.
fn run(self, builder: &Builder<'_>) {
- let stage = self.stage;
let host = self.host;
- let compiler = builder.compiler(stage, host);
+ let compiler = builder.compiler(0, host);
let mut cargo = tool::prepare_tool_cargo(builder,
compiler,
@@ -563,7 +560,7 @@ impl Step for RustdocTheme {
builder.sysroot_libdir(self.compiler, self.compiler.host),
)
.env("CFG_RELEASE_CHANNEL", &builder.config.channel)
- .env("RUSTDOC_REAL", builder.rustdoc(self.compiler.host))
+ .env("RUSTDOC_REAL", builder.rustdoc(self.compiler))
.env("RUSTDOC_CRATE_VERSION", builder.rust_version())
.env("RUSTC_BOOTSTRAP", "1");
if let Some(linker) = builder.linker(self.compiler.host) {
@@ -1042,7 +1039,7 @@ impl Step for Compiletest {
|| mode == "js-doc-test"
{
cmd.arg("--rustdoc-path")
- .arg(builder.rustdoc(compiler.host));
+ .arg(builder.rustdoc(compiler));
}
cmd.arg("--src-base")
@@ -1470,7 +1467,10 @@ impl Step for ErrorIndex {
t!(fs::create_dir_all(&dir));
let output = dir.join("error-index.md");
- let mut tool = builder.tool_cmd(Tool::ErrorIndex);
+ let mut tool = tool::ErrorIndex::command(
+ builder,
+ builder.compiler(compiler.stage, builder.config.build),
+ );
tool.arg("markdown")
.arg(&output)
.env("CFG_BUILD", &builder.config.build)
@@ -1495,7 +1495,7 @@ fn markdown_test(builder: &Builder<'_>, compiler: Compiler, markdown: &Path) ->
}
builder.info(&format!("doc tests for: {}", markdown.display()));
- let mut cmd = builder.rustdoc_cmd(compiler.host);
+ let mut cmd = builder.rustdoc_cmd(compiler);
builder.add_rust_test_threads(&mut cmd);
cmd.arg("--test");
cmd.arg(markdown);
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index fc1a17d..5fb83ca 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -250,9 +250,9 @@ pub fn prepare_tool_cargo(
cargo
}
-macro_rules! tool {
+macro_rules! bootstrap_tool {
($(
- $name:ident, $path:expr, $tool_name:expr, $mode:expr
+ $name:ident, $path:expr, $tool_name:expr
$(,llvm_tools = $llvm:expr)*
$(,is_external_tool = $external:expr)*
;
@@ -266,10 +266,7 @@ macro_rules! tool {
impl Tool {
pub fn get_mode(&self) -> Mode {
- let mode = match self {
- $(Tool::$name => $mode,)+
- };
- mode
+ Mode::ToolBootstrap
}
/// Whether this tool requires LLVM to run
@@ -282,27 +279,15 @@ macro_rules! tool {
impl<'a> Builder<'a> {
pub fn tool_exe(&self, tool: Tool) -> PathBuf {
- let stage = self.tool_default_stage(tool);
match tool {
$(Tool::$name =>
self.ensure($name {
- compiler: self.compiler(stage, self.config.build),
+ compiler: self.compiler(0, self.config.build),
target: self.config.build,
}),
)+
}
}
-
- pub fn tool_default_stage(&self, tool: Tool) -> u32 {
- // Compile the error-index in the same stage as rustdoc to avoid
- // recompiling rustdoc twice if we can. Otherwise compile
- // everything else in stage0 as there's no need to rebootstrap
- // everything.
- match tool {
- Tool::ErrorIndex if self.top_stage >= 2 => self.top_stage,
- _ => 0,
- }
- }
}
$(
@@ -321,7 +306,8 @@ macro_rules! tool {
fn make_run(run: RunConfig<'_>) {
run.builder.ensure($name {
- compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
+ // snapshot compiler
+ compiler: run.builder.compiler(0, run.builder.config.build),
target: run.target,
});
}
@@ -331,7 +317,7 @@ macro_rules! tool {
compiler: self.compiler,
target: self.target,
tool: $tool_name,
- mode: $mode,
+ mode: Mode::ToolBootstrap,
path: $path,
is_optional_tool: false,
source_type: if false $(|| $external)* {
@@ -347,21 +333,67 @@ macro_rules! tool {
}
}
-tool!(
- Rustbook, "src/tools/rustbook", "rustbook", Mode::ToolBootstrap;
- ErrorIndex, "src/tools/error_index_generator", "error_index_generator", Mode::ToolRustc;
- UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen", Mode::ToolBootstrap;
- Tidy, "src/tools/tidy", "tidy", Mode::ToolBootstrap;
- Linkchecker, "src/tools/linkchecker", "linkchecker", Mode::ToolBootstrap;
- CargoTest, "src/tools/cargotest", "cargotest", Mode::ToolBootstrap;
- Compiletest, "src/tools/compiletest", "compiletest", Mode::ToolBootstrap, llvm_tools = true;
- BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::ToolBootstrap;
- RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::ToolBootstrap;
- RustInstaller, "src/tools/rust-installer", "fabricate", Mode::ToolBootstrap,
- is_external_tool = true;
- RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes", Mode::ToolBootstrap;
+bootstrap_tool!(
+ Rustbook, "src/tools/rustbook", "rustbook";
+ UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen";
+ Tidy, "src/tools/tidy", "tidy";
+ Linkchecker, "src/tools/linkchecker", "linkchecker";
+ CargoTest, "src/tools/cargotest", "cargotest";
+ Compiletest, "src/tools/compiletest", "compiletest", llvm_tools = true;
+ BuildManifest, "src/tools/build-manifest", "build-manifest";
+ RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
+ RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true;
+ RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes";
);
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct ErrorIndex {
+ pub compiler: Compiler,
+}
+
+impl ErrorIndex {
+ pub fn command(builder: &Builder<'_>, compiler: Compiler) -> Command {
+ let mut cmd = Command::new(builder.ensure(ErrorIndex {
+ compiler
+ }));
+ add_lib_path(
+ vec![PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host))],
+ &mut cmd,
+ );
+ cmd
+ }
+}
+
+impl Step for ErrorIndex {
+ type Output = PathBuf;
+
+ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
+ run.path("src/tools/error_index_generator")
+ }
+
+ fn make_run(run: RunConfig<'_>) {
+ // Compile the error-index in the same stage as rustdoc to avoid
+ // recompiling rustdoc twice if we can.
+ let stage = if run.builder.top_stage >= 2 { run.builder.top_stage } else { 0 };
+ run.builder.ensure(ErrorIndex {
+ compiler: run.builder.compiler(stage, run.builder.config.build),
+ });
+ }
+
+ fn run(self, builder: &Builder<'_>) -> PathBuf {
+ builder.ensure(ToolBuild {
+ compiler: self.compiler,
+ target: self.compiler.host,
+ tool: "error_index_generator",
+ mode: Mode::ToolRustc,
+ path: "src/tools/error_index_generator",
+ is_optional_tool: false,
+ source_type: SourceType::InTree,
+ extra_features: Vec::new(),
+ }).expect("expected to build -- essential tool")
+ }
+}
+
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct RemoteTestServer {
pub compiler: Compiler,
@@ -398,7 +430,9 @@ impl Step for RemoteTestServer {
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Rustdoc {
- pub host: Interned<String>,
+ /// This should only ever be 0 or 2.
+ /// We sometimes want to reference the "bootstrap" rustdoc, which is why this option is here.
+ pub compiler: Compiler,
}
impl Step for Rustdoc {
@@ -412,12 +446,12 @@ impl Step for Rustdoc {
fn make_run(run: RunConfig<'_>) {
run.builder.ensure(Rustdoc {
- host: run.host,
+ compiler: run.builder.compiler(run.builder.top_stage, run.host),
});
}
fn run(self, builder: &Builder<'_>) -> PathBuf {
- let target_compiler = builder.compiler(builder.top_stage, self.host);
+ let target_compiler = self.compiler;
if target_compiler.stage == 0 {
if !target_compiler.is_snapshot(builder) {
panic!("rustdoc in stage 0 must be snapshot rustdoc");
@@ -625,7 +659,7 @@ impl<'a> Builder<'a> {
/// `host`.
pub fn tool_cmd(&self, tool: Tool) -> Command {
let mut cmd = Command::new(self.tool_exe(tool));
- let compiler = self.compiler(self.tool_default_stage(tool), self.config.build);
+ let compiler = self.compiler(0, self.config.build);
self.prepare_tool_cmd(compiler, tool, &mut cmd);
cmd
}
@@ -637,7 +671,7 @@ impl<'a> Builder<'a> {
fn prepare_tool_cmd(&self, compiler: Compiler, tool: Tool, cmd: &mut Command) {
let host = &compiler.host;
let mut lib_paths: Vec<PathBuf> = vec![
- if compiler.stage == 0 && tool != Tool::ErrorIndex {
+ if compiler.stage == 0 {
self.build.rustc_snapshot_libdir()
} else {
PathBuf::from(&self.sysroot_libdir(compiler, compiler.host))
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index e022d3a..c1419ef 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -1445,9 +1445,14 @@ fn parse_crate_attrs<'a>(sess: &'a Session, input: &Input) -> PResult<'a, Vec<as
}
// Temporarily have stack size set to 32MB to deal with various crates with long method
-// chains or deep syntax trees.
+// chains or deep syntax trees, except when on Haiku
// FIXME(oli-obk): get https://github.com/rust-lang/rust/pull/55617 the finish line
-const STACK_SIZE: usize = 32 * 1024 * 1024; // 32MB
+
+#[cfg(not(target_os = "haiku"))]
+const STACK_SIZE: usize = 32 * 1024 * 1024;
+
+#[cfg(target_os = "haiku")]
+const STACK_SIZE: usize = 16 * 1024 * 1024;
/// Runs `f` in a suitable thread for running `rustc`; returns a `Result` with either the return
/// value of `f` or -- if a panic occurs -- the panic value.
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index e29557f..c2d4692 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -167,8 +167,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0,
- "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index a78b599..04fe71d 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -267,7 +267,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
#[cfg(target_env = "msvc")]
#[cfg(feature = "backtrace")]
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index bd7cb67..695f2bf 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -58,11 +58,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}",
- io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 438ea3a..67b0bf9 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1432,11 +1432,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Signals.inc b/src/llvm-project/llvm/lib/Support/Unix/Signals.inc
index ad88d5e..9d320b7 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Signals.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Signals.inc
@@ -47,7 +47,9 @@
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
+#define _BSD_SOURCE
#include <sysexits.h>
+#undef _BSD_SOURCE
#ifdef HAVE_BACKTRACE
# include BACKTRACE_HEADER // For backtrace().
#endif
--
2.19.0

View File

@@ -1,620 +0,0 @@
From 6a84247335859c1579850ab822ecdc5f75c26924 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 9 Jun 2019 08:38:06 +0200
Subject: Haiku-specific patches for Rust 1.35.0
diff --git a/Cargo.lock b/Cargo.lock
index f789033..1a3dd04 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -375,7 +375,7 @@ dependencies = [
"cargo_metadata 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"clippy-mini-macro-test 0.2.0",
"clippy_lints 0.0.212",
- "compiletest_rs 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "compiletest_rs 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -483,7 +483,7 @@ dependencies = [
[[package]]
name = "compiletest_rs"
-version = "0.3.21"
+version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1279,7 +1279,7 @@ dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
- "libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)",
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1297,7 +1297,7 @@ dependencies = [
[[package]]
name = "libssh2-sys"
version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04#74d7f04dbee9997510bdad5608bb06970c6b4c8a"
dependencies = [
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1600,7 +1600,7 @@ dependencies = [
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"cargo_metadata 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "compiletest_rs 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "compiletest_rs 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"directories 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4006,7 +4006,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum commoncrypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d056a8586ba25a1e4d61cb090900e495952c7886786fc55f909ab2f819b69007"
"checksum commoncrypto-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fed34f46747aa73dfaa578069fd8279d2818ade2b55f38f22a9401c7f4083e2"
"checksum compiler_builtins 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d7de11892d9f9f1bc76d43011c8233d27d58300d629dc9dfb51b6626ef7f6077"
-"checksum compiletest_rs 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)" = "17a60483b7d4d1534db7b77458a03d5d8a93a707432a04978dfe87ea43bb61b1"
+"checksum compiletest_rs 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "f40ecc9332b68270998995c00f8051ee856121764a0d3230e64c9efd059d27b6"
"checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e"
"checksum core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4e2640d6d0bf22e82bed1b73c6aef8d5dd31e5abe6666c57e6d45e2649f4f887"
"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b"
@@ -4091,7 +4091,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917"
"checksum libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "48441cb35dc255da8ae72825689a95368bf510659ae1ad55dc4aa88cb1789bf1"
"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
-"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
+"checksum libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)" = "<none>"
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
diff --git a/Cargo.toml b/Cargo.toml
index cb3c0ee..1bb1bca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -59,6 +59,7 @@ cargo = { path = "src/tools/cargo" }
# that we're shipping as well (to ensure that the rustfmt in RLS and the
# `rustfmt` executable are the same exact version).
rustfmt-nightly = { path = "src/tools/rustfmt" }
+libssh2-sys = { git = "https://github.com/alexcrichton/ssh2-rs", rev = "74d7f04" }
# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
# here
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 5224663..0d94aab 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -575,6 +575,25 @@ impl<'a> Builder<'a> {
})
}
+ /// Similar to `compiler`, except handles the full-bootstrap option to
+ /// silently use the stage1 compiler instead of a stage2 compiler if one is
+ /// requested.
+ ///
+ /// Note that this does *not* have the side effect of creating
+ /// `compiler(stage, host)`, unlike `compiler` above which does have such
+ /// a side effect. The returned compiler here can only be used to compile
+ /// new artifacts, it can't be used to rely on the presence of a particular
+ /// sysroot.
+ ///
+ /// See `force_use_stage1` for documentation on what each argument is.
+ pub fn compiler_for(&self, stage: u32, host: Interned<String>, target: Interned<String>) -> Compiler {
+ if self.build.force_use_stage1(Compiler { stage, host }, target) {
+ self.compiler(1, self.config.build)
+ } else {
+ self.compiler(stage, host)
+ }
+ }
+
pub fn sysroot(&self, compiler: Compiler) -> Interned<PathBuf> {
self.ensure(compile::Sysroot { compiler })
}
@@ -748,11 +767,7 @@ impl<'a> Builder<'a> {
// This is for the original compiler, but if we're forced to use stage 1, then
// std/test/rustc stamps won't exist in stage 2, so we need to get those from stage 1, since
// we copy the libs forward.
- let cmp = if self.force_use_stage1(compiler, target) {
- self.compiler(1, compiler.host)
- } else {
- compiler
- };
+ let cmp = self.compiler_for(compiler.stage, compiler.host, target);
let libstd_stamp = match cmd {
"check" => check::libstd_stamp(self, cmp, target),
@@ -1351,7 +1366,7 @@ mod __test {
assert_eq!(
first(builder.cache.all::<dist::Std>()),
&[dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: a,
},]
);
@@ -1388,7 +1403,7 @@ mod __test {
first(builder.cache.all::<dist::Std>()),
&[
dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: a,
},
dist::Std {
@@ -1435,11 +1450,11 @@ mod __test {
first(builder.cache.all::<dist::Std>()),
&[
dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: a,
},
dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: b,
},
]
@@ -1447,6 +1462,39 @@ mod __test {
assert_eq!(first(builder.cache.all::<dist::Src>()), &[dist::Src]);
}
+ #[test]
+ fn dist_only_cross_host() {
+ let a = INTERNER.intern_str("A");
+ let b = INTERNER.intern_str("B");
+ let mut build = Build::new(configure(&["B"], &[]));
+ build.config.docs = false;
+ build.hosts = vec![b];
+ let mut builder = Builder::new(&build);
+ builder.run_step_descriptions(&Builder::get_step_descriptions(Kind::Dist), &[]);
+
+ assert_eq!(
+ first(builder.cache.all::<dist::Rustc>()),
+ &[
+ dist::Rustc {
+ compiler: Compiler { host: b, stage: 2 }
+ },
+ ]
+ );
+ assert_eq!(
+ first(builder.cache.all::<compile::Rustc>()),
+ &[
+ compile::Rustc {
+ compiler: Compiler { host: a, stage: 0 },
+ target: a,
+ },
+ compile::Rustc {
+ compiler: Compiler { host: a, stage: 1 },
+ target: b,
+ },
+ ]
+ );
+ }
+
#[test]
fn dist_with_targets_and_hosts() {
let build = Build::new(configure(&["B"], &["C"]));
@@ -1488,11 +1536,11 @@ mod __test {
first(builder.cache.all::<dist::Std>()),
&[
dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: a,
},
dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: b,
},
dist::Std {
@@ -1537,11 +1585,11 @@ mod __test {
first(builder.cache.all::<dist::Std>()),
&[
dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: a,
},
dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: b,
},
dist::Std {
@@ -1588,11 +1636,11 @@ mod __test {
first(builder.cache.all::<dist::Std>()),
&[
dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: a,
},
dist::Std {
- compiler: Compiler { host: a, stage: 2 },
+ compiler: Compiler { host: a, stage: 1 },
target: b,
},
]
@@ -1642,10 +1690,6 @@ mod __test {
compiler: Compiler { host: a, stage: 1 },
target: b,
},
- compile::Test {
- compiler: Compiler { host: a, stage: 2 },
- target: b,
- },
]
);
assert_eq!(
@@ -1698,10 +1742,6 @@ mod __test {
compiler: Compiler { host: b, stage: 2 },
target: a,
},
- compile::Rustc {
- compiler: Compiler { host: a, stage: 0 },
- target: b,
- },
compile::Rustc {
compiler: Compiler { host: a, stage: 1 },
target: b,
@@ -1736,10 +1776,6 @@ mod __test {
compiler: Compiler { host: b, stage: 2 },
target: a,
},
- compile::Test {
- compiler: Compiler { host: a, stage: 0 },
- target: b,
- },
compile::Test {
compiler: Compiler { host: a, stage: 1 },
target: b,
@@ -1786,9 +1822,6 @@ mod __test {
compile::Assemble {
target_compiler: Compiler { host: a, stage: 1 },
},
- compile::Assemble {
- target_compiler: Compiler { host: b, stage: 1 },
- },
compile::Assemble {
target_compiler: Compiler { host: a, stage: 2 },
},
@@ -1808,10 +1841,6 @@ mod __test {
compiler: Compiler { host: a, stage: 1 },
target: a,
},
- compile::Rustc {
- compiler: Compiler { host: a, stage: 0 },
- target: b,
- },
compile::Rustc {
compiler: Compiler { host: a, stage: 1 },
target: b,
@@ -1838,10 +1867,6 @@ mod __test {
compiler: Compiler { host: b, stage: 2 },
target: a,
},
- compile::Test {
- compiler: Compiler { host: a, stage: 0 },
- target: b,
- },
compile::Test {
compiler: Compiler { host: a, stage: 1 },
target: b,
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 66443d4..3fd9641 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -69,20 +69,20 @@ impl Step for Std {
builder.ensure(StartupObjects { compiler, target });
- if builder.force_use_stage1(compiler, target) {
- let from = builder.compiler(1, builder.config.build);
+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
+ if compiler_to_use != compiler {
builder.ensure(Std {
- compiler: from,
+ compiler: compiler_to_use,
target,
});
- builder.info(&format!("Uplifting stage1 std ({} -> {})", from.host, target));
+ builder.info(&format!("Uplifting stage1 std ({} -> {})", compiler_to_use.host, target));
// Even if we're not building std this stage, the new sysroot must
// still contain the third party objects needed by various targets.
copy_third_party_objects(builder, &compiler, target);
builder.ensure(StdLink {
- compiler: from,
+ compiler: compiler_to_use,
target_compiler: compiler,
target,
});
@@ -374,15 +374,16 @@ impl Step for Test {
return;
}
- if builder.force_use_stage1(compiler, target) {
+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
+ if compiler_to_use != compiler {
builder.ensure(Test {
- compiler: builder.compiler(1, builder.config.build),
+ compiler: compiler_to_use,
target,
});
builder.info(
&format!("Uplifting stage1 test ({} -> {})", builder.config.build, target));
builder.ensure(TestLink {
- compiler: builder.compiler(1, builder.config.build),
+ compiler: compiler_to_use,
target_compiler: compiler,
target,
});
@@ -499,15 +500,16 @@ impl Step for Rustc {
return;
}
- if builder.force_use_stage1(compiler, target) {
+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
+ if compiler_to_use != compiler {
builder.ensure(Rustc {
- compiler: builder.compiler(1, builder.config.build),
+ compiler: compiler_to_use,
target,
});
builder.info(&format!("Uplifting stage1 rustc ({} -> {})",
builder.config.build, target));
builder.ensure(RustcLink {
- compiler: builder.compiler(1, builder.config.build),
+ compiler: compiler_to_use,
target_compiler: compiler,
target,
});
@@ -663,9 +665,10 @@ impl Step for CodegenBackend {
return;
}
- if builder.force_use_stage1(compiler, target) {
+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
+ if compiler_to_use != compiler {
builder.ensure(CodegenBackend {
- compiler: builder.compiler(1, builder.config.build),
+ compiler: compiler_to_use,
target,
backend,
});
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 61a7705..27ac967 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -647,7 +647,11 @@ impl Step for Std {
fn make_run(run: RunConfig<'_>) {
run.builder.ensure(Std {
- compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
+ compiler: run.builder.compiler_for(
+ run.builder.top_stage,
+ run.builder.config.build,
+ run.target,
+ ),
target: run.target,
});
}
@@ -757,13 +761,10 @@ impl Step for Analysis {
builder.ensure(Std { compiler, target });
- // Package save-analysis from stage1 if not doing a full bootstrap, as the
- // stage2 artifacts is simply copied from stage1 in that case.
- let compiler = if builder.force_use_stage1(compiler, target) {
- builder.compiler(1, compiler.host)
- } else {
- compiler.clone()
- };
+ // Find the actual compiler (handling the full bootstrap option) which
+ // produced the save-analysis data because that data isn't copied
+ // through the sysroot uplifting.
+ let compiler = builder.compiler_for(compiler.stage, compiler.host, target);
let image = tmpdir(builder).join(format!("{}-{}-image", name, target));
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index d831d2f..401ce4e 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -475,12 +475,7 @@ impl Step for Std {
builder.info(&format!("Documenting stage{} std ({})", stage, target));
let out = builder.doc_out(target);
t!(fs::create_dir_all(&out));
- let compiler = builder.compiler(stage, builder.config.build);
- let compiler = if builder.force_use_stage1(compiler, target) {
- builder.compiler(1, compiler.host)
- } else {
- compiler
- };
+ let compiler = builder.compiler_for(stage, builder.config.build, target);
builder.ensure(compile::Std { compiler, target });
let out_dir = builder.stage_out(compiler, Mode::Std)
@@ -563,12 +558,7 @@ impl Step for Test {
builder.info(&format!("Documenting stage{} test ({})", stage, target));
let out = builder.doc_out(target);
t!(fs::create_dir_all(&out));
- let compiler = builder.compiler(stage, builder.config.build);
- let compiler = if builder.force_use_stage1(compiler, target) {
- builder.compiler(1, compiler.host)
- } else {
- compiler
- };
+ let compiler = builder.compiler_for(stage, builder.config.build, target);
// Build libstd docs so that we generate relative links
builder.ensure(Std { stage, target });
@@ -632,12 +622,7 @@ impl Step for WhitelistedRustc {
builder.info(&format!("Documenting stage{} whitelisted compiler ({})", stage, target));
let out = builder.doc_out(target);
t!(fs::create_dir_all(&out));
- let compiler = builder.compiler(stage, builder.config.build);
- let compiler = if builder.force_use_stage1(compiler, target) {
- builder.compiler(1, compiler.host)
- } else {
- compiler
- };
+ let compiler = builder.compiler_for(stage, builder.config.build, target);
// Build libstd docs so that we generate relative links
builder.ensure(Std { stage, target });
@@ -706,12 +691,7 @@ impl Step for Rustc {
t!(fs::create_dir_all(&out));
// Get the correct compiler for this stage.
- let compiler = builder.compiler(stage, builder.config.build);
- let compiler = if builder.force_use_stage1(compiler, target) {
- builder.compiler(1, compiler.host)
- } else {
- compiler
- };
+ let compiler = builder.compiler_for(stage, builder.config.build, target);
if !builder.config.compiler_docs {
builder.info("\tskipping - compiler/librustdoc docs disabled");
@@ -807,12 +787,7 @@ impl Step for Rustdoc {
t!(fs::create_dir_all(&out));
// Get the correct compiler for this stage.
- let compiler = builder.compiler(stage, builder.config.build);
- let compiler = if builder.force_use_stage1(compiler, target) {
- builder.compiler(1, compiler.host)
- } else {
- compiler
- };
+ let compiler = builder.compiler_for(stage, builder.config.build, target);
if !builder.config.compiler_docs {
builder.info("\tskipping - compiler/librustdoc docs disabled");
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 881bea5..39f912a 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1675,15 +1675,11 @@ impl Step for Crate {
builder.ensure(compile::Test { compiler, target });
builder.ensure(RemoteCopyLibs { compiler, target });
- // If we're not doing a full bootstrap but we're testing a stage2 version of
- // libstd, then what we're actually testing is the libstd produced in
- // stage1. Reflect that here by updating the compiler that we're working
- // with automatically.
- let compiler = if builder.force_use_stage1(compiler, target) {
- builder.compiler(1, compiler.host)
- } else {
- compiler.clone()
- };
+ // If we're not doing a full bootstrap but we're testing a stage2
+ // version of libstd, then what we're actually testing is the libstd
+ // produced in stage1. Reflect that here by updating the compiler that
+ // we're working with automatically.
+ let compiler = builder.compiler_for(compiler.stage, compiler.host, target);
let mut cargo = builder.cargo(compiler, mode, target, test_kind.subcommand());
match mode {
diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs
index 17523ae..15d52bf 100644
--- a/src/librustc_interface/util.rs
+++ b/src/librustc_interface/util.rs
@@ -120,9 +120,13 @@ pub fn create_session(
}
// Temporarily have stack size set to 32MB to deal with various crates with long method
-// chains or deep syntax trees.
+// chains or deep syntax trees, except when on Haiku
// FIXME(oli-obk): get https://github.com/rust-lang/rust/pull/55617 the finish line
-const STACK_SIZE: usize = 32 * 1024 * 1024; // 32MB
+#[cfg(not(target_os = "haiku"))]
+const STACK_SIZE: usize = 32 * 1024 * 1024;
+
+#[cfg(target_os = "haiku")]
+const STACK_SIZE: usize = 16 * 1024 * 1024;
fn get_stack_size() -> Option<usize> {
// FIXME: Hacks on hacks. If the env is trying to override the stack size
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index feb15e8..653130b 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -166,8 +166,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0,
- "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 518eccf..2aa5818 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -268,7 +268,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
#[cfg(target_env = "msvc")]
#[cfg(feature = "backtrace")]
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index 1b0a811..8c2bf15 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -59,11 +59,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}",
- io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index cb50797..5a0850e 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1436,11 +1436,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Signals.inc b/src/llvm-project/llvm/lib/Support/Unix/Signals.inc
index ad88d5e..9d320b7 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Signals.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Signals.inc
@@ -47,7 +47,9 @@
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
+#define _BSD_SOURCE
#include <sysexits.h>
+#undef _BSD_SOURCE
#ifdef HAVE_BACKTRACE
# include BACKTRACE_HEADER // For backtrace().
#endif
--
2.19.0

View File

@@ -1,145 +0,0 @@
From 550112375756baa31f32414774f78d13ea271115 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Fri, 19 Jul 2019 04:03:55 +0200
Subject: Rust: add recipe for 1.36.0
diff --git a/Cargo.lock b/Cargo.lock
index b687637..0a2ede6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1297,7 +1297,7 @@ dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
- "libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)",
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1315,7 +1315,7 @@ dependencies = [
[[package]]
name = "libssh2-sys"
version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04#74d7f04dbee9997510bdad5608bb06970c6b4c8a"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4164,7 +4164,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6"
"checksum libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "48441cb35dc255da8ae72825689a95368bf510659ae1ad55dc4aa88cb1789bf1"
"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
-"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
+"checksum libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)" = "<none>"
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
diff --git a/Cargo.toml b/Cargo.toml
index ccd7e8b..b23710f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -59,6 +59,7 @@ cargo = { path = "src/tools/cargo" }
# that we're shipping as well (to ensure that the rustfmt in RLS and the
# `rustfmt` executable are the same exact version).
rustfmt-nightly = { path = "src/tools/rustfmt" }
+libssh2-sys = { git = "https://github.com/alexcrichton/ssh2-rs", rev = "74d7f04" }
# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
# here
diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs
index d2d0d19..55190ab 100644
--- a/src/librustc_interface/util.rs
+++ b/src/librustc_interface/util.rs
@@ -120,9 +120,13 @@ pub fn create_session(
}
// Temporarily have stack size set to 32MB to deal with various crates with long method
-// chains or deep syntax trees.
+// chains or deep syntax trees, except when on Haiku
// FIXME(oli-obk): get https://github.com/rust-lang/rust/pull/55617 the finish line
-const STACK_SIZE: usize = 32 * 1024 * 1024; // 32MB
+#[cfg(not(target_os = "haiku"))]
+const STACK_SIZE: usize = 32 * 1024 * 1024;
+
+#[cfg(target_os = "haiku")]
+const STACK_SIZE: usize = 16 * 1024 * 1024;
fn get_stack_size() -> Option<usize> {
// FIXME: Hacks on hacks. If the env is trying to override the stack size
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index f4a1783..9264bed 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -164,8 +164,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0,
- "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 518eccf..2aa5818 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -268,7 +268,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
#[cfg(target_env = "msvc")]
#[cfg(feature = "backtrace")]
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index ebdf361..de198a6 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -58,11 +58,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}",
- io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 35de4f4..1d6d0c8 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1438,11 +1438,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Signals.inc b/src/llvm-project/llvm/lib/Support/Unix/Signals.inc
index ad88d5e..9d320b7 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Signals.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Signals.inc
@@ -47,7 +47,9 @@
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
+#define _BSD_SOURCE
#include <sysexits.h>
+#undef _BSD_SOURCE
#ifdef HAVE_BACKTRACE
# include BACKTRACE_HEADER // For backtrace().
#endif
--
2.19.0

View File

@@ -1,111 +0,0 @@
From 5f1e2f562e193d3bf71352fa46c34cbd4711f801 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Tue, 8 Oct 2019 20:07:27 +0200
Subject: Haiku: add patches for Rust 1.38.0
diff --git a/Cargo.lock b/Cargo.lock
index ab6731e..f6c5bd8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1466,7 +1466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
- "libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)",
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1484,7 +1484,7 @@ dependencies = [
[[package]]
name = "libssh2-sys"
version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
+source = "git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04#74d7f04dbee9997510bdad5608bb06970c6b4c8a"
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -4486,7 +4486,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum libflate 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "90c6f86f4b0caa347206f916f8b687b51d77c6ef8ff18d52dd007491fd580529"
"checksum libgit2-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4c179ed6d19cd3a051e68c177fbbc214e79ac4724fac3a850ec9f3d3eb8a5578"
"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
-"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
+"checksum libssh2-sys 0.2.11 (git+https://github.com/alexcrichton/ssh2-rs?rev=74d7f04)" = "<none>"
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
diff --git a/Cargo.toml b/Cargo.toml
index ccd7e8b..b23710f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -59,6 +59,7 @@ cargo = { path = "src/tools/cargo" }
# that we're shipping as well (to ensure that the rustfmt in RLS and the
# `rustfmt` executable are the same exact version).
rustfmt-nightly = { path = "src/tools/rustfmt" }
+libssh2-sys = { git = "https://github.com/alexcrichton/ssh2-rs", rev = "74d7f04" }
# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
# here
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index 988881e..7b1e55f 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -178,8 +178,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0,
- "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index f706709..05d624a 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -254,7 +254,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index ebdf361..de198a6 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -58,11 +58,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}",
- io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 764041d..2b94be9 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1438,11 +1438,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
--
2.19.0

View File

@@ -1,84 +0,0 @@
From 0bb583ffd38715fe48644e1ef9cbe9387578ac2c Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Wed, 25 Dec 2019 14:21:38 +0100
Subject: Haiku-specific patches for Rust 1.40.0
diff --git a/Cargo.lock b/Cargo.lock
index f44ed3d..db0550e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1644,9 +1644,9 @@ dependencies = [
[[package]]
name = "libssh2-sys"
-version = "0.2.11"
+version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
+checksum = "5fcd5a428a31cbbfe059812d74f4b6cd3b9b7426c2bdaec56993c5365da1c328"
dependencies = [
"cc",
"libc",
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index 72b0ac4..f97db49 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -177,8 +177,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0,
- "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index b1f9d97..c07af0f 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -254,7 +254,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index ebdf361..de198a6 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -58,11 +58,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}",
- io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 0ffa6ac..490cb00 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1435,11 +1435,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
--
2.19.0

View File

@@ -1,82 +0,0 @@
From 9d592e5355a60c8142bf32d834e98278c9275bf0 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 2 Feb 2020 01:16:13 +0100
Subject: Haiku-specific patches for Rust 1.41.0
diff --git a/Cargo.lock b/Cargo.lock
index 1af0442..ef37feb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1822,9 +1822,9 @@ dependencies = [
[[package]]
name = "libssh2-sys"
-version = "0.2.11"
+version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
+checksum = "5fcd5a428a31cbbfe059812d74f4b6cd3b9b7426c2bdaec56993c5365da1c328"
dependencies = [
"cc",
"libc",
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index a5b34ee..75d0d13 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -183,7 +183,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index b1f9d97..c07af0f 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -254,7 +254,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index c828243..891cd4c 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -65,10 +65,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 0c632d2..025891d 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1447,11 +1447,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
--
2.19.0

View File

@@ -1,66 +0,0 @@
From d99359e82eb3a2bcb418c33ed1a9f9e48fe49073 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sat, 14 Mar 2020 09:48:41 +0000
Subject: Apply Haiku patches for Rust 1.42.0
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index a5b34ee..75d0d13 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -183,7 +183,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 4d37734..592a065 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -255,7 +255,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index c828243..891cd4c 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -65,10 +65,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 0dc43c7..13dd5a7 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1465,11 +1465,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
--
2.19.0

View File

@@ -1,94 +0,0 @@
From 50f71172e83f63750c7e2090630186f66c9194fa Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sat, 25 Apr 2020 13:03:58 +0100
Subject: Add Haiku-specific patches for Rust 1.43.0
diff --git a/Cargo.lock b/Cargo.lock
index d41517c..480cbc6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1056,9 +1056,9 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
[[package]]
name = "filetime"
-version = "0.2.8"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d"
+checksum = "f59efc38004c988e4201d11d263b8171f49a2e7ec0bdbb71773433f271504a5e"
dependencies = [
"cfg-if",
"libc",
@@ -1760,9 +1760,9 @@ checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"
[[package]]
name = "libc"
-version = "0.2.66"
+version = "0.2.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
+checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005"
dependencies = [
"rustc-std-workspace-core",
]
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index 674d4c7..35992cb 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -183,7 +183,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 4d37734..592a065 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -255,7 +255,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index c828243..891cd4c 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -65,10 +65,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 0dc43c7..13dd5a7 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1465,11 +1465,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
--
2.19.0

View File

@@ -1,82 +0,0 @@
From e3c6f9e5050f7b44cd6f6ba4b75de1c4be5bd255 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sat, 13 Jun 2020 17:17:25 +0000
Subject: Haiku-specific patches for Rust 1.44.0
diff --git a/Cargo.lock b/Cargo.lock
index 3456b65..dccbe43 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4654,9 +4654,9 @@ checksum = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86"
[[package]]
name = "socket2"
-version = "0.3.12"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"
+checksum = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85"
dependencies = [
"cfg-if",
"libc",
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index 895ea48..fb2632e 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -190,7 +190,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 134f508..741b673 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -255,7 +255,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index 38839ea..7bb8c95 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -70,10 +70,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 282e268..fc30616 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1465,11 +1465,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
--
2.26.0

View File

@@ -1,82 +0,0 @@
From 92b85fb06f8286c78c59bd8896a23fcdac22768d Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 9 Aug 2020 10:36:23 +0000
Subject: Haiku-specific patches for Rust 1.45.0
diff --git a/Cargo.lock b/Cargo.lock
index 6cfedd4..83caf54 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4735,9 +4735,9 @@ checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4"
[[package]]
name = "socket2"
-version = "0.3.12"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"
+checksum = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85"
dependencies = [
"cfg-if",
"libc",
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index 895ea48..fb2632e 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -190,7 +190,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 6115d65..1484dce 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -254,7 +254,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index 38839ea..7bb8c95 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -70,10 +70,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 3134a59..0d16aef 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -1469,11 +1469,6 @@ impl<T> JoinHandle<T> {
/// [`panic`]: ../../std/macro.panic.html
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
--
2.26.0

View File

@@ -1,127 +0,0 @@
From 072a7cc091d727a81fda0c32ef4e8b2a58fc78d3 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Fri, 20 Nov 2020 11:11:57 +0000
Subject: Haiku-specific patches for Rust 1.48.0
diff --git a/Cargo.lock b/Cargo.lock
index 90fc560..20175d0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4520,9 +4520,9 @@ checksum = "da73c8f77aebc0e40c300b93f0a5f1bece7a248a36eee287d4e095f35c7b7d6e"
[[package]]
name = "socket2"
-version = "0.3.12"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"
+checksum = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85"
dependencies = [
"cfg-if",
"libc",
diff --git a/library/std/src/sys/unix/thread.rs b/library/std/src/sys/unix/thread.rs
index 652219e..ea1d576 100644
--- a/library/std/src/sys/unix/thread.rs
+++ b/library/std/src/sys/unix/thread.rs
@@ -190,7 +190,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/windows/c.rs
index 559c4dc..2c9a9c6 100644
--- a/library/std/src/sys/windows/c.rs
+++ b/library/std/src/sys/windows/c.rs
@@ -269,7 +269,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/library/std/src/sys/windows/thread.rs b/library/std/src/sys/windows/thread.rs
index 38839ea..7bb8c95 100644
--- a/library/std/src/sys/windows/thread.rs
+++ b/library/std/src/sys/windows/thread.rs
@@ -70,10 +70,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index 087175b..215f910 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -1341,11 +1341,6 @@ impl<T> JoinHandle<T> {
/// [`Err`]: crate::result::Result::Err
/// [atomic memory orderings]: crate::sync::atomic
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 6bba00e..37d6fab 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -378,6 +378,8 @@ fn configure_cmake(
cfg.define("CMAKE_SYSTEM_NAME", "FreeBSD");
} else if target.contains("windows") {
cfg.define("CMAKE_SYSTEM_NAME", "Windows");
+ } else if target.contains("haiku") {
+ cfg.define("CMAKE_SYSTEM_NAME", "Haiku");
}
// When cross-compiling we should also set CMAKE_SYSTEM_VERSION, but in
// that case like CMake we cannot easily determine system version either.
diff --git a/src/llvm-project/llvm/lib/Support/CMakeLists.txt b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
index 17bef02..e36da10 100644
--- a/src/llvm-project/llvm/lib/Support/CMakeLists.txt
+++ b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
@@ -36,6 +36,10 @@ elseif( CMAKE_HOST_UNIX )
if( FUCHSIA )
set(system_libs ${system_libs} zircon)
endif()
+ if ( HAIKU )
+ add_definitions(-D_BSD_SOURCE)
+ set(system_libs ${system_libs} bsd)
+ endif()
endif( MSVC OR MINGW )
# Delay load shell32.dll if possible to speed up process startup.
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Program.inc b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
index 8f41fc0..950416d 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Program.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
@@ -448,8 +448,12 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
if (ProcStat) {
std::chrono::microseconds UserT = toDuration(Info.ru_utime);
std::chrono::microseconds KernelT = toDuration(Info.ru_stime);
+#ifndef __HAIKU__
uint64_t PeakMemory = static_cast<uint64_t>(Info.ru_maxrss);
*ProcStat = ProcessStatistics{UserT + KernelT, UserT, PeakMemory};
+#else
+ *ProcStat = ProcessStatistics{UserT + KernelT, UserT, 0};
+#endif
}
// Return the proper exit status. Detect error conditions
--
2.26.0

View File

@@ -1,114 +0,0 @@
From 38c48f5f75d7390b6bd6992f8dd60277920f5e01 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Tue, 5 Jan 2021 13:20:04 +0000
Subject: Haiku-specific patches for Rust 1.49.0
diff --git a/Cargo.lock b/Cargo.lock
index c72c7b8..d7f8bc3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4614,9 +4614,9 @@ checksum = "da73c8f77aebc0e40c300b93f0a5f1bece7a248a36eee287d4e095f35c7b7d6e"
[[package]]
name = "socket2"
-version = "0.3.12"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"
+checksum = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85"
dependencies = [
"cfg-if 0.1.10",
"libc",
diff --git a/library/std/src/sys/unix/thread.rs b/library/std/src/sys/unix/thread.rs
index cda17eb..d9131e6 100644
--- a/library/std/src/sys/unix/thread.rs
+++ b/library/std/src/sys/unix/thread.rs
@@ -176,7 +176,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/windows/c.rs
index 657421e..2673661 100644
--- a/library/std/src/sys/windows/c.rs
+++ b/library/std/src/sys/windows/c.rs
@@ -268,7 +268,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/library/std/src/sys/windows/thread.rs b/library/std/src/sys/windows/thread.rs
index 38839ea..7bb8c95 100644
--- a/library/std/src/sys/windows/thread.rs
+++ b/library/std/src/sys/windows/thread.rs
@@ -70,10 +70,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index fefaa77..bbe5f60 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -1351,11 +1351,6 @@ impl<T> JoinHandle<T> {
/// [`Err`]: crate::result::Result::Err
/// [atomic memory orderings]: crate::sync::atomic
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm-project/llvm/lib/Support/CMakeLists.txt b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
index 17bef02..e36da10 100644
--- a/src/llvm-project/llvm/lib/Support/CMakeLists.txt
+++ b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
@@ -36,6 +36,10 @@ elseif( CMAKE_HOST_UNIX )
if( FUCHSIA )
set(system_libs ${system_libs} zircon)
endif()
+ if ( HAIKU )
+ add_definitions(-D_BSD_SOURCE)
+ set(system_libs ${system_libs} bsd)
+ endif()
endif( MSVC OR MINGW )
# Delay load shell32.dll if possible to speed up process startup.
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Program.inc b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
index 8f41fc0..950416d 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Program.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
@@ -448,8 +448,12 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
if (ProcStat) {
std::chrono::microseconds UserT = toDuration(Info.ru_utime);
std::chrono::microseconds KernelT = toDuration(Info.ru_stime);
+#ifndef __HAIKU__
uint64_t PeakMemory = static_cast<uint64_t>(Info.ru_maxrss);
*ProcStat = ProcessStatistics{UserT + KernelT, UserT, PeakMemory};
+#else
+ *ProcStat = ProcessStatistics{UserT + KernelT, UserT, 0};
+#endif
}
// Return the proper exit status. Detect error conditions
--
2.26.0

View File

@@ -1,119 +0,0 @@
From 2b37f1b93f948c7921467b8d1f9bb0032991570c Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 14 Feb 2021 10:30:30 +0000
Subject: Haiku-specific patches for Rust 1.50.0
diff --git a/Cargo.lock b/Cargo.lock
index 89ac858..bca63e3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4705,13 +4705,12 @@ checksum = "da73c8f77aebc0e40c300b93f0a5f1bece7a248a36eee287d4e095f35c7b7d6e"
[[package]]
name = "socket2"
-version = "0.3.16"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fd8b795c389288baa5f355489c65e71fd48a02104600d15c4cfbc561e9e429d"
+checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
dependencies = [
- "cfg-if 0.1.10",
+ "cfg-if 1.0.0",
"libc",
- "redox_syscall",
"winapi 0.3.9",
]
diff --git a/library/std/src/sys/unix/thread.rs b/library/std/src/sys/unix/thread.rs
index cda17eb..d9131e6 100644
--- a/library/std/src/sys/unix/thread.rs
+++ b/library/std/src/sys/unix/thread.rs
@@ -176,7 +176,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/windows/c.rs
index 2b1bc92..1ed90ae 100644
--- a/library/std/src/sys/windows/c.rs
+++ b/library/std/src/sys/windows/c.rs
@@ -270,7 +270,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/library/std/src/sys/windows/thread.rs b/library/std/src/sys/windows/thread.rs
index 38839ea..7bb8c95 100644
--- a/library/std/src/sys/windows/thread.rs
+++ b/library/std/src/sys/windows/thread.rs
@@ -70,10 +70,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index 5d65f96..8358b3b 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -1351,11 +1351,6 @@ impl<T> JoinHandle<T> {
/// [`Err`]: crate::result::Result::Err
/// [atomic memory orderings]: crate::sync::atomic
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm-project/llvm/lib/Support/CMakeLists.txt b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
index 17bef02..e36da10 100644
--- a/src/llvm-project/llvm/lib/Support/CMakeLists.txt
+++ b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
@@ -36,6 +36,10 @@ elseif( CMAKE_HOST_UNIX )
if( FUCHSIA )
set(system_libs ${system_libs} zircon)
endif()
+ if ( HAIKU )
+ add_definitions(-D_BSD_SOURCE)
+ set(system_libs ${system_libs} bsd)
+ endif()
endif( MSVC OR MINGW )
# Delay load shell32.dll if possible to speed up process startup.
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Program.inc b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
index 8f41fc0..950416d 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Program.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
@@ -448,8 +448,12 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
if (ProcStat) {
std::chrono::microseconds UserT = toDuration(Info.ru_utime);
std::chrono::microseconds KernelT = toDuration(Info.ru_stime);
+#ifndef __HAIKU__
uint64_t PeakMemory = static_cast<uint64_t>(Info.ru_maxrss);
*ProcStat = ProcessStatistics{UserT + KernelT, UserT, PeakMemory};
+#else
+ *ProcStat = ProcessStatistics{UserT + KernelT, UserT, 0};
+#endif
}
// Return the proper exit status. Detect error conditions
--
2.26.0

View File

@@ -1,155 +0,0 @@
From 36c66e7faaaecea5b40cbd99d331fd6d9cf0ef32 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Thu, 25 Mar 2021 16:51:24 +0000
Subject: Patches for Haiku for Rust 1.51.0
diff --git a/Cargo.lock b/Cargo.lock
index 2b68f72..1ed6856 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -893,9 +893,8 @@ dependencies = [
[[package]]
name = "curl-sys"
-version = "0.4.39+curl-7.74.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07a8ce861e7b68a0b394e814d7ee9f1b2750ff8bd10372c6ad3bacc10e86f874"
+version = "0.4.40+curl-7.75.0"
+source = "git+https://github.com/alexcrichton/curl-rust?rev=15a48d2346cb1d28d76bcbdde42bfb2c6e62c621#15a48d2346cb1d28d76bcbdde42bfb2c6e62c621"
dependencies = [
"cc",
"libc",
@@ -1887,8 +1886,7 @@ dependencies = [
[[package]]
name = "libz-sys"
version = "1.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
+source = "git+https://github.com/nielx/libz-sys?tag=1.1.2-haiku#15004cb938fd0d8591aea3227b71743171cd9a1e"
dependencies = [
"cc",
"libc",
@@ -4778,13 +4776,12 @@ checksum = "da73c8f77aebc0e40c300b93f0a5f1bece7a248a36eee287d4e095f35c7b7d6e"
[[package]]
name = "socket2"
-version = "0.3.16"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fd8b795c389288baa5f355489c65e71fd48a02104600d15c4cfbc561e9e429d"
+checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
dependencies = [
- "cfg-if 0.1.10",
+ "cfg-if 1.0.0",
"libc",
- "redox_syscall",
"winapi 0.3.9",
]
diff --git a/Cargo.toml b/Cargo.toml
index f961d3e..639e4b2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -106,5 +106,9 @@ rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
+# Build fix for cross-compiling Rust for Haiku
+libz-sys = { git = 'https://github.com/nielx/libz-sys', tag = "1.1.2-haiku" }
+curl-sys = { git = 'https://github.com/alexcrichton/curl-rust', rev = "15a48d2346cb1d28d76bcbdde42bfb2c6e62c621" }
+
[patch."https://github.com/rust-lang/rust-clippy"]
clippy_lints = { path = "src/tools/clippy/clippy_lints" }
diff --git a/library/std/src/sys/unix/thread.rs b/library/std/src/sys/unix/thread.rs
index cda17eb..d9131e6 100644
--- a/library/std/src/sys/unix/thread.rs
+++ b/library/std/src/sys/unix/thread.rs
@@ -176,7 +176,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/windows/c.rs
index dec8862..516c3b2 100644
--- a/library/std/src/sys/windows/c.rs
+++ b/library/std/src/sys/windows/c.rs
@@ -270,7 +270,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/library/std/src/sys/windows/thread.rs b/library/std/src/sys/windows/thread.rs
index 38839ea..7bb8c95 100644
--- a/library/std/src/sys/windows/thread.rs
+++ b/library/std/src/sys/windows/thread.rs
@@ -70,10 +70,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index 0d004a5..7d8c1e2 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -1356,11 +1356,6 @@ impl<T> JoinHandle<T> {
/// [`Err`]: crate::result::Result::Err
/// [atomic memory orderings]: crate::sync::atomic
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm-project/llvm/lib/Support/CMakeLists.txt b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
index 17bef02..e36da10 100644
--- a/src/llvm-project/llvm/lib/Support/CMakeLists.txt
+++ b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
@@ -36,6 +36,10 @@ elseif( CMAKE_HOST_UNIX )
if( FUCHSIA )
set(system_libs ${system_libs} zircon)
endif()
+ if ( HAIKU )
+ add_definitions(-D_BSD_SOURCE)
+ set(system_libs ${system_libs} bsd)
+ endif()
endif( MSVC OR MINGW )
# Delay load shell32.dll if possible to speed up process startup.
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Program.inc b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
index 8f41fc0..950416d 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Program.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
@@ -448,8 +448,12 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
if (ProcStat) {
std::chrono::microseconds UserT = toDuration(Info.ru_utime);
std::chrono::microseconds KernelT = toDuration(Info.ru_stime);
+#ifndef __HAIKU__
uint64_t PeakMemory = static_cast<uint64_t>(Info.ru_maxrss);
*ProcStat = ProcessStatistics{UserT + KernelT, UserT, PeakMemory};
+#else
+ *ProcStat = ProcessStatistics{UserT + KernelT, UserT, 0};
+#endif
}
// Return the proper exit status. Detect error conditions
--
2.30.0

View File

@@ -1,197 +0,0 @@
From e474187424664bbc70c27102a424c440dc1e7294 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Fri, 7 May 2021 10:11:53 +0000
Subject: Haiku-specific patches for Rust 1.52.0
diff --git a/Cargo.lock b/Cargo.lock
index e5a7b7d..a5b4429 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -922,9 +922,8 @@ dependencies = [
[[package]]
name = "curl-sys"
-version = "0.4.39+curl-7.74.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07a8ce861e7b68a0b394e814d7ee9f1b2750ff8bd10372c6ad3bacc10e86f874"
+version = "0.4.40+curl-7.75.0"
+source = "git+https://github.com/alexcrichton/curl-rust?rev=15a48d2346cb1d28d76bcbdde42bfb2c6e62c621#15a48d2346cb1d28d76bcbdde42bfb2c6e62c621"
dependencies = [
"cc",
"libc",
@@ -1895,9 +1894,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
-version = "0.2.88"
+version = "0.2.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03b07a082330a35e43f63177cc01689da34fbffa0105e1246cf0311472cac73a"
+checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
dependencies = [
"rustc-std-workspace-core",
]
@@ -1943,8 +1942,7 @@ dependencies = [
[[package]]
name = "libz-sys"
version = "1.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
+source = "git+https://github.com/nielx/libz-sys?tag=1.1.2-haiku#15004cb938fd0d8591aea3227b71743171cd9a1e"
dependencies = [
"cc",
"libc",
@@ -4962,13 +4960,12 @@ checksum = "da73c8f77aebc0e40c300b93f0a5f1bece7a248a36eee287d4e095f35c7b7d6e"
[[package]]
name = "socket2"
-version = "0.3.16"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fd8b795c389288baa5f355489c65e71fd48a02104600d15c4cfbc561e9e429d"
+checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
dependencies = [
- "cfg-if 0.1.10",
+ "cfg-if 1.0.0",
"libc",
- "redox_syscall 0.1.57",
"winapi 0.3.9",
]
diff --git a/Cargo.toml b/Cargo.toml
index f961d3e..639e4b2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -106,5 +106,9 @@ rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
+# Build fix for cross-compiling Rust for Haiku
+libz-sys = { git = 'https://github.com/nielx/libz-sys', tag = "1.1.2-haiku" }
+curl-sys = { git = 'https://github.com/alexcrichton/curl-rust', rev = "15a48d2346cb1d28d76bcbdde42bfb2c6e62c621" }
+
[patch."https://github.com/rust-lang/rust-clippy"]
clippy_lints = { path = "src/tools/clippy/clippy_lints" }
diff --git a/library/std/src/sys/unix/thread.rs b/library/std/src/sys/unix/thread.rs
index 01a12dc..9e4d2e6 100644
--- a/library/std/src/sys/unix/thread.rs
+++ b/library/std/src/sys/unix/thread.rs
@@ -176,7 +176,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/windows/c.rs
index 9789ed0..71998f3 100644
--- a/library/std/src/sys/windows/c.rs
+++ b/library/std/src/sys/windows/c.rs
@@ -270,7 +270,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/library/std/src/sys/windows/thread.rs b/library/std/src/sys/windows/thread.rs
index 38839ea..7bb8c95 100644
--- a/library/std/src/sys/windows/thread.rs
+++ b/library/std/src/sys/windows/thread.rs
@@ -70,10 +70,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index 0ef848f..126494c 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -1365,11 +1365,6 @@ impl<T> JoinHandle<T> {
/// [`Err`]: crate::result::Result::Err
/// [atomic memory orderings]: crate::sync::atomic
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm-project/llvm/lib/Support/CMakeLists.txt b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
index cdee114..1c805e3 100644
--- a/src/llvm-project/llvm/lib/Support/CMakeLists.txt
+++ b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
@@ -36,6 +36,10 @@ elseif( CMAKE_HOST_UNIX )
if( FUCHSIA )
set(system_libs ${system_libs} zircon)
endif()
+ if ( HAIKU )
+ add_definitions(-D_BSD_SOURCE)
+ set(system_libs ${system_libs} bsd)
+ endif()
endif( MSVC OR MINGW )
# Delay load shell32.dll if possible to speed up process startup.
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Program.inc b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
index fb56fa4..d42681f 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Program.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
@@ -452,8 +452,12 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
if (ProcStat) {
std::chrono::microseconds UserT = toDuration(Info.ru_utime);
std::chrono::microseconds KernelT = toDuration(Info.ru_stime);
+#ifndef __HAIKU__
uint64_t PeakMemory = static_cast<uint64_t>(Info.ru_maxrss);
*ProcStat = ProcessStatistics{UserT + KernelT, UserT, PeakMemory};
+#else
+ *ProcStat = ProcessStatistics{UserT + KernelT, UserT, 0};
+#endif
}
// Return the proper exit status. Detect error conditions
diff --git a/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt b/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
index 90b4ca6..c9f9a53 100644
--- a/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
+++ b/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
@@ -24,6 +24,10 @@ add_llvm_tool(llvm-jitlink
llvm-jitlink-macho.cpp
)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink PRIVATE socket nsl)
endif()
diff --git a/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt b/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
index a183857..37af9a5 100644
--- a/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
+++ b/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
@@ -12,6 +12,10 @@ add_llvm_utility(llvm-jitlink-executor
)
message(${CMAKE_SYSTEM_NAME})
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink-executor PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink-executor PRIVATE socket)
endif()
--
2.30.0

View File

@@ -1,184 +0,0 @@
From 43edf22885e4144deb68b40007a031bc7cc2e2bc Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sat, 19 Jun 2021 15:36:41 +0000
Subject: Add Haiku-specific patches for Rust 1.53.0
diff --git a/Cargo.lock b/Cargo.lock
index 0939f19..a82f34d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -879,9 +879,9 @@ dependencies = [
[[package]]
name = "curl-sys"
-version = "0.4.39+curl-7.74.0"
+version = "0.4.42+curl-7.76.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07a8ce861e7b68a0b394e814d7ee9f1b2750ff8bd10372c6ad3bacc10e86f874"
+checksum = "4636d8d6109c842707018a104051436bffb8991ea20b2d1293db70b6e0ee4c7c"
dependencies = [
"cc",
"libc",
@@ -1931,8 +1931,7 @@ dependencies = [
[[package]]
name = "libz-sys"
version = "1.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
+source = "git+https://github.com/nielx/libz-sys?tag=1.1.2-haiku#15004cb938fd0d8591aea3227b71743171cd9a1e"
dependencies = [
"cc",
"libc",
@@ -4853,13 +4852,12 @@ checksum = "da73c8f77aebc0e40c300b93f0a5f1bece7a248a36eee287d4e095f35c7b7d6e"
[[package]]
name = "socket2"
-version = "0.3.16"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fd8b795c389288baa5f355489c65e71fd48a02104600d15c4cfbc561e9e429d"
+checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
dependencies = [
- "cfg-if 0.1.10",
+ "cfg-if 1.0.0",
"libc",
- "redox_syscall 0.1.57",
"winapi 0.3.9",
]
diff --git a/Cargo.toml b/Cargo.toml
index 327afe3..aead8d1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -110,5 +110,8 @@ rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
+# Build fix for cross-compiling Rust for Haiku
+libz-sys = { git = 'https://github.com/nielx/libz-sys', tag = "1.1.2-haiku" }
+
[patch."https://github.com/rust-lang/rust-clippy"]
clippy_lints = { path = "src/tools/clippy/clippy_lints" }
diff --git a/library/std/src/sys/unix/thread.rs b/library/std/src/sys/unix/thread.rs
index b8f43ca..00a7912 100644
--- a/library/std/src/sys/unix/thread.rs
+++ b/library/std/src/sys/unix/thread.rs
@@ -176,7 +176,7 @@ impl Thread {
unsafe {
let ret = libc::pthread_join(self.id, ptr::null_mut());
mem::forget(self);
- assert!(ret == 0, "failed to join thread: {}", io::Error::from_raw_os_error(ret));
+ debug_assert_eq!(ret, 0);
}
}
diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/windows/c.rs
index 3e4176e..6580b82 100644
--- a/library/std/src/sys/windows/c.rs
+++ b/library/std/src/sys/windows/c.rs
@@ -270,7 +270,6 @@ pub const FILE_END: DWORD = 2;
pub const WAIT_OBJECT_0: DWORD = 0x00000000;
pub const WAIT_TIMEOUT: DWORD = 258;
-pub const WAIT_FAILED: DWORD = 0xFFFFFFFF;
pub const PIPE_ACCESS_INBOUND: DWORD = 0x00000001;
pub const PIPE_ACCESS_OUTBOUND: DWORD = 0x00000002;
diff --git a/library/std/src/sys/windows/thread.rs b/library/std/src/sys/windows/thread.rs
index 38839ea..7bb8c95 100644
--- a/library/std/src/sys/windows/thread.rs
+++ b/library/std/src/sys/windows/thread.rs
@@ -70,10 +70,7 @@ impl Thread {
}
pub fn join(self) {
- let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) };
- if rc == c::WAIT_FAILED {
- panic!("failed to join on thread: {}", io::Error::last_os_error());
- }
+ unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); }
}
pub fn yield_now() {
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index 30d8c2a..83d4266 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -1375,11 +1375,6 @@ impl<T> JoinHandle<T> {
/// [`Err`]: crate::result::Result::Err
/// [atomic memory orderings]: crate::sync::atomic
///
- /// # Panics
- ///
- /// This function may panic on some platforms if a thread attempts to join
- /// itself or otherwise may create a deadlock with joining threads.
- ///
/// # Examples
///
/// ```
diff --git a/src/llvm-project/llvm/lib/Support/CMakeLists.txt b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
index cdee114..1c805e3 100644
--- a/src/llvm-project/llvm/lib/Support/CMakeLists.txt
+++ b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
@@ -36,6 +36,10 @@ elseif( CMAKE_HOST_UNIX )
if( FUCHSIA )
set(system_libs ${system_libs} zircon)
endif()
+ if ( HAIKU )
+ add_definitions(-D_BSD_SOURCE)
+ set(system_libs ${system_libs} bsd)
+ endif()
endif( MSVC OR MINGW )
# Delay load shell32.dll if possible to speed up process startup.
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Program.inc b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
index fb56fa4..d42681f 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Program.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
@@ -452,8 +452,12 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
if (ProcStat) {
std::chrono::microseconds UserT = toDuration(Info.ru_utime);
std::chrono::microseconds KernelT = toDuration(Info.ru_stime);
+#ifndef __HAIKU__
uint64_t PeakMemory = static_cast<uint64_t>(Info.ru_maxrss);
*ProcStat = ProcessStatistics{UserT + KernelT, UserT, PeakMemory};
+#else
+ *ProcStat = ProcessStatistics{UserT + KernelT, UserT, 0};
+#endif
}
// Return the proper exit status. Detect error conditions
diff --git a/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt b/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
index 90b4ca6..c9f9a53 100644
--- a/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
+++ b/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
@@ -24,6 +24,10 @@ add_llvm_tool(llvm-jitlink
llvm-jitlink-macho.cpp
)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink PRIVATE socket nsl)
endif()
diff --git a/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt b/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
index a183857..37af9a5 100644
--- a/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
+++ b/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
@@ -12,6 +12,10 @@ add_llvm_utility(llvm-jitlink-executor
)
message(${CMAKE_SYSTEM_NAME})
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink-executor PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink-executor PRIVATE socket)
endif()
--
2.30.0

View File

@@ -1,906 +0,0 @@
From f9cf98d7ef135c9079660526f0d9c981b18f71bb Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Fri, 30 Jul 2021 12:43:46 +0000
Subject: Haiku-specific patches for Rust 1.54.0
diff --git a/Cargo.lock b/Cargo.lock
index de110c5..6d83dac 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "addr2line"
-version = "0.14.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423"
+checksum = "03345e98af8f3d786b6d9f656ccfa6ac316d954e92bc4841f0bba20789d5fb5a"
dependencies = [
"compiler_builtins",
"gimli",
@@ -278,7 +278,6 @@ dependencies = [
"humantime 2.0.1",
"ignore",
"im-rc",
- "itertools 0.10.0",
"jobserver",
"lazy_static",
"lazycell",
@@ -294,7 +293,7 @@ dependencies = [
"rand 0.8.3",
"rustc-workspace-hack",
"rustfix",
- "semver 1.0.3",
+ "semver 0.10.0",
"serde",
"serde_ignored",
"serde_json",
@@ -1427,9 +1426,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.23.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
+checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
dependencies = [
"compiler_builtins",
"rustc-std-workspace-alloc",
@@ -1712,15 +1711,6 @@ dependencies = [
"either",
]
-[[package]]
-name = "itertools"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319"
-dependencies = [
- "either",
-]
-
[[package]]
name = "itoa"
version = "0.4.6"
@@ -1946,9 +1936,9 @@ dependencies = [
[[package]]
name = "libz-sys"
-version = "1.1.2"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
+checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66"
dependencies = [
"cc",
"libc",
@@ -2294,7 +2284,6 @@ dependencies = [
"hex 0.4.2",
"libc",
"log",
- "measureme",
"rand 0.8.3",
"rustc-workspace-hack",
"rustc_version",
@@ -2350,9 +2339,9 @@ dependencies = [
[[package]]
name = "object"
-version = "0.22.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397"
+checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
dependencies = [
"compiler_builtins",
"rustc-std-workspace-alloc",
@@ -4691,15 +4680,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "semver"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f3aac57ee7f3272d8395c6e4f502f434f0e289fcd62876f70daa008c20dcabe"
-dependencies = [
- "serde",
-]
-
[[package]]
name = "semver-parser"
version = "0.7.0"
@@ -4883,8 +4863,7 @@ dependencies = [
[[package]]
name = "socket2"
version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2"
+source = "git+https://github.com/rust-lang/socket2?rev=2843d44a3440a2d4b65bb15be275ec2e3e80ee4e#2843d44a3440a2d4b65bb15be275ec2e3e80ee4e"
dependencies = [
"libc",
"winapi 0.3.9",
@@ -4924,7 +4903,7 @@ dependencies = [
"hermit-abi",
"libc",
"miniz_oxide",
- "object 0.22.0",
+ "object 0.24.0",
"panic_abort",
"panic_unwind",
"profiler_builtins",
diff --git a/Cargo.toml b/Cargo.toml
index 327afe3..0dacd14 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -110,5 +110,8 @@ rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
+# Temporary patch with build fix for Haiku
+"socket2" = { git = "https://github.com/rust-lang/socket2", rev = "2843d44a3440a2d4b65bb15be275ec2e3e80ee4e" }
+
[patch."https://github.com/rust-lang/rust-clippy"]
clippy_lints = { path = "src/tools/clippy/clippy_lints" }
diff --git a/library/backtrace/Cargo.toml b/library/backtrace/Cargo.toml
index 71db617..6f74b2d 100644
--- a/library/backtrace/Cargo.toml
+++ b/library/backtrace/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "backtrace"
-version = "0.3.57"
+version = "0.3.59"
authors = ["The Rust Project Developers"]
+build = "build.rs"
license = "MIT/Apache-2.0"
readme = "README.md"
repository = "https://github.com/rust-lang/backtrace-rs"
@@ -21,8 +22,7 @@ exclude = ['crates/without_debuginfo', 'crates/macos_frames_test', 'crates/line-
[dependencies]
cfg-if = "1.0"
rustc-demangle = "0.1.4"
-backtrace-sys = { path = "crates/backtrace-sys", version = "0.1.35", optional = true, default_features = false }
-libc = { version = "0.2.87", default-features = false }
+libc = { version = "0.2.94", default-features = false }
# Optionally enable the ability to serialize a `Backtrace`, controlled through
# the `serialize-*` features below.
@@ -35,43 +35,32 @@ cpp_demangle = { default-features = false, version = "0.3.0", optional = true }
# Optional dependencies enabled through the `gimli-symbolize` feature, do not
# use these features directly.
-addr2line = { version = "0.14.1", optional = true, default-features = false }
-miniz_oxide = { version = "0.4.0", optional = true, default-features = false }
+addr2line = { version = "0.15.1", default-features = false }
+miniz_oxide = { version = "0.4.0", default-features = false }
[dependencies.object]
-version = "0.23"
-optional = true
+version = "0.24"
default-features = false
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.3", optional = true }
+[build-dependencies]
+# Only needed for Android, but cannot be target dependent
+# https://github.com/rust-lang/cargo/issues/4932
+cc = "1.0.67"
+
[dev-dependencies]
dylib-dep = { path = "crates/dylib-dep" }
libloading = "0.6"
[features]
# By default libstd support and gimli-symbolize is used to symbolize addresses.
-default = ["std", "gimli-symbolize"]
+default = ["std"]
# Include std support. This enables types like `Backtrace`.
std = []
-#=======================================
-# Methods of resolving symbols
-#
-# - gimli-symbolize: use the `gimli-rs/addr2line` crate to symbolicate
-# addresses into file, line, and name using DWARF debug information.
-# - libbacktrace: this feature activates the `backtrace-sys` dependency,
-# building the libbacktrace library found in gcc repos.
-#
-# Note that MSVC unconditionally uses the dbghelp library to symbolize and won't
-# be affected by feature selection here. Also note that it's highly unlikely you
-# want to configure this. If you're having trouble getting backtraces it's
-# likely best to open an issue.
-gimli-symbolize = ["addr2line", "miniz_oxide", "object"]
-libbacktrace = ["backtrace-sys/backtrace-sys"]
-
#=======================================
# Methods of serialization
#
@@ -85,11 +74,13 @@ serialize-serde = ["serde"]
# Only here for backwards compatibility purposes or for internal testing
# purposes. New code should use none of these features.
coresymbolication = []
+dbghelp = []
dladdr = []
+gimli-symbolize = []
kernel32 = []
-unix-backtrace = []
+libbacktrace = []
libunwind = []
-dbghelp = []
+unix-backtrace = []
verify-winapi = [
'winapi/dbghelp',
'winapi/handleapi',
@@ -126,7 +117,7 @@ edition = '2018'
[[test]]
name = "accuracy"
-required-features = ["std", "gimli-symbolize"]
+required-features = ["std"]
edition = '2018'
[[test]]
diff --git a/library/backtrace/build.rs b/library/backtrace/build.rs
new file mode 100644
index 0000000..812fbb1
--- /dev/null
+++ b/library/backtrace/build.rs
@@ -0,0 +1,41 @@
+extern crate cc;
+
+use std::env;
+
+fn main() {
+ match env::var("CARGO_CFG_TARGET_OS").unwrap_or_default().as_str() {
+ "android" => build_android(),
+ _ => {}
+ }
+}
+
+fn build_android() {
+ let expansion = match cc::Build::new().file("src/android-api.c").try_expand() {
+ Ok(result) => result,
+ Err(e) => {
+ println!("failed to run C compiler: {}", e);
+ return;
+ }
+ };
+ let expansion = match std::str::from_utf8(&expansion) {
+ Ok(s) => s,
+ Err(_) => return,
+ };
+ println!("expanded android version detection:\n{}", expansion);
+ let marker = "APIVERSION";
+ let i = match expansion.find(marker) {
+ Some(i) => i,
+ None => return,
+ };
+ let version = match expansion[i + marker.len() + 1..].split_whitespace().next() {
+ Some(s) => s,
+ None => return,
+ };
+ let version = match version.parse::<u32>() {
+ Ok(n) => n,
+ Err(_) => return,
+ };
+ if version >= 21 {
+ println!("cargo:rustc-cfg=feature=\"dl_iterate_phdr\"");
+ }
+}
diff --git a/library/backtrace/crates/as-if-std/Cargo.toml b/library/backtrace/crates/as-if-std/Cargo.toml
index b7cb2a8..36adc20 100644
--- a/library/backtrace/crates/as-if-std/Cargo.toml
+++ b/library/backtrace/crates/as-if-std/Cargo.toml
@@ -15,11 +15,11 @@ bench = false
cfg-if = "1.0"
rustc-demangle = "0.1.4"
libc = { version = "0.2.45", default-features = false }
-addr2line = { version = "0.14.1", default-features = false }
+addr2line = { version = "0.15.1", default-features = false }
miniz_oxide = { version = "0.4.0", default-features = false }
[dependencies.object]
-version = "0.22"
+version = "0.24"
default-features = false
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']
diff --git a/library/backtrace/src/android-api.c b/library/backtrace/src/android-api.c
new file mode 100644
index 0000000..1bfeadf
--- /dev/null
+++ b/library/backtrace/src/android-api.c
@@ -0,0 +1,4 @@
+// Used from the build script to detect the value of the `__ANDROID_API__`
+// builtin #define
+
+APIVERSION __ANDROID_API__
diff --git a/library/backtrace/src/capture.rs b/library/backtrace/src/capture.rs
index 9bd6ce9..e0dd9c4 100644
--- a/library/backtrace/src/capture.rs
+++ b/library/backtrace/src/capture.rs
@@ -249,6 +249,15 @@ impl From<Vec<BacktraceFrame>> for Backtrace {
}
}
+impl From<crate::Frame> for BacktraceFrame {
+ fn from(frame: crate::Frame) -> BacktraceFrame {
+ BacktraceFrame {
+ frame: Frame::Raw(frame),
+ symbols: None,
+ }
+ }
+}
+
impl Into<Vec<BacktraceFrame>> for Backtrace {
fn into(self) -> Vec<BacktraceFrame> {
self.frames
@@ -518,3 +527,29 @@ mod serde_impls {
}
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_frame_conversion() {
+ let mut frames = vec![];
+ crate::trace(|frame| {
+ let converted = BacktraceFrame::from(frame.clone());
+ frames.push(converted);
+ true
+ });
+
+ let mut manual = Backtrace::from(frames);
+ manual.resolve();
+ let frames = manual.frames();
+
+ for frame in frames {
+ println!("{:?}", frame.ip());
+ println!("{:?}", frame.symbol_address());
+ println!("{:?}", frame.module_base_address());
+ println!("{:?}", frame.symbols());
+ }
+ }
+}
diff --git a/library/backtrace/src/symbolize/gimli.rs b/library/backtrace/src/symbolize/gimli.rs
index bcd362c..b7f4965 100644
--- a/library/backtrace/src/symbolize/gimli.rs
+++ b/library/backtrace/src/symbolize/gimli.rs
@@ -85,27 +85,13 @@ struct Context<'a> {
impl<'data> Context<'data> {
fn new(stash: &'data Stash, object: Object<'data>) -> Option<Context<'data>> {
- fn load_section<'data, S>(stash: &'data Stash, obj: &Object<'data>) -> S
- where
- S: gimli::Section<gimli::EndianSlice<'data, Endian>>,
- {
- let data = obj.section(stash, S::section_name()).unwrap_or(&[]);
- S::from(EndianSlice::new(data, Endian))
- }
-
- let dwarf = addr2line::Context::from_sections(
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- gimli::EndianSlice::new(&[], Endian),
- )
+ let sections = gimli::Dwarf::load(|id| -> Result<_, ()> {
+ let data = object.section(stash, id.name()).unwrap_or(&[]);
+ Ok(EndianSlice::new(data, Endian))
+ })
.ok()?;
+ let dwarf = addr2line::Context::from_dwarf(sections).ok()?;
+
Some(Context { dwarf, object })
}
}
@@ -154,6 +140,7 @@ cfg_if::cfg_if! {
target_os = "linux",
target_os = "fuchsia",
target_os = "freebsd",
+ all(target_os = "android", feature = "dl_iterate_phdr"),
),
not(target_env = "uclibc"),
))] {
diff --git a/library/backtrace/src/symbolize/gimli/coff.rs b/library/backtrace/src/symbolize/gimli/coff.rs
index 8a6995e..0c69c58 100644
--- a/library/backtrace/src/symbolize/gimli/coff.rs
+++ b/library/backtrace/src/symbolize/gimli/coff.rs
@@ -3,7 +3,7 @@ use core::convert::TryFrom;
use object::pe::{ImageDosHeader, ImageSymbol};
use object::read::pe::{ImageNtHeaders, ImageOptionalHeader, SectionTable};
use object::read::StringTable;
-use object::{Bytes, LittleEndian as LE};
+use object::LittleEndian as LE;
#[cfg(target_pointer_width = "32")]
type Pe = object::pe::ImageNtHeaders32;
@@ -18,25 +18,25 @@ impl Mapping {
}
pub struct Object<'a> {
- data: Bytes<'a>,
+ data: &'a [u8],
sections: SectionTable<'a>,
symbols: Vec<(usize, &'a ImageSymbol)>,
strings: StringTable<'a>,
}
pub fn get_image_base(data: &[u8]) -> Option<usize> {
- let data = Bytes(data);
let dos_header = ImageDosHeader::parse(data).ok()?;
- let (nt_headers, _, _) = dos_header.nt_headers::<Pe>(data).ok()?;
+ let mut offset = dos_header.nt_headers_offset().into();
+ let (nt_headers, _) = Pe::parse(data, &mut offset).ok()?;
usize::try_from(nt_headers.optional_header().image_base()).ok()
}
impl<'a> Object<'a> {
fn parse(data: &'a [u8]) -> Option<Object<'a>> {
- let data = Bytes(data);
let dos_header = ImageDosHeader::parse(data).ok()?;
- let (nt_headers, _, nt_tail) = dos_header.nt_headers::<Pe>(data).ok()?;
- let sections = nt_headers.sections(nt_tail).ok()?;
+ let mut offset = dos_header.nt_headers_offset().into();
+ let (nt_headers, _) = Pe::parse(data, &mut offset).ok()?;
+ let sections = nt_headers.sections(data, offset).ok()?;
let symtab = nt_headers.symbols(data).ok()?;
let strings = symtab.strings();
let image_base = usize::try_from(nt_headers.optional_header().image_base()).ok()?;
@@ -78,8 +78,7 @@ impl<'a> Object<'a> {
.section_by_name(self.strings, name.as_bytes())?
.1
.pe_data(self.data)
- .ok()?
- .0,
+ .ok()?,
)
}
diff --git a/library/backtrace/src/symbolize/gimli/elf.rs b/library/backtrace/src/symbolize/gimli/elf.rs
index 41a30fe..ee311a8 100644
--- a/library/backtrace/src/symbolize/gimli/elf.rs
+++ b/library/backtrace/src/symbolize/gimli/elf.rs
@@ -29,7 +29,7 @@ pub struct Object<'a> {
/// We could use a literal instead, but this helps ensure correctness.
endian: NativeEndian,
/// The entire file data.
- data: Bytes<'a>,
+ data: &'a [u8],
sections: SectionTable<'a, Elf>,
strings: StringTable<'a>,
/// List of pre-parsed and sorted symbols by base address.
@@ -38,7 +38,6 @@ pub struct Object<'a> {
impl<'a> Object<'a> {
fn parse(data: &'a [u8]) -> Option<Object<'a>> {
- let data = object::Bytes(data);
let elf = Elf::parse(data).ok()?;
let endian = elf.endian().ok()?;
let sections = elf.sections(endian, data).ok()?;
@@ -90,7 +89,7 @@ impl<'a> Object<'a> {
pub fn section(&self, stash: &'a Stash, name: &str) -> Option<&'a [u8]> {
if let Some(section) = self.section_header(name) {
- let mut data = section.data(self.endian, self.data).ok()?;
+ let mut data = Bytes(section.data(self.endian, self.data).ok()?);
// Check for DWARF-standard (gABI) compression, i.e., as generated
// by ld's `--compress-debug-sections=zlib-gabi` flag.
@@ -131,7 +130,7 @@ impl<'a> Object<'a> {
}
})
.next()?;
- let mut data = compressed_section.data(self.endian, self.data).ok()?;
+ let mut data = Bytes(compressed_section.data(self.endian, self.data).ok()?);
if data.read_bytes(8).ok()?.0 != b"ZLIB\0\0\0\0" {
return None;
}
diff --git a/library/backtrace/src/symbolize/gimli/libs_haiku.rs b/library/backtrace/src/symbolize/gimli/libs_haiku.rs
index f80686a..87e023e 100644
--- a/library/backtrace/src/symbolize/gimli/libs_haiku.rs
+++ b/library/backtrace/src/symbolize/gimli/libs_haiku.rs
@@ -7,6 +7,7 @@
use super::mystd::borrow::ToOwned;
use super::mystd::ffi::{CStr, OsStr};
+use super::mystd::mem::MaybeUninit;
use super::mystd::os::unix::prelude::*;
use super::{Library, LibrarySegment, Vec};
@@ -14,7 +15,7 @@ pub(super) fn native_libraries() -> Vec<Library> {
let mut libraries: Vec<Library> = Vec::new();
unsafe {
- let mut info = mem::MaybeUninit::<libc::image_info>::zeroed();
+ let mut info = MaybeUninit::<libc::image_info>::zeroed();
let mut cookie: i32 = 0;
// Load the first image to get a valid info struct
let mut status =
diff --git a/library/backtrace/src/symbolize/gimli/libs_macos.rs b/library/backtrace/src/symbolize/gimli/libs_macos.rs
index 2b6b671..1c58a81 100644
--- a/library/backtrace/src/symbolize/gimli/libs_macos.rs
+++ b/library/backtrace/src/symbolize/gimli/libs_macos.rs
@@ -19,7 +19,7 @@ pub(super) fn native_libraries() -> Vec<Library> {
fn native_library(i: u32) -> Option<Library> {
use object::macho;
use object::read::macho::{MachHeader, Segment};
- use object::{Bytes, NativeEndian};
+ use object::NativeEndian;
// Fetch the name of this library which corresponds to the path of
// where to load it as well.
@@ -47,7 +47,7 @@ fn native_library(i: u32) -> Option<Library> {
header as *const _ as *const u8,
mem::size_of_val(header) + header.sizeofcmds.get(endian) as usize,
);
- (header.load_commands(endian, Bytes(data)).ok()?, endian)
+ (header.load_commands(endian, data).ok()?, endian)
}
macho::MH_MAGIC_64 => {
let endian = NativeEndian;
@@ -56,7 +56,7 @@ fn native_library(i: u32) -> Option<Library> {
header as *const _ as *const u8,
mem::size_of_val(header) + header.sizeofcmds.get(endian) as usize,
);
- (header.load_commands(endian, Bytes(data)).ok()?, endian)
+ (header.load_commands(endian, data).ok()?, endian)
}
_ => return None,
}
diff --git a/library/backtrace/src/symbolize/gimli/macho.rs b/library/backtrace/src/symbolize/gimli/macho.rs
index 4b96bf1..cdd24bd 100644
--- a/library/backtrace/src/symbolize/gimli/macho.rs
+++ b/library/backtrace/src/symbolize/gimli/macho.rs
@@ -20,7 +20,7 @@ impl Mapping {
// First up we need to load the unique UUID which is stored in the macho
// header of the file we're reading, specified at `path`.
let map = super::mmap(path)?;
- let (macho, data) = find_header(Bytes(&map))?;
+ let (macho, data) = find_header(&map)?;
let endian = macho.endian().ok()?;
let uuid = macho.uuid(endian, data).ok()??;
@@ -40,7 +40,7 @@ impl Mapping {
// file. This should have the symbol table for at least some
// symbolication purposes.
Mapping::mk(map, |data, stash| {
- let (macho, data) = find_header(Bytes(data))?;
+ let (macho, data) = find_header(data)?;
let endian = macho.endian().ok()?;
let obj = Object::parse(macho, endian, data)?;
Context::new(stash, obj)
@@ -73,7 +73,7 @@ impl Mapping {
let entry = entry.ok()?;
let map = super::mmap(&entry.path())?;
let candidate = Mapping::mk(map, |data, stash| {
- let (macho, data) = find_header(Bytes(data))?;
+ let (macho, data) = find_header(data)?;
let endian = macho.endian().ok()?;
let entry_uuid = macho.uuid(endian, data).ok()??;
if entry_uuid != uuid {
@@ -91,7 +91,7 @@ impl Mapping {
}
}
-fn find_header(mut data: Bytes<'_>) -> Option<(&'_ Mach, Bytes<'_>)> {
+fn find_header(data: &'_ [u8]) -> Option<(&'_ Mach, &'_ [u8])> {
use object::endian::BigEndian;
let desired_cpu = || {
@@ -108,6 +108,7 @@ fn find_header(mut data: Bytes<'_>) -> Option<(&'_ Mach, Bytes<'_>)> {
}
};
+ let mut data = Bytes(data);
match data
.clone()
.read::<object::endian::U32<NativeEndian>>()
@@ -149,13 +150,13 @@ fn find_header(mut data: Bytes<'_>) -> Option<(&'_ Mach, Bytes<'_>)> {
_ => return None,
}
- Mach::parse(data).ok().map(|h| (h, data))
+ Mach::parse(data.0).ok().map(|h| (h, data.0))
}
// This is used both for executables/libraries and source object files.
pub struct Object<'a> {
endian: NativeEndian,
- data: Bytes<'a>,
+ data: &'a [u8],
dwarf: Option<&'a [MachSection]>,
syms: Vec<(&'a [u8], u64)>,
syms_sort_by_name: bool,
@@ -166,7 +167,7 @@ pub struct Object<'a> {
}
impl<'a> Object<'a> {
- fn parse(mach: &'a Mach, endian: NativeEndian, data: Bytes<'a>) -> Option<Object<'a>> {
+ fn parse(mach: &'a Mach, endian: NativeEndian, data: &'a [u8]) -> Option<Object<'a>> {
let is_object = mach.filetype(endian) == object::macho::MH_OBJECT;
let mut dwarf = None;
let mut syms = Vec::new();
@@ -181,7 +182,7 @@ impl<'a> Object<'a> {
dwarf = segment.sections(endian, section_data).ok();
}
} else if let Some(symtab) = command.symtab().ok()? {
- let symbols = symtab.symbols::<Mach>(endian, data).ok()?;
+ let symbols = symtab.symbols::<Mach, _>(endian, data).ok()?;
syms = symbols
.iter()
.filter_map(|nlist: &MachNlist| {
@@ -230,7 +231,7 @@ impl<'a> Object<'a> {
&& &section_name[2..] == &name[1..]
}
})?;
- Some(section.data(self.endian, self.data).ok()?.0)
+ Some(section.data(self.endian, self.data).ok()?)
}
pub fn search_symtab<'b>(&'b self, addr: u64) -> Option<&'b [u8]> {
@@ -299,9 +300,9 @@ fn object_mapping(path: &[u8]) -> Option<Mapping> {
.members()
.filter_map(Result::ok)
.find(|m| m.name() == member_name)?;
- Bytes(member.data())
+ member.data(data).ok()?
}
- None => Bytes(data),
+ None => data,
};
let (macho, data) = find_header(data)?;
let endian = macho.endian().ok()?;
diff --git a/library/backtrace/src/symbolize/mod.rs b/library/backtrace/src/symbolize/mod.rs
index 961c63d..699d54e 100644
--- a/library/backtrace/src/symbolize/mod.rs
+++ b/library/backtrace/src/symbolize/mod.rs
@@ -471,17 +471,6 @@ cfg_if::cfg_if! {
mod dbghelp;
use dbghelp as imp;
} else if #[cfg(all(
- feature = "libbacktrace",
- any(unix, all(windows, not(target_vendor = "uwp"), target_env = "gnu")),
- not(target_os = "fuchsia"),
- not(target_os = "emscripten"),
- not(target_env = "uclibc"),
- not(target_env = "libnx"),
- ))] {
- mod libbacktrace;
- use libbacktrace as imp;
- } else if #[cfg(all(
- feature = "gimli-symbolize",
any(unix, windows),
not(target_vendor = "uwp"),
not(target_os = "emscripten"),
diff --git a/library/backtrace/tests/accuracy/main.rs b/library/backtrace/tests/accuracy/main.rs
index a2aba07..54409c1 100644
--- a/library/backtrace/tests/accuracy/main.rs
+++ b/library/backtrace/tests/accuracy/main.rs
@@ -20,8 +20,6 @@ fn doit() {
// Skip musl which is by default statically linked and doesn't support
// dynamic libraries.
!cfg!(target_env = "musl")
- // Skip MinGW on libbacktrace which doesn't have support for DLLs.
- && !(cfg!(windows) && cfg!(target_env = "gnu") && cfg!(feature = "libbacktrace"))
// Skip Miri, since it doesn't support dynamic libraries.
&& !cfg!(miri)
{
diff --git a/library/backtrace/tests/smoke.rs b/library/backtrace/tests/smoke.rs
index 0c990e0..683a6f0 100644
--- a/library/backtrace/tests/smoke.rs
+++ b/library/backtrace/tests/smoke.rs
@@ -1,38 +1,6 @@
use backtrace::Frame;
use std::thread;
-// Reflects the conditional compilation logic at end of src/symbolize/mod.rs
-static NOOP: bool = false;
-static DBGHELP: bool = !NOOP
- && cfg!(all(
- windows,
- target_env = "msvc",
- not(target_vendor = "uwp")
- ));
-static LIBBACKTRACE: bool = !NOOP
- && !DBGHELP
- && cfg!(all(
- feature = "libbacktrace",
- any(
- unix,
- all(windows, not(target_vendor = "uwp"), target_env = "gnu")
- ),
- not(target_os = "fuchsia"),
- not(target_os = "emscripten"),
- not(target_env = "uclibc"),
- not(target_env = "libnx"),
- ));
-static GIMLI_SYMBOLIZE: bool = !NOOP
- && !DBGHELP
- && !LIBBACKTRACE
- && cfg!(all(
- feature = "gimli-symbolize",
- any(unix, windows),
- not(target_vendor = "uwp"),
- not(target_os = "emscripten"),
- ));
-static MIRI_SYMBOLIZE: bool = cfg!(miri);
-
#[test]
// FIXME: shouldn't ignore this test on i686-msvc, unsure why it's failing
#[cfg_attr(all(target_arch = "x86", target_env = "msvc"), ignore)]
@@ -159,8 +127,6 @@ fn smoke_test_frames() {
}
let mut resolved = 0;
- let can_resolve = LIBBACKTRACE || GIMLI_SYMBOLIZE || MIRI_SYMBOLIZE;
- let can_resolve_cols = GIMLI_SYMBOLIZE || MIRI_SYMBOLIZE;
let mut name = None;
let mut addr = None;
@@ -175,31 +141,22 @@ fn smoke_test_frames() {
line = sym.lineno();
file = sym.filename().map(|v| v.to_path_buf());
});
+ assert!(resolved > 0);
- // dbghelp doesn't always resolve symbols right now
- match resolved {
- 0 => return assert!(!can_resolve),
- _ => {}
- }
-
- if can_resolve {
- let name = name.expect("didn't find a name");
+ let name = name.expect("didn't find a name");
- // in release mode names get weird as functions can get merged
- // together with `mergefunc`, so only assert this in debug mode
- if cfg!(debug_assertions) {
- assert!(
- name.contains(expected_name),
- "didn't find `{}` in `{}`",
- expected_name,
- name
- );
- }
+ // in release mode names get weird as functions can get merged
+ // together with `mergefunc`, so only assert this in debug mode
+ if cfg!(debug_assertions) {
+ assert!(
+ name.contains(expected_name),
+ "didn't find `{}` in `{}`",
+ expected_name,
+ name
+ );
}
- if can_resolve {
- addr.expect("didn't find a symbol");
- }
+ addr.expect("didn't find a symbol");
if cfg!(debug_assertions) {
let line = line.expect("didn't find a line number");
@@ -221,7 +178,9 @@ fn smoke_test_frames() {
expected_line
);
}
- if can_resolve_cols {
+
+ // dbghelp on MSVC doesn't support column numbers
+ if !cfg!(target_env = "msvc") {
let col = col.expect("didn't find a column number");
if expected_col != 0 {
assert!(
@@ -321,9 +280,8 @@ fn sp_smoke_test() {
let mut is_recursive_stack_references = false;
backtrace::resolve(frame.ip(), |sym| {
- is_recursive_stack_references |= (LIBBACKTRACE || GIMLI_SYMBOLIZE)
- && sym
- .name()
+ is_recursive_stack_references |=
+ sym.name()
.and_then(|name| name.as_str())
.map_or(false, |name| {
eprintln!("name = {}", name);
diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml
index 415d874..5751a1a 100644
--- a/library/std/Cargo.toml
+++ b/library/std/Cargo.toml
@@ -24,11 +24,11 @@ hashbrown = { version = "0.11", default-features = false, features = ['rustc-dep
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = ['rustc-dep-of-std'] }
# Dependencies of the `backtrace` crate
-addr2line = { version = "0.14.0", optional = true, default-features = false }
+addr2line = { version = "0.15.1", optional = true, default-features = false }
rustc-demangle = { version = "0.1.18", features = ['rustc-dep-of-std'] }
miniz_oxide = { version = "0.4.0", optional = true, default-features = false }
[dependencies.object]
-version = "0.22"
+version = "0.24"
optional = true
default-features = false
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']
diff --git a/src/llvm-project/llvm/lib/Support/CMakeLists.txt b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
index cdee114..1c805e3 100644
--- a/src/llvm-project/llvm/lib/Support/CMakeLists.txt
+++ b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
@@ -36,6 +36,10 @@ elseif( CMAKE_HOST_UNIX )
if( FUCHSIA )
set(system_libs ${system_libs} zircon)
endif()
+ if ( HAIKU )
+ add_definitions(-D_BSD_SOURCE)
+ set(system_libs ${system_libs} bsd)
+ endif()
endif( MSVC OR MINGW )
# Delay load shell32.dll if possible to speed up process startup.
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Program.inc b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
index fb56fa4..d42681f 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Program.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
@@ -452,8 +452,12 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
if (ProcStat) {
std::chrono::microseconds UserT = toDuration(Info.ru_utime);
std::chrono::microseconds KernelT = toDuration(Info.ru_stime);
+#ifndef __HAIKU__
uint64_t PeakMemory = static_cast<uint64_t>(Info.ru_maxrss);
*ProcStat = ProcessStatistics{UserT + KernelT, UserT, PeakMemory};
+#else
+ *ProcStat = ProcessStatistics{UserT + KernelT, UserT, 0};
+#endif
}
// Return the proper exit status. Detect error conditions
diff --git a/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt b/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
index 90b4ca6..c9f9a53 100644
--- a/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
+++ b/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
@@ -24,6 +24,10 @@ add_llvm_tool(llvm-jitlink
llvm-jitlink-macho.cpp
)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink PRIVATE socket nsl)
endif()
diff --git a/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt b/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
index a183857..37af9a5 100644
--- a/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
+++ b/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
@@ -12,6 +12,10 @@ add_llvm_utility(llvm-jitlink-executor
)
message(${CMAKE_SYSTEM_NAME})
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink-executor PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink-executor PRIVATE socket)
endif()
--
2.30.2

View File

@@ -0,0 +1,24 @@
From 83028081fd5a3c49a3340432b59436cbc60e94ff Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 12 Nov 2023 09:51:11 +0000
Subject: [PATCH] Use html5ever with build fix for Haiku
---
Cargo.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Cargo.toml b/Cargo.toml
index d2e84d5..1713cd4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -109,6 +109,7 @@ object.debug = 0
rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
+html5ever = { git = 'https://github.com/servo/html5ever', rev = '16b5127f6cce2182409a8384a38af8dc64532d23' }
[patch."https://github.com/rust-lang/rust-clippy"]
clippy_lints = { path = "src/tools/clippy/clippy_lints" }
--
2.37.3

View File

@@ -1,27 +0,0 @@
From fa075bf6c5642960985621370954817e34be8f83 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 9 Mar 2015 22:27:02 +0100
Subject: [PATCH] Haiku: detect OS
---
install-template.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/install-template.sh b/install-template.sh
index dcc1ee0..90afec2 100644
--- a/install-template.sh
+++ b/install-template.sh
@@ -364,6 +364,10 @@ get_host_triple() {
_ostype=pc-windows-gnu
;;
+ Haiku*)
+ _ostype=unknown-haiku
+ ;;
+
*)
err "unknown value from uname -s: $_uname_value"
;;
--
2.7.0

View File

@@ -1,27 +0,0 @@
From fa075bf6c5642960985621370954817e34be8f83 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 9 Mar 2015 22:27:02 +0100
Subject: [PATCH] Haiku: detect OS
---
install-template.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/install-template.sh b/install-template.sh
index dcc1ee0..90afec2 100644
--- a/install-template.sh
+++ b/install-template.sh
@@ -364,6 +364,10 @@ get_host_triple() {
_ostype=pc-windows-gnu
;;
+ Haiku*)
+ _ostype=unknown-haiku
+ ;;
+
*)
err "unknown value from uname -s: $_uname_value"
;;
--
2.7.0

View File

@@ -1,27 +0,0 @@
From fa075bf6c5642960985621370954817e34be8f83 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 9 Mar 2015 22:27:02 +0100
Subject: [PATCH] Haiku: detect OS
---
install-template.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/install-template.sh b/install-template.sh
index dcc1ee0..90afec2 100644
--- a/install-template.sh
+++ b/install-template.sh
@@ -364,6 +364,10 @@ get_host_triple() {
_ostype=pc-windows-gnu
;;
+ Haiku*)
+ _ostype=unknown-haiku
+ ;;
+
*)
err "unknown value from uname -s: $_uname_value"
;;
--
2.7.0

View File

@@ -1,27 +0,0 @@
From fa075bf6c5642960985621370954817e34be8f83 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 9 Mar 2015 22:27:02 +0100
Subject: [PATCH] Haiku: detect OS
---
install-template.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/install-template.sh b/install-template.sh
index dcc1ee0..90afec2 100644
--- a/install-template.sh
+++ b/install-template.sh
@@ -364,6 +364,10 @@ get_host_triple() {
_ostype=pc-windows-gnu
;;
+ Haiku*)
+ _ostype=unknown-haiku
+ ;;
+
*)
err "unknown value from uname -s: $_uname_value"
;;
--
2.7.0

View File

@@ -1,27 +0,0 @@
From fa075bf6c5642960985621370954817e34be8f83 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 9 Mar 2015 22:27:02 +0100
Subject: [PATCH] Haiku: detect OS
---
install-template.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/install-template.sh b/install-template.sh
index dcc1ee0..90afec2 100644
--- a/install-template.sh
+++ b/install-template.sh
@@ -364,6 +364,10 @@ get_host_triple() {
_ostype=pc-windows-gnu
;;
+ Haiku*)
+ _ostype=unknown-haiku
+ ;;
+
*)
err "unknown value from uname -s: $_uname_value"
;;
--
2.7.0

View File

@@ -1,27 +0,0 @@
From 656226e6b32bd9d5af2c3c371bd84a68e518db80 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Mon, 9 Mar 2015 22:27:02 +0100
Subject: [PATCH] Haiku: detect OS
---
install-template.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/install-template.sh b/install-template.sh
index dcc1ee0..90afec2 100644
--- a/install-template.sh
+++ b/install-template.sh
@@ -364,6 +364,10 @@ get_host_triple() {
_ostype=pc-windows-gnu
;;
+ Haiku*)
+ _ostype=unknown-haiku
+ ;;
+
*)
err "unknown value from uname -s: $_uname_value"
;;
--
2.7.0

View File

@@ -1,30 +0,0 @@
From 823a13164679f0e0431f7ec3fc102e1348d4ee03 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sat, 23 Sep 2017 13:37:05 +0000
Subject: [PATCH] Haiku: add constants from wait.h
---
src/unix/haiku/mod.rs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs
index ab53e6c..a40483d 100644
--- a/src/unix/haiku/mod.rs
+++ b/src/unix/haiku/mod.rs
@@ -576,6 +576,13 @@ pub const SA_NOCLDSTOP: ::c_int = 0x01;
pub const FD_SETSIZE: usize = 1024;
+pub const WNOHANG: ::c_int = 0x01;
+pub const WUNTRACED: ::c_int = 0x02;
+pub const WCONTINUED: ::c_int = 0x04;
+pub const WEXITED: ::c_int = 0x08;
+pub const WSTOPPED: ::c_int = 0x10;
+pub const WNOWAIT: ::c_int = 0x20;
+
pub const RTLD_NOW: ::c_int = 0x1;
pub const RTLD_DEFAULT: *mut ::c_void = 0isize as *mut ::c_void;
--
2.7.0

View File

@@ -1,26 +0,0 @@
From 0c43e2dfd71beb4b1866cbc5c6523dfbaf9cbf69 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Sat, 2 Sep 2017 06:50:49 -0500
Subject: [PATCH] haiku: res_init link name is __res_init.
---
src/unix/mod.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index a235d6a4..2267c307 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -697,7 +697,8 @@ extern {
#[cfg_attr(any(
all(target_os = "linux", not(target_env = "musl")),
target_os = "freebsd",
- target_os = "dragonfly"),
+ target_os = "dragonfly",
+ target_os = "haiku"),
link_name = "__res_init")]
#[cfg_attr(any(target_os = "macos", target_os = "ios"),
link_name = "res_9_init")]
--
2.16.2

View File

@@ -1,26 +0,0 @@
From 2c01fea34a8198ce97b7341681bc5401f65f45fb Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Sat, 2 Sep 2017 06:50:49 -0500
Subject: [PATCH] haiku: res_init link name is __res_init.
---
src/unix/mod.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 14bf9c53..53db19e2 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -716,7 +716,8 @@ extern {
#[cfg_attr(any(
all(target_os = "linux", not(target_env = "musl")),
target_os = "freebsd",
- target_os = "dragonfly"),
+ target_os = "dragonfly",
+ target_os = "haiku"),
link_name = "__res_init")]
#[cfg_attr(any(target_os = "macos", target_os = "ios"),
link_name = "res_9_init")]
--
2.16.2

View File

@@ -1,26 +0,0 @@
From 10966a274002632f19d0673a60c42c6e2d6d33be Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 17 Jun 2018 07:37:46 +0200
Subject: [PATCH] Haiku doesn't expose whether a FS is local or remote
---
lib/Support/Unix/Path.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc
index 2ecb97316c8..4fe5bda223c 100644
--- a/lib/Support/Unix/Path.inc
+++ b/lib/Support/Unix/Path.inc
@@ -380,6 +380,9 @@ static bool is_local_impl(struct STATVFS &Vfs) {
#elif defined(__CYGWIN__)
// Cygwin doesn't expose this information; would need to use Win32 API.
return false;
+#elif defined(__HAIKU__)
+ // Haiku doesn't expose this information
+ return false;
#elif defined(__sun)
// statvfs::f_basetype contains a null-terminated FSType name of the mounted target
StringRef fstype(Vfs.f_basetype);
--
2.16.4

View File

@@ -1,175 +0,0 @@
From a95307f2718141e574e70d104a3db8cf58a13a50 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 22 Oct 2017 11:45:45 +0000
Subject: [PATCH 1/3] Haiku: depend on a num_cpus package with Haiku support
---
Cargo.lock | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index b463253..96f1864 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -86,7 +86,7 @@ dependencies = [
"libgit2-sys 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -356,7 +356,7 @@ dependencies = [
"language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
"solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -568,7 +568,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
-version = "1.3.0"
+version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1268,7 +1268,7 @@ dependencies = [
"checksum num-integer 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "21e4df1098d1d797d27ef0c69c178c3fab64941559b290fcae198e0825c9c8b5"
"checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e"
"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
-"checksum num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a18c392466409c50b87369414a2680c93e739aedeb498eb2bff7d7eb569744e2"
+"checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584"
"checksum openssl 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8aa0eb7aad44f0da6f7dda13ddb4559d91a0f40cfab150b1f76ad5b39ec523f"
"checksum openssl-probe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "756d49c8424483a3df3b5d735112b4da22109ced9a8294f1f5cdf80fb3810919"
"checksum openssl-sys 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "14f5bfd12054d764510b887152d564ba11d99ae24ea7d740781778f646620576"
--
2.7.0
From c605c96a2256ab37eab8ab29408e02d8df80aa35 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 22 Oct 2017 12:14:26 +0000
Subject: [PATCH 2/3] Haiku: depend on a compatible version of fs2
---
Cargo.lock | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 96f1864..ae7fb3b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -77,7 +77,7 @@ dependencies = [
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"git2 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
"git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -277,7 +277,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "fs2"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1234,7 +1234,7 @@ dependencies = [
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
"checksum flate2 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "d4e4d0c15ef829cbc1b7cda651746be19cceeb238be7b1049227b14891df9e25"
"checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d"
-"checksum fs2 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34edaee07555859dc13ca387e6ae05686bb4d0364c95d649b6dab959511f4baf"
+"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
--
2.7.0
From 8e5cadbc4f777c368a35aa8dff4a76046c9537e6 Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Sun, 22 Oct 2017 14:11:39 +0000
Subject: [PATCH 3/3] Haiku: depend on a patched version of Cargo
---
Cargo.lock | 12 ++++++------
Cargo.toml | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index ae7fb3b..b79e77d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
name = "rls"
version = "0.1.0"
dependencies = [
- "cargo 0.19.0 (git+https://github.com/rust-lang/cargo)",
+ "cargo 0.19.0 (git+https://github.com/nielx/cargo?branch=cargo-haiku-0.19.0)",
"derive-new 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -66,11 +66,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cargo"
version = "0.19.0"
-source = "git+https://github.com/rust-lang/cargo#c416fb60b11ecfd2a1ba0fb8567c9a92590b5d28"
+source = "git+https://github.com/nielx/cargo?branch=cargo-haiku-0.19.0#e8f4c7b03f53840123b9bbc695dd0db0dc3ba2ee"
dependencies = [
"advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)",
- "crates-io 0.8.0 (git+https://github.com/rust-lang/cargo)",
+ "crates-io 0.8.0 (git+https://github.com/nielx/cargo?branch=cargo-haiku-0.19.0)",
"crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -153,7 +153,7 @@ dependencies = [
[[package]]
name = "crates-io"
version = "0.8.0"
-source = "git+https://github.com/rust-lang/cargo#c416fb60b11ecfd2a1ba0fb8567c9a92590b5d28"
+source = "git+https://github.com/nielx/cargo?branch=cargo-haiku-0.19.0#e8f4c7b03f53840123b9bbc695dd0db0dc3ba2ee"
dependencies = [
"curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.9.13 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1213,13 +1213,13 @@ dependencies = [
"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
-"checksum cargo 0.19.0 (git+https://github.com/rust-lang/cargo)" = "<none>"
+"checksum cargo 0.19.0 (git+https://github.com/nielx/cargo?branch=cargo-haiku-0.19.0)" = "<none>"
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
"checksum clap 2.19.3 (registry+https://github.com/rust-lang/crates.io-index)" = "95b78f3fe0fc94c13c731714363260e04b557a637166f33a4570d3189d642374"
"checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac"
"checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626"
-"checksum crates-io 0.8.0 (git+https://github.com/rust-lang/cargo)" = "<none>"
+"checksum crates-io 0.8.0 (git+https://github.com/nielx/cargo?branch=cargo-haiku-0.19.0)" = "<none>"
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
"checksum curl 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c90e1240ef340dd4027ade439e5c7c2064dd9dc652682117bd50d1486a3add7b"
"checksum curl-sys 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d909dc402ae80b6f7b0118c039203436061b9d9a3ca5d2c2546d93e0a61aaa"
diff --git a/Cargo.toml b/Cargo.toml
index 1ca0bd6..01f4ca3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Jonathan Turner <jturner@mozilla.com>"]
[dependencies]
-cargo = { git = "https://github.com/rust-lang/cargo" }
+cargo = { git = "https://github.com/nielx/cargo", branch="cargo-haiku-0.19.0" }
derive-new = "0.3"
env_logger = "0.3"
languageserver-types = { git = "https://github.com/gluon-lang/languageserver-types" }
--
2.7.0

View File

@@ -1,897 +0,0 @@
From 9d5e66521024242b4d02957a729293ea27d6e1de Mon Sep 17 00:00:00 2001
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Date: Thu, 9 Sep 2021 22:49:08 +0000
Subject: Haiku-specific patches for Rust 1.55.0
diff --git a/Cargo.lock b/Cargo.lock
index 085aae3..fd60f85 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "addr2line"
-version = "0.14.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423"
+checksum = "03345e98af8f3d786b6d9f656ccfa6ac316d954e92bc4841f0bba20789d5fb5a"
dependencies = [
"compiler_builtins",
"gimli",
@@ -281,7 +281,6 @@ dependencies = [
"humantime 2.0.1",
"ignore",
"im-rc",
- "itertools 0.10.0",
"jobserver",
"lazy_static",
"lazycell",
@@ -1418,9 +1417,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.23.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
+checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
dependencies = [
"compiler_builtins",
"rustc-std-workspace-alloc",
@@ -1706,15 +1705,6 @@ dependencies = [
"either",
]
-[[package]]
-name = "itertools"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319"
-dependencies = [
- "either",
-]
-
[[package]]
name = "itoa"
version = "0.4.6"
@@ -1933,9 +1923,9 @@ dependencies = [
[[package]]
name = "libz-sys"
-version = "1.1.2"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
+checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66"
dependencies = [
"cc",
"libc",
@@ -2239,7 +2229,6 @@ dependencies = [
"hex 0.4.2",
"libc",
"log",
- "measureme",
"rand 0.8.3",
"rustc-workspace-hack",
"rustc_version",
@@ -2293,9 +2282,9 @@ dependencies = [
[[package]]
name = "object"
-version = "0.22.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397"
+checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
dependencies = [
"compiler_builtins",
"rustc-std-workspace-alloc",
@@ -4613,15 +4602,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "semver"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f3aac57ee7f3272d8395c6e4f502f434f0e289fcd62876f70daa008c20dcabe"
-dependencies = [
- "serde",
-]
-
[[package]]
name = "semver-parser"
version = "0.7.0"
@@ -4794,8 +4774,7 @@ checksum = "da73c8f77aebc0e40c300b93f0a5f1bece7a248a36eee287d4e095f35c7b7d6e"
[[package]]
name = "socket2"
version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2"
+source = "git+https://github.com/rust-lang/socket2?rev=2843d44a3440a2d4b65bb15be275ec2e3e80ee4e#2843d44a3440a2d4b65bb15be275ec2e3e80ee4e"
dependencies = [
"libc",
"winapi",
@@ -4835,7 +4814,7 @@ dependencies = [
"hermit-abi",
"libc",
"miniz_oxide",
- "object 0.22.0",
+ "object 0.24.0",
"panic_abort",
"panic_unwind",
"profiler_builtins",
diff --git a/Cargo.toml b/Cargo.toml
index dedfe45..d169407 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -112,5 +112,8 @@ rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
+# Temporary patch with build fix for Haiku
+"socket2" = { git = "https://github.com/rust-lang/socket2", rev = "2843d44a3440a2d4b65bb15be275ec2e3e80ee4e" }
+
[patch."https://github.com/rust-lang/rust-clippy"]
clippy_lints = { path = "src/tools/clippy/clippy_lints" }
diff --git a/library/backtrace/Cargo.toml b/library/backtrace/Cargo.toml
index 71db617..6f74b2d 100644
--- a/library/backtrace/Cargo.toml
+++ b/library/backtrace/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "backtrace"
-version = "0.3.57"
+version = "0.3.59"
authors = ["The Rust Project Developers"]
+build = "build.rs"
license = "MIT/Apache-2.0"
readme = "README.md"
repository = "https://github.com/rust-lang/backtrace-rs"
@@ -21,8 +22,7 @@ exclude = ['crates/without_debuginfo', 'crates/macos_frames_test', 'crates/line-
[dependencies]
cfg-if = "1.0"
rustc-demangle = "0.1.4"
-backtrace-sys = { path = "crates/backtrace-sys", version = "0.1.35", optional = true, default_features = false }
-libc = { version = "0.2.87", default-features = false }
+libc = { version = "0.2.94", default-features = false }
# Optionally enable the ability to serialize a `Backtrace`, controlled through
# the `serialize-*` features below.
@@ -35,43 +35,32 @@ cpp_demangle = { default-features = false, version = "0.3.0", optional = true }
# Optional dependencies enabled through the `gimli-symbolize` feature, do not
# use these features directly.
-addr2line = { version = "0.14.1", optional = true, default-features = false }
-miniz_oxide = { version = "0.4.0", optional = true, default-features = false }
+addr2line = { version = "0.15.1", default-features = false }
+miniz_oxide = { version = "0.4.0", default-features = false }
[dependencies.object]
-version = "0.23"
-optional = true
+version = "0.24"
default-features = false
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.3", optional = true }
+[build-dependencies]
+# Only needed for Android, but cannot be target dependent
+# https://github.com/rust-lang/cargo/issues/4932
+cc = "1.0.67"
+
[dev-dependencies]
dylib-dep = { path = "crates/dylib-dep" }
libloading = "0.6"
[features]
# By default libstd support and gimli-symbolize is used to symbolize addresses.
-default = ["std", "gimli-symbolize"]
+default = ["std"]
# Include std support. This enables types like `Backtrace`.
std = []
-#=======================================
-# Methods of resolving symbols
-#
-# - gimli-symbolize: use the `gimli-rs/addr2line` crate to symbolicate
-# addresses into file, line, and name using DWARF debug information.
-# - libbacktrace: this feature activates the `backtrace-sys` dependency,
-# building the libbacktrace library found in gcc repos.
-#
-# Note that MSVC unconditionally uses the dbghelp library to symbolize and won't
-# be affected by feature selection here. Also note that it's highly unlikely you
-# want to configure this. If you're having trouble getting backtraces it's
-# likely best to open an issue.
-gimli-symbolize = ["addr2line", "miniz_oxide", "object"]
-libbacktrace = ["backtrace-sys/backtrace-sys"]
-
#=======================================
# Methods of serialization
#
@@ -85,11 +74,13 @@ serialize-serde = ["serde"]
# Only here for backwards compatibility purposes or for internal testing
# purposes. New code should use none of these features.
coresymbolication = []
+dbghelp = []
dladdr = []
+gimli-symbolize = []
kernel32 = []
-unix-backtrace = []
+libbacktrace = []
libunwind = []
-dbghelp = []
+unix-backtrace = []
verify-winapi = [
'winapi/dbghelp',
'winapi/handleapi',
@@ -126,7 +117,7 @@ edition = '2018'
[[test]]
name = "accuracy"
-required-features = ["std", "gimli-symbolize"]
+required-features = ["std"]
edition = '2018'
[[test]]
diff --git a/library/backtrace/build.rs b/library/backtrace/build.rs
new file mode 100644
index 0000000..812fbb1
--- /dev/null
+++ b/library/backtrace/build.rs
@@ -0,0 +1,41 @@
+extern crate cc;
+
+use std::env;
+
+fn main() {
+ match env::var("CARGO_CFG_TARGET_OS").unwrap_or_default().as_str() {
+ "android" => build_android(),
+ _ => {}
+ }
+}
+
+fn build_android() {
+ let expansion = match cc::Build::new().file("src/android-api.c").try_expand() {
+ Ok(result) => result,
+ Err(e) => {
+ println!("failed to run C compiler: {}", e);
+ return;
+ }
+ };
+ let expansion = match std::str::from_utf8(&expansion) {
+ Ok(s) => s,
+ Err(_) => return,
+ };
+ println!("expanded android version detection:\n{}", expansion);
+ let marker = "APIVERSION";
+ let i = match expansion.find(marker) {
+ Some(i) => i,
+ None => return,
+ };
+ let version = match expansion[i + marker.len() + 1..].split_whitespace().next() {
+ Some(s) => s,
+ None => return,
+ };
+ let version = match version.parse::<u32>() {
+ Ok(n) => n,
+ Err(_) => return,
+ };
+ if version >= 21 {
+ println!("cargo:rustc-cfg=feature=\"dl_iterate_phdr\"");
+ }
+}
diff --git a/library/backtrace/crates/as-if-std/Cargo.toml b/library/backtrace/crates/as-if-std/Cargo.toml
index b7cb2a8..36adc20 100644
--- a/library/backtrace/crates/as-if-std/Cargo.toml
+++ b/library/backtrace/crates/as-if-std/Cargo.toml
@@ -15,11 +15,11 @@ bench = false
cfg-if = "1.0"
rustc-demangle = "0.1.4"
libc = { version = "0.2.45", default-features = false }
-addr2line = { version = "0.14.1", default-features = false }
+addr2line = { version = "0.15.1", default-features = false }
miniz_oxide = { version = "0.4.0", default-features = false }
[dependencies.object]
-version = "0.22"
+version = "0.24"
default-features = false
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']
diff --git a/library/backtrace/src/android-api.c b/library/backtrace/src/android-api.c
new file mode 100644
index 0000000..1bfeadf
--- /dev/null
+++ b/library/backtrace/src/android-api.c
@@ -0,0 +1,4 @@
+// Used from the build script to detect the value of the `__ANDROID_API__`
+// builtin #define
+
+APIVERSION __ANDROID_API__
diff --git a/library/backtrace/src/capture.rs b/library/backtrace/src/capture.rs
index 9bd6ce9..e0dd9c4 100644
--- a/library/backtrace/src/capture.rs
+++ b/library/backtrace/src/capture.rs
@@ -249,6 +249,15 @@ impl From<Vec<BacktraceFrame>> for Backtrace {
}
}
+impl From<crate::Frame> for BacktraceFrame {
+ fn from(frame: crate::Frame) -> BacktraceFrame {
+ BacktraceFrame {
+ frame: Frame::Raw(frame),
+ symbols: None,
+ }
+ }
+}
+
impl Into<Vec<BacktraceFrame>> for Backtrace {
fn into(self) -> Vec<BacktraceFrame> {
self.frames
@@ -518,3 +527,29 @@ mod serde_impls {
}
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_frame_conversion() {
+ let mut frames = vec![];
+ crate::trace(|frame| {
+ let converted = BacktraceFrame::from(frame.clone());
+ frames.push(converted);
+ true
+ });
+
+ let mut manual = Backtrace::from(frames);
+ manual.resolve();
+ let frames = manual.frames();
+
+ for frame in frames {
+ println!("{:?}", frame.ip());
+ println!("{:?}", frame.symbol_address());
+ println!("{:?}", frame.module_base_address());
+ println!("{:?}", frame.symbols());
+ }
+ }
+}
diff --git a/library/backtrace/src/symbolize/gimli.rs b/library/backtrace/src/symbolize/gimli.rs
index bcd362c..b7f4965 100644
--- a/library/backtrace/src/symbolize/gimli.rs
+++ b/library/backtrace/src/symbolize/gimli.rs
@@ -85,27 +85,13 @@ struct Context<'a> {
impl<'data> Context<'data> {
fn new(stash: &'data Stash, object: Object<'data>) -> Option<Context<'data>> {
- fn load_section<'data, S>(stash: &'data Stash, obj: &Object<'data>) -> S
- where
- S: gimli::Section<gimli::EndianSlice<'data, Endian>>,
- {
- let data = obj.section(stash, S::section_name()).unwrap_or(&[]);
- S::from(EndianSlice::new(data, Endian))
- }
-
- let dwarf = addr2line::Context::from_sections(
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- load_section(stash, &object),
- gimli::EndianSlice::new(&[], Endian),
- )
+ let sections = gimli::Dwarf::load(|id| -> Result<_, ()> {
+ let data = object.section(stash, id.name()).unwrap_or(&[]);
+ Ok(EndianSlice::new(data, Endian))
+ })
.ok()?;
+ let dwarf = addr2line::Context::from_dwarf(sections).ok()?;
+
Some(Context { dwarf, object })
}
}
@@ -154,6 +140,7 @@ cfg_if::cfg_if! {
target_os = "linux",
target_os = "fuchsia",
target_os = "freebsd",
+ all(target_os = "android", feature = "dl_iterate_phdr"),
),
not(target_env = "uclibc"),
))] {
diff --git a/library/backtrace/src/symbolize/gimli/coff.rs b/library/backtrace/src/symbolize/gimli/coff.rs
index 8a6995e..0c69c58 100644
--- a/library/backtrace/src/symbolize/gimli/coff.rs
+++ b/library/backtrace/src/symbolize/gimli/coff.rs
@@ -3,7 +3,7 @@ use core::convert::TryFrom;
use object::pe::{ImageDosHeader, ImageSymbol};
use object::read::pe::{ImageNtHeaders, ImageOptionalHeader, SectionTable};
use object::read::StringTable;
-use object::{Bytes, LittleEndian as LE};
+use object::LittleEndian as LE;
#[cfg(target_pointer_width = "32")]
type Pe = object::pe::ImageNtHeaders32;
@@ -18,25 +18,25 @@ impl Mapping {
}
pub struct Object<'a> {
- data: Bytes<'a>,
+ data: &'a [u8],
sections: SectionTable<'a>,
symbols: Vec<(usize, &'a ImageSymbol)>,
strings: StringTable<'a>,
}
pub fn get_image_base(data: &[u8]) -> Option<usize> {
- let data = Bytes(data);
let dos_header = ImageDosHeader::parse(data).ok()?;
- let (nt_headers, _, _) = dos_header.nt_headers::<Pe>(data).ok()?;
+ let mut offset = dos_header.nt_headers_offset().into();
+ let (nt_headers, _) = Pe::parse(data, &mut offset).ok()?;
usize::try_from(nt_headers.optional_header().image_base()).ok()
}
impl<'a> Object<'a> {
fn parse(data: &'a [u8]) -> Option<Object<'a>> {
- let data = Bytes(data);
let dos_header = ImageDosHeader::parse(data).ok()?;
- let (nt_headers, _, nt_tail) = dos_header.nt_headers::<Pe>(data).ok()?;
- let sections = nt_headers.sections(nt_tail).ok()?;
+ let mut offset = dos_header.nt_headers_offset().into();
+ let (nt_headers, _) = Pe::parse(data, &mut offset).ok()?;
+ let sections = nt_headers.sections(data, offset).ok()?;
let symtab = nt_headers.symbols(data).ok()?;
let strings = symtab.strings();
let image_base = usize::try_from(nt_headers.optional_header().image_base()).ok()?;
@@ -78,8 +78,7 @@ impl<'a> Object<'a> {
.section_by_name(self.strings, name.as_bytes())?
.1
.pe_data(self.data)
- .ok()?
- .0,
+ .ok()?,
)
}
diff --git a/library/backtrace/src/symbolize/gimli/elf.rs b/library/backtrace/src/symbolize/gimli/elf.rs
index 41a30fe..ee311a8 100644
--- a/library/backtrace/src/symbolize/gimli/elf.rs
+++ b/library/backtrace/src/symbolize/gimli/elf.rs
@@ -29,7 +29,7 @@ pub struct Object<'a> {
/// We could use a literal instead, but this helps ensure correctness.
endian: NativeEndian,
/// The entire file data.
- data: Bytes<'a>,
+ data: &'a [u8],
sections: SectionTable<'a, Elf>,
strings: StringTable<'a>,
/// List of pre-parsed and sorted symbols by base address.
@@ -38,7 +38,6 @@ pub struct Object<'a> {
impl<'a> Object<'a> {
fn parse(data: &'a [u8]) -> Option<Object<'a>> {
- let data = object::Bytes(data);
let elf = Elf::parse(data).ok()?;
let endian = elf.endian().ok()?;
let sections = elf.sections(endian, data).ok()?;
@@ -90,7 +89,7 @@ impl<'a> Object<'a> {
pub fn section(&self, stash: &'a Stash, name: &str) -> Option<&'a [u8]> {
if let Some(section) = self.section_header(name) {
- let mut data = section.data(self.endian, self.data).ok()?;
+ let mut data = Bytes(section.data(self.endian, self.data).ok()?);
// Check for DWARF-standard (gABI) compression, i.e., as generated
// by ld's `--compress-debug-sections=zlib-gabi` flag.
@@ -131,7 +130,7 @@ impl<'a> Object<'a> {
}
})
.next()?;
- let mut data = compressed_section.data(self.endian, self.data).ok()?;
+ let mut data = Bytes(compressed_section.data(self.endian, self.data).ok()?);
if data.read_bytes(8).ok()?.0 != b"ZLIB\0\0\0\0" {
return None;
}
diff --git a/library/backtrace/src/symbolize/gimli/libs_haiku.rs b/library/backtrace/src/symbolize/gimli/libs_haiku.rs
index f80686a..87e023e 100644
--- a/library/backtrace/src/symbolize/gimli/libs_haiku.rs
+++ b/library/backtrace/src/symbolize/gimli/libs_haiku.rs
@@ -7,6 +7,7 @@
use super::mystd::borrow::ToOwned;
use super::mystd::ffi::{CStr, OsStr};
+use super::mystd::mem::MaybeUninit;
use super::mystd::os::unix::prelude::*;
use super::{Library, LibrarySegment, Vec};
@@ -14,7 +15,7 @@ pub(super) fn native_libraries() -> Vec<Library> {
let mut libraries: Vec<Library> = Vec::new();
unsafe {
- let mut info = mem::MaybeUninit::<libc::image_info>::zeroed();
+ let mut info = MaybeUninit::<libc::image_info>::zeroed();
let mut cookie: i32 = 0;
// Load the first image to get a valid info struct
let mut status =
diff --git a/library/backtrace/src/symbolize/gimli/libs_macos.rs b/library/backtrace/src/symbolize/gimli/libs_macos.rs
index 2b6b671..1c58a81 100644
--- a/library/backtrace/src/symbolize/gimli/libs_macos.rs
+++ b/library/backtrace/src/symbolize/gimli/libs_macos.rs
@@ -19,7 +19,7 @@ pub(super) fn native_libraries() -> Vec<Library> {
fn native_library(i: u32) -> Option<Library> {
use object::macho;
use object::read::macho::{MachHeader, Segment};
- use object::{Bytes, NativeEndian};
+ use object::NativeEndian;
// Fetch the name of this library which corresponds to the path of
// where to load it as well.
@@ -47,7 +47,7 @@ fn native_library(i: u32) -> Option<Library> {
header as *const _ as *const u8,
mem::size_of_val(header) + header.sizeofcmds.get(endian) as usize,
);
- (header.load_commands(endian, Bytes(data)).ok()?, endian)
+ (header.load_commands(endian, data).ok()?, endian)
}
macho::MH_MAGIC_64 => {
let endian = NativeEndian;
@@ -56,7 +56,7 @@ fn native_library(i: u32) -> Option<Library> {
header as *const _ as *const u8,
mem::size_of_val(header) + header.sizeofcmds.get(endian) as usize,
);
- (header.load_commands(endian, Bytes(data)).ok()?, endian)
+ (header.load_commands(endian, data).ok()?, endian)
}
_ => return None,
}
diff --git a/library/backtrace/src/symbolize/gimli/macho.rs b/library/backtrace/src/symbolize/gimli/macho.rs
index 4b96bf1..cdd24bd 100644
--- a/library/backtrace/src/symbolize/gimli/macho.rs
+++ b/library/backtrace/src/symbolize/gimli/macho.rs
@@ -20,7 +20,7 @@ impl Mapping {
// First up we need to load the unique UUID which is stored in the macho
// header of the file we're reading, specified at `path`.
let map = super::mmap(path)?;
- let (macho, data) = find_header(Bytes(&map))?;
+ let (macho, data) = find_header(&map)?;
let endian = macho.endian().ok()?;
let uuid = macho.uuid(endian, data).ok()??;
@@ -40,7 +40,7 @@ impl Mapping {
// file. This should have the symbol table for at least some
// symbolication purposes.
Mapping::mk(map, |data, stash| {
- let (macho, data) = find_header(Bytes(data))?;
+ let (macho, data) = find_header(data)?;
let endian = macho.endian().ok()?;
let obj = Object::parse(macho, endian, data)?;
Context::new(stash, obj)
@@ -73,7 +73,7 @@ impl Mapping {
let entry = entry.ok()?;
let map = super::mmap(&entry.path())?;
let candidate = Mapping::mk(map, |data, stash| {
- let (macho, data) = find_header(Bytes(data))?;
+ let (macho, data) = find_header(data)?;
let endian = macho.endian().ok()?;
let entry_uuid = macho.uuid(endian, data).ok()??;
if entry_uuid != uuid {
@@ -91,7 +91,7 @@ impl Mapping {
}
}
-fn find_header(mut data: Bytes<'_>) -> Option<(&'_ Mach, Bytes<'_>)> {
+fn find_header(data: &'_ [u8]) -> Option<(&'_ Mach, &'_ [u8])> {
use object::endian::BigEndian;
let desired_cpu = || {
@@ -108,6 +108,7 @@ fn find_header(mut data: Bytes<'_>) -> Option<(&'_ Mach, Bytes<'_>)> {
}
};
+ let mut data = Bytes(data);
match data
.clone()
.read::<object::endian::U32<NativeEndian>>()
@@ -149,13 +150,13 @@ fn find_header(mut data: Bytes<'_>) -> Option<(&'_ Mach, Bytes<'_>)> {
_ => return None,
}
- Mach::parse(data).ok().map(|h| (h, data))
+ Mach::parse(data.0).ok().map(|h| (h, data.0))
}
// This is used both for executables/libraries and source object files.
pub struct Object<'a> {
endian: NativeEndian,
- data: Bytes<'a>,
+ data: &'a [u8],
dwarf: Option<&'a [MachSection]>,
syms: Vec<(&'a [u8], u64)>,
syms_sort_by_name: bool,
@@ -166,7 +167,7 @@ pub struct Object<'a> {
}
impl<'a> Object<'a> {
- fn parse(mach: &'a Mach, endian: NativeEndian, data: Bytes<'a>) -> Option<Object<'a>> {
+ fn parse(mach: &'a Mach, endian: NativeEndian, data: &'a [u8]) -> Option<Object<'a>> {
let is_object = mach.filetype(endian) == object::macho::MH_OBJECT;
let mut dwarf = None;
let mut syms = Vec::new();
@@ -181,7 +182,7 @@ impl<'a> Object<'a> {
dwarf = segment.sections(endian, section_data).ok();
}
} else if let Some(symtab) = command.symtab().ok()? {
- let symbols = symtab.symbols::<Mach>(endian, data).ok()?;
+ let symbols = symtab.symbols::<Mach, _>(endian, data).ok()?;
syms = symbols
.iter()
.filter_map(|nlist: &MachNlist| {
@@ -230,7 +231,7 @@ impl<'a> Object<'a> {
&& &section_name[2..] == &name[1..]
}
})?;
- Some(section.data(self.endian, self.data).ok()?.0)
+ Some(section.data(self.endian, self.data).ok()?)
}
pub fn search_symtab<'b>(&'b self, addr: u64) -> Option<&'b [u8]> {
@@ -299,9 +300,9 @@ fn object_mapping(path: &[u8]) -> Option<Mapping> {
.members()
.filter_map(Result::ok)
.find(|m| m.name() == member_name)?;
- Bytes(member.data())
+ member.data(data).ok()?
}
- None => Bytes(data),
+ None => data,
};
let (macho, data) = find_header(data)?;
let endian = macho.endian().ok()?;
diff --git a/library/backtrace/src/symbolize/mod.rs b/library/backtrace/src/symbolize/mod.rs
index 961c63d..699d54e 100644
--- a/library/backtrace/src/symbolize/mod.rs
+++ b/library/backtrace/src/symbolize/mod.rs
@@ -471,17 +471,6 @@ cfg_if::cfg_if! {
mod dbghelp;
use dbghelp as imp;
} else if #[cfg(all(
- feature = "libbacktrace",
- any(unix, all(windows, not(target_vendor = "uwp"), target_env = "gnu")),
- not(target_os = "fuchsia"),
- not(target_os = "emscripten"),
- not(target_env = "uclibc"),
- not(target_env = "libnx"),
- ))] {
- mod libbacktrace;
- use libbacktrace as imp;
- } else if #[cfg(all(
- feature = "gimli-symbolize",
any(unix, windows),
not(target_vendor = "uwp"),
not(target_os = "emscripten"),
diff --git a/library/backtrace/tests/accuracy/main.rs b/library/backtrace/tests/accuracy/main.rs
index a2aba07..54409c1 100644
--- a/library/backtrace/tests/accuracy/main.rs
+++ b/library/backtrace/tests/accuracy/main.rs
@@ -20,8 +20,6 @@ fn doit() {
// Skip musl which is by default statically linked and doesn't support
// dynamic libraries.
!cfg!(target_env = "musl")
- // Skip MinGW on libbacktrace which doesn't have support for DLLs.
- && !(cfg!(windows) && cfg!(target_env = "gnu") && cfg!(feature = "libbacktrace"))
// Skip Miri, since it doesn't support dynamic libraries.
&& !cfg!(miri)
{
diff --git a/library/backtrace/tests/smoke.rs b/library/backtrace/tests/smoke.rs
index 0c990e0..683a6f0 100644
--- a/library/backtrace/tests/smoke.rs
+++ b/library/backtrace/tests/smoke.rs
@@ -1,38 +1,6 @@
use backtrace::Frame;
use std::thread;
-// Reflects the conditional compilation logic at end of src/symbolize/mod.rs
-static NOOP: bool = false;
-static DBGHELP: bool = !NOOP
- && cfg!(all(
- windows,
- target_env = "msvc",
- not(target_vendor = "uwp")
- ));
-static LIBBACKTRACE: bool = !NOOP
- && !DBGHELP
- && cfg!(all(
- feature = "libbacktrace",
- any(
- unix,
- all(windows, not(target_vendor = "uwp"), target_env = "gnu")
- ),
- not(target_os = "fuchsia"),
- not(target_os = "emscripten"),
- not(target_env = "uclibc"),
- not(target_env = "libnx"),
- ));
-static GIMLI_SYMBOLIZE: bool = !NOOP
- && !DBGHELP
- && !LIBBACKTRACE
- && cfg!(all(
- feature = "gimli-symbolize",
- any(unix, windows),
- not(target_vendor = "uwp"),
- not(target_os = "emscripten"),
- ));
-static MIRI_SYMBOLIZE: bool = cfg!(miri);
-
#[test]
// FIXME: shouldn't ignore this test on i686-msvc, unsure why it's failing
#[cfg_attr(all(target_arch = "x86", target_env = "msvc"), ignore)]
@@ -159,8 +127,6 @@ fn smoke_test_frames() {
}
let mut resolved = 0;
- let can_resolve = LIBBACKTRACE || GIMLI_SYMBOLIZE || MIRI_SYMBOLIZE;
- let can_resolve_cols = GIMLI_SYMBOLIZE || MIRI_SYMBOLIZE;
let mut name = None;
let mut addr = None;
@@ -175,31 +141,22 @@ fn smoke_test_frames() {
line = sym.lineno();
file = sym.filename().map(|v| v.to_path_buf());
});
+ assert!(resolved > 0);
- // dbghelp doesn't always resolve symbols right now
- match resolved {
- 0 => return assert!(!can_resolve),
- _ => {}
- }
-
- if can_resolve {
- let name = name.expect("didn't find a name");
+ let name = name.expect("didn't find a name");
- // in release mode names get weird as functions can get merged
- // together with `mergefunc`, so only assert this in debug mode
- if cfg!(debug_assertions) {
- assert!(
- name.contains(expected_name),
- "didn't find `{}` in `{}`",
- expected_name,
- name
- );
- }
+ // in release mode names get weird as functions can get merged
+ // together with `mergefunc`, so only assert this in debug mode
+ if cfg!(debug_assertions) {
+ assert!(
+ name.contains(expected_name),
+ "didn't find `{}` in `{}`",
+ expected_name,
+ name
+ );
}
- if can_resolve {
- addr.expect("didn't find a symbol");
- }
+ addr.expect("didn't find a symbol");
if cfg!(debug_assertions) {
let line = line.expect("didn't find a line number");
@@ -221,7 +178,9 @@ fn smoke_test_frames() {
expected_line
);
}
- if can_resolve_cols {
+
+ // dbghelp on MSVC doesn't support column numbers
+ if !cfg!(target_env = "msvc") {
let col = col.expect("didn't find a column number");
if expected_col != 0 {
assert!(
@@ -321,9 +280,8 @@ fn sp_smoke_test() {
let mut is_recursive_stack_references = false;
backtrace::resolve(frame.ip(), |sym| {
- is_recursive_stack_references |= (LIBBACKTRACE || GIMLI_SYMBOLIZE)
- && sym
- .name()
+ is_recursive_stack_references |=
+ sym.name()
.and_then(|name| name.as_str())
.map_or(false, |name| {
eprintln!("name = {}", name);
diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml
index 415d874..5751a1a 100644
--- a/library/std/Cargo.toml
+++ b/library/std/Cargo.toml
@@ -24,11 +24,11 @@ hashbrown = { version = "0.11", default-features = false, features = ['rustc-dep
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = ['rustc-dep-of-std'] }
# Dependencies of the `backtrace` crate
-addr2line = { version = "0.14.0", optional = true, default-features = false }
+addr2line = { version = "0.15.1", optional = true, default-features = false }
rustc-demangle = { version = "0.1.18", features = ['rustc-dep-of-std'] }
miniz_oxide = { version = "0.4.0", optional = true, default-features = false }
[dependencies.object]
-version = "0.22"
+version = "0.24"
optional = true
default-features = false
features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive']
diff --git a/src/llvm-project/llvm/lib/Support/CMakeLists.txt b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
index cdee114..1c805e3 100644
--- a/src/llvm-project/llvm/lib/Support/CMakeLists.txt
+++ b/src/llvm-project/llvm/lib/Support/CMakeLists.txt
@@ -36,6 +36,10 @@ elseif( CMAKE_HOST_UNIX )
if( FUCHSIA )
set(system_libs ${system_libs} zircon)
endif()
+ if ( HAIKU )
+ add_definitions(-D_BSD_SOURCE)
+ set(system_libs ${system_libs} bsd)
+ endif()
endif( MSVC OR MINGW )
# Delay load shell32.dll if possible to speed up process startup.
diff --git a/src/llvm-project/llvm/lib/Support/Unix/Program.inc b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
index fb56fa4..d42681f 100644
--- a/src/llvm-project/llvm/lib/Support/Unix/Program.inc
+++ b/src/llvm-project/llvm/lib/Support/Unix/Program.inc
@@ -452,8 +452,12 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
if (ProcStat) {
std::chrono::microseconds UserT = toDuration(Info.ru_utime);
std::chrono::microseconds KernelT = toDuration(Info.ru_stime);
+#ifndef __HAIKU__
uint64_t PeakMemory = static_cast<uint64_t>(Info.ru_maxrss);
*ProcStat = ProcessStatistics{UserT + KernelT, UserT, PeakMemory};
+#else
+ *ProcStat = ProcessStatistics{UserT + KernelT, UserT, 0};
+#endif
}
// Return the proper exit status. Detect error conditions
diff --git a/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt b/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
index 90b4ca6..c9f9a53 100644
--- a/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
+++ b/src/llvm-project/llvm/tools/llvm-jitlink/CMakeLists.txt
@@ -24,6 +24,10 @@ add_llvm_tool(llvm-jitlink
llvm-jitlink-macho.cpp
)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink PRIVATE socket nsl)
endif()
diff --git a/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt b/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
index a183857..37af9a5 100644
--- a/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
+++ b/src/llvm-project/llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt
@@ -12,6 +12,10 @@ add_llvm_utility(llvm-jitlink-executor
)
message(${CMAKE_SYSTEM_NAME})
+if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
+ target_link_libraries(llvm-jitlink-executor PRIVATE network)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink-executor PRIVATE socket)
endif()
--
2.30.2

View File

@@ -1,112 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2016, The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
srcGitRev="b515c198d30b5d5e18a15bd167949032659f81dc"
SOURCE_URI="https://github.com/nielx/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="ced1585902f9ad107726345ef8873effb03fda72b1d897fd885cd815fd5a3cdf"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="57315f7e07d09b6f0341ebbcd50dded6c20d782f"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="244e97dbad67f752a4c394407e0929dbf44ed520a2dd9f19ebf86f2919112c3e"
srcGitRev_3="eee85639922229007a63fc17ba9d1144ef84d53d"
SOURCE_URI_3="https://github.com/nielx/llvm/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="0a7a666426467e761bbd240d3f6e6e59ad2286f0e52edd2bac8570051c76a324"
srcGitRev_4="f96680f5a059069a320f62568d5afc88db9a7ec0"
SOURCE_URI_4="https://github.com/nielx/rust-installer/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="d5f79186cd4b9221c07cf89b3f038aa073674e13ddd35f2e7e22486b8eb16020"
srcGitRev_5="4638c60dedfa581fd5fa7c6420d8f32274c9ca0b"
SOURCE_URI_5="https://github.com/rust-lang/hoedown/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="a5a0a957544a5f8cf08c0b67cb503f294b0e1bb20c65766abf9dc3c683d3b9c5"
srcGitRev_6="e1a938af495e2ba7477204fb4f24ccc902605e75"
SOURCE_URI_6="https://github.com/nielx/libc/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="5996751d47d363932fb130dba61257e6ed7efc439bcac0244e4d9768c6b3142f"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:rust_gdb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:file
cmd:find
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:rustc == 1.9.0
cmd:sed
cmd:tar
cmd:which
"
BUILD()
{
rm -rf src/compiler-rt src/llvm src/rust-installer src/liblibc src/rt/hoedown
ln -sf /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
ln -sf /sources-3/llvm-$srcGitRev_3 src/llvm
ln -sf /sources-4/rust-installer-$srcGitRev_4 src/rust-installer
ln -sf /sources-5/hoedown-$srcGitRev_5 src/rt/hoedown
ln -sf /sources-6/libc-$srcGitRev_6 src/liblibc
# Do not use runConfigure: it generates too much noise, and it creates a totally impossible directory structure
#runConfigure --omit-dirs "docDir libExecDir dataRootDir includeDir sharedStateDir sbinDir binDir oldIncludeDir" ./configure --disable-jemalloc --build=i686-unknown-haiku --host=i686-unknown-haiku --target=i686-unknown-haiku
./configure --prefix=$prefix --mandir=$manDir --disable-jemalloc --enable-local-rust --local-rust-root=/boot/system/ --release-channel=stable
make
}
INSTALL()
{
make install
# move documentation to the proper place
mkdir -p $developDocDir
mv $prefix/share/doc/rust/* $developDocDir
rm -rf $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
# move the libs to the x86 subdir
mkdir -p $libDir
mv $prefix/lib/*.so $libDir
fi
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
mkdir -p $developLibDir
mv $prefix/lib/rustlib $developLibDir
cd $prefix/lib
ln -s ../$relativeDevelopLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
make check
}

View File

@@ -1,113 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2016, The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
srcGitRev="e4511258789ee6cf16b23105cf6d691ef1c4a9ca"
SOURCE_URI="https://github.com/nielx/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="71a22a71378d441c00cc17dfb76b32bbc69469a24d460b5e63ed918015f463a0"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="ac3d1cda612edccb6f1da53cbf7716e248405f3b"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="b1c6086509231af13ad8293dd98695e0ac17d1a76808e3fdd30c0ac070abe0aa"
srcGitRev_3="f96680f5a059069a320f62568d5afc88db9a7ec0"
SOURCE_URI_3="https://github.com/nielx/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="d5f79186cd4b9221c07cf89b3f038aa073674e13ddd35f2e7e22486b8eb16020"
srcGitRev_4="4638c60dedfa581fd5fa7c6420d8f32274c9ca0b"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="a5a0a957544a5f8cf08c0b67cb503f294b0e1bb20c65766abf9dc3c683d3b9c5"
srcGitRev_5="9b1459b6237748b525e0a4ee33f63ee3e1735593"
SOURCE_URI_5="https://github.com/nielx/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="602d0875cd11eaeac39c1c4e4edab26bc6f99cfefebac7a5bd00066c0962faed"
srcGitRev_6="0bd1123d8236f2587866b786479bef0aef3f6fe9"
SOURCE_URI_6="https://github.com/nielx/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="920e505cc75b8332cbbcb7337f8e5596bdf629a1b03be487926fcfbfb6009224"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:rust_gdb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
binutils${secondaryArchSuffix} == 2.26.1_2016_07_22 # version 2.28.1 will crash when building llvm
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:file
cmd:find
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:rustc == 1.10.0
cmd:sed
cmd:tar
cmd:which
"
BUILD()
{
rm -rf src/compiler-rt src/llvm src/rust-installer src/liblibc src/rt/hoedown
ln -sf /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
ln -sf /sources-3/rust-installer-$srcGitRev_3 src/rust-installer
ln -sf /sources-4/hoedown-$srcGitRev_4 src/rt/hoedown
ln -sf /sources-5/libc-$srcGitRev_5 src/liblibc
ln -sf /sources-6/llvm-$srcGitRev_6 src/llvm
# Do not use runConfigure: it generates too much noise, and it creates a totally impossible directory structure
#runConfigure --omit-dirs "docDir libExecDir dataRootDir includeDir sharedStateDir sbinDir binDir oldIncludeDir" ./configure --disable-jemalloc --build=i686-unknown-haiku --host=i686-unknown-haiku --target=i686-unknown-haiku
./configure --prefix=$prefix --mandir=$manDir --disable-jemalloc --enable-local-rust --local-rust-root=/boot/system/ --release-channel=stable
make
}
INSTALL()
{
make install
# move documentation to the proper place
mkdir -p $developDocDir
mv $prefix/share/doc/rust/* $developDocDir
rm -rf $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
# move the libs to the x86 subdir
mkdir -p $libDir
mv $prefix/lib/*.so $libDir
fi
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
mkdir -p $developLibDir
mv $prefix/lib/rustlib $developLibDir
cd $prefix/lib
ln -s ../$relativeDevelopLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
make check
}

View File

@@ -1,115 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2016, The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
srcGitRev="b495ea57163d858facb956a601d78c641149631f"
SOURCE_URI="https://github.com/nielx/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="cd5012f390567e6da592eec525e2373f50a5541a51f9c0540c24be0aad8d4f05"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="8598065bd965d9713bfafb6c1e766d63a7b17b89"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="19cab27b6c6906982a6213c745b49f37c75834af1106f2acafc788ffadd84ff7"
srcGitRev_3="d66270786797c98a4aa43dc0e5247e2942bb8c46"
SOURCE_URI_3="https://github.com/nielx/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="6d1e18819a61c6cef25c58d50033eb160d32187e755558a486aae73ce2c9e852"
srcGitRev_4="a3736a0a1907cbc8bf619708738815a5fd789c80"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="29da85607df523a165c1b01a378f929a0b37b75969119b6ec373d95576978b13"
srcGitRev_5="6c83cf726a3b6b2d1a10ecf932005ba15cf84f23"
SOURCE_URI_5="https://github.com/nielx/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="e7bdfce7e463c9984d43555951944f9f764190934676e0dbbcdad1f5175986dc"
srcGitRev_6="ac1c94226e9fa17005ce7e2dd52dd6d1875f3137"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="57638407e7713018e5cd4c0de29b52e976ddb248db122c13d6ded89f5f3243ce"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:rust_gdb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
binutils${secondaryArchSuffix} == 2.26.1_2016_07_22 # version 2.28.1 will crash when building llvm
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:file
cmd:find
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:rustc == 1.11.0
cmd:sed
cmd:tar
cmd:which
"
BUILD()
{
rm -rf src/compiler-rt src/llvm src/rust-installer src/liblibc src/rt/hoedown
ln -sf /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
ln -sf /sources-3/rust-installer-$srcGitRev_3 src/rust-installer
ln -sf /sources-4/hoedown-$srcGitRev_4 src/rt/hoedown
ln -sf /sources-5/libc-$srcGitRev_5 src/liblibc
ln -sf /sources-6/llvm-$srcGitRev_6 src/llvm
# Do not use runConfigure: it generates too much noise, and it creates a totally impossible directory structure
#runConfigure --omit-dirs "docDir libExecDir dataRootDir includeDir sharedStateDir sbinDir binDir oldIncludeDir" ./configure --disable-jemalloc --build=i686-unknown-haiku --host=i686-unknown-haiku --target=i686-unknown-haiku
./configure --prefix=$prefix --mandir=$manDir --disable-jemalloc \
--enable-local-rust --local-rust-root=/boot/system/ \
--release-channel=stable
make
}
INSTALL()
{
make install
# move documentation to the proper place
mkdir -p $developDocDir
mv $prefix/share/doc/rust/* $developDocDir
rm -rf $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
# move the libs to the x86 subdir
mkdir -p $libDir
mv $prefix/lib/*.so $libDir
fi
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
mkdir -p $developLibDir
mv $prefix/lib/rustlib $developLibDir
cd $prefix/lib
ln -s ../$relativeDevelopLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
make check
}

View File

@@ -1,117 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2016, The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
srcGitRev="2c6933acc05c61e041be764cb1331f6281993f3f"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="b17dce437b064a7c7954e4e40a3f1351d3cc33db8efeedbaeeb39e842b77fc8f"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="ecd2b1f6d689d5afbf5debe8afb3739337323852"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="f9814fd94717dec7ec2c09ecc17fe6ef25c8b2e95ad16ced020e864b3ad763f5"
srcGitRev_3="4f994850808a572e2cc8d43f968893c8e942e9bf"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="dc7240d60a869fa24a68c8734fb7c810c27cca0a6dad52df6279865e4e8e7fae"
srcGitRev_4="a3736a0a1907cbc8bf619708738815a5fd789c80"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="29da85607df523a165c1b01a378f929a0b37b75969119b6ec373d95576978b13"
srcGitRev_5="ebeab042e6bb14a447627b57ed9a493e2cc0e095"
SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="b0896666125315cdcd8cdef98c51529047f59a656de78503fa69782d5376beb7"
srcGitRev_6="ac1c94226e9fa17005ce7e2dd52dd6d1875f3137"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="57638407e7713018e5cd4c0de29b52e976ddb248db122c13d6ded89f5f3243ce"
PATCHES="rust-$portVersion.patchset"
PATCHES_3="rust-installer-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:rust_gdb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
binutils${secondaryArchSuffix} == 2.26.1_2016_07_22 # version 2.28.1 will crash when building llvm
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:file
cmd:find
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:rustc == 1.12.1
cmd:sed
cmd:tar
cmd:which
"
BUILD()
{
rm -rf src/compiler-rt src/llvm src/rust-installer src/liblibc src/rt/hoedown
ln -sf /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
ln -sf /sources-3/rust-installer-$srcGitRev_3 src/rust-installer
ln -sf /sources-4/hoedown-$srcGitRev_4 src/rt/hoedown
ln -sf /sources-5/libc-$srcGitRev_5 src/liblibc
ln -sf /sources-6/llvm-$srcGitRev_6 src/llvm
# Do not use runConfigure: it generates too much noise, and it creates a totally impossible directory structure
#runConfigure --omit-dirs "docDir libExecDir dataRootDir includeDir sharedStateDir sbinDir binDir oldIncludeDir" ./configure --disable-jemalloc --build=i686-unknown-haiku --host=i686-unknown-haiku --target=i686-unknown-haiku
./configure --prefix=$prefix --mandir=$manDir --disable-jemalloc \
--enable-local-rust --local-rust-root=/boot/system/ \
--release-channel=stable
make
}
INSTALL()
{
make install
# move documentation to the proper place
mkdir -p $developDocDir
mv $prefix/share/doc/rust/* $developDocDir
rm -rf $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
# move the libs to the x86 subdir
mkdir -p $libDir
mv $prefix/lib/*.so $libDir
fi
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
mkdir -p $developLibDir
mv $prefix/lib/rustlib $developLibDir
cd $prefix/lib
ln -s ../$relativeDevelopLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
make check
}

View File

@@ -1,117 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2016, The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
srcGitRev="1.14.0"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="3517ed84d1d407e3ee819298970d153e9922618295716bcc3ecaec35a8716ddf"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="3bc0272cab9fdcfc2ef4df9625ec3c9d5909db79"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="92eecb8920cadb1b87aec923a262bbc5825ec2d7d71a83659a949efc76d5c00d"
srcGitRev_3="4f994850808a572e2cc8d43f968893c8e942e9bf"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="dc7240d60a869fa24a68c8734fb7c810c27cca0a6dad52df6279865e4e8e7fae"
srcGitRev_4="a3736a0a1907cbc8bf619708738815a5fd789c80"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="29da85607df523a165c1b01a378f929a0b37b75969119b6ec373d95576978b13"
srcGitRev_5="7d9b71f0971f8fa196d864d7071f216a59036d6e"
SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="51d3ee20ca090493f900ef8be6b3df930848a35f1a79553c61c4c7431da90e4b"
srcGitRev_6="c1d962263bf76a10bea0c761621fcd98d6214b2e"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="8f35394fcb4be0cf9cba18288b6ac7d496c7829f5a6ce2212794019805df8030"
PATCHES="rust-$portVersion.patchset"
PATCHES_3="rust-installer-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:rust_gdb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
binutils${secondaryArchSuffix} == 2.26.1_2016_07_22 # version 2.28.1 will crash when building llvm
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:file
cmd:find
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:rustc == 1.13.0
cmd:sed
cmd:tar
cmd:which
"
BUILD()
{
rm -rf src/compiler-rt src/llvm src/rust-installer src/liblibc src/rt/hoedown
ln -sf /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
ln -sf /sources-3/rust-installer-$srcGitRev_3 src/rust-installer
ln -sf /sources-4/hoedown-$srcGitRev_4 src/rt/hoedown
ln -sf /sources-5/libc-$srcGitRev_5 src/liblibc
ln -sf /sources-6/llvm-$srcGitRev_6 src/llvm
# Do not use runConfigure: it generates too much noise, and it creates a totally impossible directory structure
#runConfigure --omit-dirs "docDir libExecDir dataRootDir includeDir sharedStateDir sbinDir binDir oldIncludeDir" ./configure --disable-jemalloc --build=i686-unknown-haiku --host=i686-unknown-haiku --target=i686-unknown-haiku
./configure --prefix=$prefix --mandir=$manDir --disable-jemalloc \
--enable-local-rust --local-rust-root=/boot/system/ \
--release-channel=stable
make
}
INSTALL()
{
make install
# move documentation to the proper place
mkdir -p $developDocDir
mv $prefix/share/doc/rust/* $developDocDir
rm -rf $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
# move the libs to the x86 subdir
mkdir -p $libDir
mv $prefix/lib/*.so $libDir
fi
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
mkdir -p $developLibDir
mv $prefix/lib/rustlib $developLibDir
cd $prefix/lib
ln -s ../$relativeDevelopLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
make check
}

View File

@@ -1,150 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
LICENSE="MIT"
COPYRIGHT="2017, The Rust Project Developers"
srcGitRev="1.15.1"
srcGitRev_2="a8fc4c169fac43a5dc204d4fd56ddb1739f8c178"
srcGitRev_3="4f994850808a572e2cc8d43f968893c8e942e9bf"
srcGitRev_4="a3736a0a1907cbc8bf619708738815a5fd789c80"
srcGitRev_5="0ac39c5ccf6a04395b7c40dd62321cb91f63f160"
srcGitRev_6="ceb177eeefa7d67ca29230d2e7e8584f97d4fdad"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev_5.tar.gz"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
SOURCE_URI_7="http://rust-on-haiku.com/downloads/76#noarchive"
SOURCE_URI_8="http://rust-on-haiku.com/downloads/77#noarchive"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_FILENAME_7="cargo-0.16.0-i686.tar.gz"
SOURCE_FILENAME_8="cargo-0.16.0-x86_64.tar.gz"
CHECKSUM_SHA256="c9e880a6eb72e9ec689139844ba82e956aad6d69f11e89114a47fb7858d2cef0"
CHECKSUM_SHA256_2="7d143e0025eb634de5dd2c4ceff22f632cfa065ebbf213068ccacff124732034"
CHECKSUM_SHA256_3="dc7240d60a869fa24a68c8734fb7c810c27cca0a6dad52df6279865e4e8e7fae"
CHECKSUM_SHA256_4="29da85607df523a165c1b01a378f929a0b37b75969119b6ec373d95576978b13"
CHECKSUM_SHA256_5="17694d9a1e09153237f2ce85f9c5e1d632b97ab9a0f688ba27da31c4fecbc400"
CHECKSUM_SHA256_6="0414d14ba98eb1659180a00e78d002b50a6494e6b596145d6fb4262cbb76019b"
CHECKSUM_SHA256_7="d92d38cbcdbb491591348d302fe6d079122e12650de9f0e2e9a5a40e7e2504f1"
CHECKSUM_SHA256_8="54e9062464dbff4b11b91831520a7ecd7b539742871ed43553b2d6a8cd6b7d35"
SOURCE_DIR="rust-$srcGitRev"
SOURCE_DIR_7="cargo-i686"
SOURCE_DIR_8="cargo-x86_64"
PATCHES="rust-$portVersion.patchset"
PATCHES_3="rust-installer-$portVersion.patchset"
REVISION="2"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
# It is an explicit choice to not provide cmd:rustc$secondaryArchSuffix
# The compiler uses relative paths to itself to find libs (in particular
# the *rlib libraries, which is why those are symlinked in the INSTALL()
# phase). As rust will never compile with gcc2, this will not conflict
# with a 'vanilla' package.
# As for cmd:cargo, cargo does not have any paths hardcoded. Putting the
# binary in a proper place in a secondary architecture, will remind the user
# to use 'setarch x86', which is required to have rust call the proper linker.
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
cmd:rust_gdb = $portVersion
cmd:cargo$secondaryArchSuffix = 0.16.0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
binutils${secondaryArchSuffix} == 2.26.1_2016_07_22 # version 2.28.1 will crash when building llvm
"
BUILD_PREREQUIRES="
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python2
cmd:sed
cmd:find
cmd:grep
cmd:file
cmd:git
cmd:tar
cmd:which
cmd:rustc == 1.14.0
cmd:cmake
"
BUILD()
{
rm -rf src/compiler-rt src/llvm src/rust-installer src/liblibc src/rt/hoedown
ln -sf /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
ln -sf /sources-3/rust-installer-$srcGitRev_3 src/rust-installer
ln -sf /sources-4/hoedown-$srcGitRev_4 src/rt/hoedown
ln -sf /sources-5/libc-$srcGitRev_5 src/liblibc
ln -sf /sources-6/llvm-$srcGitRev_6 src/llvm
# Do not use runConfigure: it generates too much noise, and it creates a totally impossible directory structure
#runConfigure --omit-dirs "docDir libExecDir dataRootDir includeDir sharedStateDir sbinDir binDir oldIncludeDir" ./configure --disable-jemalloc --build=i686-unknown-haiku --host=i686-unknown-haiku --target=i686-unknown-haiku
./configure --prefix=$prefix --mandir=$manDir --disable-jemalloc \
--enable-local-rust --local-rust-root=/boot/system/ \
--disable-rustbuild --release-channel=stable
make
}
INSTALL()
{
make install
# move documentation to the proper place
mkdir -p $developDocDir
mv $prefix/share/doc/rust/* $developDocDir
rm -rf $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
# move the libs to the x86 subdir
mkdir -p $libDir
mv $prefix/lib/*.so $libDir
fi
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
mkdir -p $developLibDir
mv $prefix/lib/rustlib $developLibDir
cd $prefix/lib
ln -s ../$relativeDevelopLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
# install the prebuilt cargo binaries
if [ $effectiveTargetArchitecture = x86 ]; then
cd /sources-7/cargo-i686
tar xvfz $SOURCE_FILENAME_7
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
cd /sources-8/cargo-x86_64
tar xvfz $SOURCE_FILENAME_8
fi
mkdir -p $binDir
cp cargo $binDir
}
TEST()
{
make check
}

View File

@@ -1,172 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2017, The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.17.0"
srcGitRev="1.16.0"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="b7ec2d24d41ef2c27b1883d54f44a3c0a2eeecaf8c7abc1855f3171f3e0392cb"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="a8fc4c169fac43a5dc204d4fd56ddb1739f8c178"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="7d143e0025eb634de5dd2c4ceff22f632cfa065ebbf213068ccacff124732034"
srcGitRev_3="4f994850808a572e2cc8d43f968893c8e942e9bf"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="dc7240d60a869fa24a68c8734fb7c810c27cca0a6dad52df6279865e4e8e7fae"
srcGitRev_4="a3736a0a1907cbc8bf619708738815a5fd789c80"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="29da85607df523a165c1b01a378f929a0b37b75969119b6ec373d95576978b13"
srcGitRev_5="7d57bdcdbb56540f37afe5a934ce12d33a6ca7fc"
SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="669d4db37e59ea83449e9ddb8bcccda7c22050763602a7e6d818986f345457b7"
srcGitRev_6="ceb177eeefa7d67ca29230d2e7e8584f97d4fdad"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="0414d14ba98eb1659180a00e78d002b50a6494e6b596145d6fb4262cbb76019b"
SOURCE_URI_7="https://github.com/rust-lang/cargo/archive/$cargoVersion.tar.gz"
CHECKSUM_SHA256_7="fc689ca7a09f1e6a1c31e69f0e2616a93576a68e0e1d7f0ae4c0d3301ff21ff8"
PATCHES="rust-$portVersion.patchset"
PATCHES_3="rust-installer-$portVersion.patchset"
PATCHES_5="rust-libc-$portVersion.patchset"
PATCHES_7="cargo-$cargoVersion.patchset"
ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:rust_gdb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
binutils${secondaryArchSuffix} == 2.26.1_2016_07_22 # version 2.28.1 will crash when building llvm
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == 0.16.0
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc == 1.15.1
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
BUILD()
{
rm -rf src/compiler-rt src/llvm src/rust-installer src/liblibc src/rt/hoedown
ln -sf /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
ln -sf /sources-3/rust-installer-$srcGitRev_3 src/rust-installer
ln -sf /sources-4/hoedown-$srcGitRev_4 src/rt/hoedown
ln -sf /sources-5/libc-$srcGitRev_5 src/liblibc
ln -sf /sources-6/llvm-$srcGitRev_6 src/llvm
# Do not use runConfigure: it generates too much noise, and it creates a totally impossible directory structure
#runConfigure --omit-dirs "docDir libExecDir dataRootDir includeDir sharedStateDir sbinDir binDir oldIncludeDir" ./configure --disable-jemalloc --build=i686-unknown-haiku --host=i686-unknown-haiku --target=i686-unknown-haiku
./configure --prefix=$prefix --mandir=$manDir --disable-jemalloc \
--enable-local-rust --local-rust-root=/boot/system/ \
--disable-rustbuild --release-channel=stable
make
# Build cargo
# This requires some manual interventions. From 1.17.0 the cargo source can be
# built from inside the tree. In this version we will still have to do it as a
# separate step. We use the just-generated rustc binary to compile the new
# version.
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
cd /sources-7/cargo-$cargoVersion
rm -rf src/rust-installer
ln -sf /sources-3/rust-installer-$srcGitRev_3 src/rust-installer
LIBRARY_PATH=/sources/rust-$portVersion/$architecture/stage2/lib:$LIBRARY_PATH \
./configure --prefix=$prefix --datadir=$dataDir --mandir=$manDir \
--docdir=$docDir --sysconfdir=$dataDir \
--rustc=/sources/rust-$portVersion/$architecture/stage2/bin/rustc \
--release-channel=stable
LIBRARY_PATH=/sources/rust-$portVersion/$architecture/stage2/lib:$LIBRARY_PATH make
}
INSTALL()
{
make install
# move documentation to the proper place
mkdir -p $developDocDir
mv $prefix/share/doc/rust/* $developDocDir
rm -rf $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
# move the libs to the x86 subdir
mkdir -p $libDir
mv $prefix/lib/*.so $libDir
fi
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
mkdir -p $developLibDir
mv $prefix/lib/rustlib $developLibDir
cd $prefix/lib
ln -s ../$relativeDevelopLibDir/rustlib rustlib
# install cargo
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
cd /sources-7/cargo-$cargoVersion
LIBRARY_PATH=/sources/rust-$portVersion/$architecture/stage2/lib:$LIBRARY_PATH make install
# move the cargo binary (in case of a secondary arch)
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $binDir
mv $prefix/bin/cargo $binDir/cargo
fi
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-cargo
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
make check
}

View File

@@ -1,201 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2017, The Rust Project Developers"
LICENSE="MIT"
REVISION="3"
cargoVersion="0.18.0"
srcGitRev="1.17.0"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="91c59dfc727dd56114b11badf60ada8338d6afd2a5fb797b1e1886ef60dd3fbe"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="d812b1641f798e38de9fa372476d42cdb6908c01"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="a1d7a2c248c01499518f54735038030651c62fe8f0d580987ac52be20a13e93b"
srcGitRev_3="4f994850808a572e2cc8d43f968893c8e942e9bf"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="dc7240d60a869fa24a68c8734fb7c810c27cca0a6dad52df6279865e4e8e7fae"
srcGitRev_4="da282f1bb7277b4d30fa1599ee29ad8eb4dd2a92"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="623889a326754e93a4a7a8a3487699ea786f4ca9b118f7468c12f8b9966905e6"
srcGitRev_5="64d954c6a76e896fbf7ed5c17e77c40e388abe84"
SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="62f91d74cffe78b9e18707fd8b02dbd8dca731486d6f5cd9ceca92034d1149a3"
srcGitRev_6="2e951c3ae354bcbd2e50b30798e232949a926b75"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="a85cc4847370573d194af95d6794304479d1024863c754d9b4e2499478c41393"
SOURCE_URI_7="https://github.com/rust-lang/cargo/archive/$cargoVersion.tar.gz"
CHECKSUM_SHA256_7="19b5c142c194fc2f940d93b4679850980ed077db0ff7c558122c7ef865e24983"
srcGitRev_8="d08fe97d12b41c1ed8cc7701e545864132783941"
SOURCE_URI_8="https://github.com/rust-lang-nursery/nomicon/archive/$srcGitRev_8.tar.gz"
CHECKSUM_SHA256_8="39060572afca31c02f2f5eafc5d94c7b1930af7d3c8b4d8b81bd904d640dc37a"
srcGitRev_9="2d23ea601f017c106a2303094ee1c57ba856d246"
SOURCE_URI_9="https://github.com/rust-lang-nursery/reference/archive/$srcGitRev_9.tar.gz"
CHECKSUM_SHA256_9="8acfa0b31fa2e0780d4de5ec1ba76154f16db8f02e3d23c04d34dcecae6189a7"
srcGitRev_10="0.1.6"
SOURCE_URI_10="https://github.com/alexcrichton/cargo-vendor/archive/$srcGitRev_10.tar.gz"
CHECKSUM_SHA256_10="927f6b782f0be32c6027335bbd49fb40cffa922095ffacc9a0aca78e45023f1a"
PATCHES="rust-$portVersion.patchset"
PATCHES_3="rust-installer-$portVersion.patchset"
PATCHES_7="cargo-$cargoVersion.patchset"
PATCHES_10="cargo-vendor-$srcGitRev_10.patchset"
ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:rust_gdb = $portVersion
cmd:rust_lldb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == 0.17.0
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc == 1.16.0
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
BUILD()
{
# With the new build system, Rust always makes a tarball with the source
# In older recipes we symlinked the other git submodules, now we have to
# copy them
rm -rf cargo src/compiler-rt src/llvm src/rust-installer \
src/liblibc src/rt/hoedown src/doc/nomicon src/doc/reference
cp -r /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
cp -r /sources-3/rust-installer-$srcGitRev_3 src/rust-installer
cp -r /sources-4/hoedown-$srcGitRev_4 src/rt/hoedown
cp -r /sources-5/libc-$srcGitRev_5 src/liblibc
cp -r /sources-6/llvm-$srcGitRev_6 src/llvm
cp -r /sources-7/cargo-$cargoVersion cargo
cp -r /sources-8/nomicon-$srcGitRev_8 src/doc/nomicon
cp -r /sources-9/reference-$srcGitRev_9 src/doc/reference
# write the build configuration
cat >config.toml <<- EOL
[llvm]
targets = "X86"
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/boot/system/bin/rustc"
submodules = false
extended = true
[install]
prefix = "$prefix"
libdir = "$relativeLibDir"
mandir = "$relativeManDir"
docdir = "$relativeDevelopDocDir"
[rust]
channel = "stable"
use-jemalloc = false
rpath = false
EOL
# the install step of rust depends on the cargo vendor command
# build it separately here
cd /sources-10/cargo-vendor-$srcGitRev_10
cargo install --force
# now build rust and cargo
cd /sources/rust-$srcGitRev
./x.py dist --verbose
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd /sources/rust-$srcGitRev/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture"
do
./$module/install.sh \
--prefix=$prefix \
--docdir=$developDocDir \
--libdir=$libDir \
--mandir=$manDir \
--disable-ldconfig
done
# move the cargo binary (in case of a secondary arch)
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $binDir
mv $prefix/bin/cargo $binDir/cargo
fi
# move other cargo artifacts
mkdir -p $dataDir
mv $prefix/share/zsh $dataDir
mv $prefix/etc/bash_completions.d $dataDir
rm -rf $prefix/share $prefix/etc
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
# Note; this actually seems to be a bug in the Rust build system. The path
# to rustlib is hardcoded in the rustc binary, but it does allow it to be
# set to libdir_relative (see config.rs in the bootstrap tool). This variable
# is only set when the configure script is used to generate the config, not
# with config.toml
mkdir -p $developLibDir
mv $libDir/rustlib $developLibDir
cd $prefix/lib
ln -s $developLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-cargo
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
make check
}

View File

@@ -1,219 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2017, The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.19.0"
srcGitRev="1.18.0"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="77720ad4bf93175a73a94507fbf68c669bb66cf7c9a071f59a25510a4dfa1dbd"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="d812b1641f798e38de9fa372476d42cdb6908c01"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="a1d7a2c248c01499518f54735038030651c62fe8f0d580987ac52be20a13e93b"
srcGitRev_3="4f994850808a572e2cc8d43f968893c8e942e9bf"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="dc7240d60a869fa24a68c8734fb7c810c27cca0a6dad52df6279865e4e8e7fae"
srcGitRev_4="da282f1bb7277b4d30fa1599ee29ad8eb4dd2a92"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="623889a326754e93a4a7a8a3487699ea786f4ca9b118f7468c12f8b9966905e6"
srcGitRev_5="c34a802d1eb037b44c5252078c7270b5472e0f65"
SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="3616106943b3d3a345fc85ec02e9e125f80f60ea2f9384d4c5d6286c7142cfbd"
srcGitRev_6="2e951c3ae354bcbd2e50b30798e232949a926b75"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="a85cc4847370573d194af95d6794304479d1024863c754d9b4e2499478c41393"
SOURCE_URI_7="https://github.com/rust-lang/cargo/archive/$cargoVersion.tar.gz"
CHECKSUM_SHA256_7="9ea59d17a7fa81aa4bdefa2bb45a5315219414386753eaf0988cadd465550b40"
srcGitRev_8="616b98444ff4eb5260deee95ee3e090dfd98b947"
SOURCE_URI_8="https://github.com/rust-lang-nursery/nomicon/archive/$srcGitRev_8.tar.gz"
CHECKSUM_SHA256_8="ee080d47da2204094195362d91818cd56350c9c7e0969d78fc6d55c59529fce4"
srcGitRev_9="6b0de90d87dda15e323ef24cdf7ed873ac5cf4d3"
SOURCE_URI_9="https://github.com/rust-lang-nursery/reference/archive/$srcGitRev_9.tar.gz"
CHECKSUM_SHA256_9="7fca934f5ab6c08ba38376a6847cf6c6a1405794148d107bffa715c46f634bb4"
srcGitRev_10="ad7de198561b3a12217ea2da76d796d9c7fc0ed3"
SOURCE_URI_10="https://github.com/rust-lang/book/archive/$srcGitRev_10.tar.gz"
CHECKSUM_SHA256_10="31d77c9ccb2924f8381a09b6eb8b7efe74fbc280c581a21728e0c50878413ec0"
srcGitRev_11="6ecff95fdc3ee7ceed2b9b0cc1a3a64876860bce"
SOURCE_URI_11="https://github.com/rust-lang-nursery/rls/archive/$srcGitRev_11.tar.gz"
CHECKSUM_SHA256_11="e1ad31337422f9b05f57f43266048935f246cc35ca53671feceb9e6208bc4b40"
srcGitRev_12="0.1.6"
SOURCE_URI_12="https://github.com/alexcrichton/cargo-vendor/archive/$srcGitRev_12.tar.gz"
CHECKSUM_SHA256_12="927f6b782f0be32c6027335bbd49fb40cffa922095ffacc9a0aca78e45023f1a"
PATCHES="rust-$portVersion.patchset"
PATCHES_3="rust-installer-$portVersion.patchset"
PATCHES_7="cargo-$cargoVersion.patchset"
PATCHES_11="rust-rls-$portVersion.patchset"
PATCHES_12="cargo-vendor-$srcGitRev_12.patchset"
ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:rls$secondaryArchSuffix = $portVersion
cmd:rust_gdb = $portVersion
cmd:rust_lldb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == 0.18.0
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc == 1.17.0
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
BUILD()
{
# With the new build system, Rust always makes a tarball with the source
# In older recipes we symlinked the other git submodules, now we have to
# copy them
rm -rf cargo src/compiler-rt src/llvm src/rust-installer \
src/liblibc src/rt/hoedown src/doc/nomicon src/doc/reference \
src/doc/book rls
cp -r /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
cp -r /sources-3/rust-installer-$srcGitRev_3 src/rust-installer
cp -r /sources-4/hoedown-$srcGitRev_4 src/rt/hoedown
cp -r /sources-5/libc-$srcGitRev_5 src/liblibc
cp -r /sources-6/llvm-$srcGitRev_6 src/llvm
cp -r /sources-7/cargo-$cargoVersion cargo
cp -r /sources-8/nomicon-$srcGitRev_8 src/doc/nomicon
cp -r /sources-9/reference-$srcGitRev_9 src/doc/reference
cp -r /sources-10/book-$srcGitRev_10 src/doc/book
cp -r /sources-11/rls-$srcGitRev_11 rls
# write the build configuration
cat >config.toml <<- EOL
[llvm]
targets = "X86"
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/boot/system/bin/rustc"
submodules = false
extended = true
[install]
prefix = "$prefix"
libdir = "$relativeLibDir"
mandir = "$relativeManDir"
docdir = "$relativeDevelopDocDir"
[rust]
channel = "stable"
use-jemalloc = false
rpath = false
EOL
# the install step of rust depends on the cargo vendor command
# build it separately here
cd /sources-12/cargo-vendor-$srcGitRev_12
cargo install --force
# now build rust and cargo
cd /sources/rust-$srcGitRev
# Note: in the previous recipe the --verbose flag was added, but
# this causes a bug in the Rust build. See issue #42543 on github
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd /sources/rust-$srcGitRev/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"rls-0.1.0-$architecture"
do
./$module/install.sh \
--prefix=$prefix \
--docdir=$developDocDir \
--libdir=$libDir \
--mandir=$manDir \
--disable-ldconfig
done
# move the cargo and binaries (in case of a secondary arch)
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $binDir
mv $prefix/bin/cargo $binDir/cargo
mv $prefix/bin/rls $binDir/rls
fi
# move other cargo artifacts
mkdir -p $dataDir
mv $prefix/share/zsh $dataDir
mv $prefix/etc/bash_completions.d $dataDir
rm -rf $prefix/share $prefix/etc
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
# Note; this actually seems to be a bug in the Rust build system. The path
# to rustlib is hardcoded in the rustc binary, but it does allow it to be
# set to libdir_relative (see config.rs in the bootstrap tool). This variable
# is only set when the configure script is used to generate the config, not
# with config.toml
mkdir -p $developLibDir
mv $libDir/rustlib $developLibDir
cd $prefix/lib
ln -s $developLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-cargo
rm $developLibDir/rustlib/manifest-rls
rm $developLibDir/rustlib/manifest-rust-analysis-*haiku
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
make check
}

View File

@@ -1,210 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2017, The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.20.0"
srcGitRev="1.19.0"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="7e1ecb476118b79b5abed02bc7a724bb65413057e26f1d2b8538c572f7463be0"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="c8a8767c56ad3d3f4eb45c87b95026936fb9aa35"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="ac595c03dd5dcd3ad66eee76bec2e95770259e4aa4db5df875c2bbcf7781a441"
srcGitRev_3="b4ff403041f17957f735ad750c3241a3a428b9b7"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="dfcce5a555e0aff5f7ba7681968b77529c806c3109ede78eb1b45a0c4455db4b"
srcGitRev_4="da282f1bb7277b4d30fa1599ee29ad8eb4dd2a92"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="623889a326754e93a4a7a8a3487699ea786f4ca9b118f7468c12f8b9966905e6"
srcGitRev_5="03562b0cb26a00f49d4eaf18ca3e49608110b0c8"
SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="2ecccc8810c1e84e1b8bbcb564c96d1df5aefce13663efc006621a30685a9e4f"
srcGitRev_6="2153316469829c338eab18835b879d01c3a986a8"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="495850c84eab4f20277a839a12283dd27fb9e61daf0c7dec0e76d1bc1a5a437b"
SOURCE_URI_7="https://github.com/rust-lang/cargo/archive/$cargoVersion.tar.gz"
CHECKSUM_SHA256_7="f0e21d23cffd3510ba8a65e6a4d1010073afc0e573d9d92c23d22b868ca0bc42"
srcGitRev_8="c0e8c56d76bdf6bd16c64338f81c04d48c60f117"
SOURCE_URI_8="https://github.com/rust-lang-nursery/nomicon/archive/$srcGitRev_8.tar.gz"
CHECKSUM_SHA256_8="a15a4bbc86a207e9cc9604ed0f7a7039f9365034063096e4f6e44eb8832fffec"
srcGitRev_9="876582e9d0fbdc9cecb03133c28db96e9ff8c844"
SOURCE_URI_9="https://github.com/rust-lang-nursery/reference/archive/$srcGitRev_9.tar.gz"
CHECKSUM_SHA256_9="0c5e47826948cf30345cd5c09f237566dfc995b7f1f2c8751e306c5488f05ecb"
srcGitRev_10="ad7de198561b3a12217ea2da76d796d9c7fc0ed3"
SOURCE_URI_10="https://github.com/rust-lang/book/archive/$srcGitRev_10.tar.gz"
CHECKSUM_SHA256_10="31d77c9ccb2924f8381a09b6eb8b7efe74fbc280c581a21728e0c50878413ec0"
srcGitRev_11="bfe80cfa8db75500e67ca8762465d27662674637"
SOURCE_URI_11="https://github.com/rust-lang-nursery/rls/archive/$srcGitRev_11.tar.gz"
CHECKSUM_SHA256_11="666ba8fb85cd875471ba1d71c9e674516cd7891ea954721276a9a99a1e4aa7d8"
srcGitRev_12="0.1.6"
SOURCE_URI_12="https://github.com/alexcrichton/cargo-vendor/archive/$srcGitRev_12.tar.gz"
CHECKSUM_SHA256_12="927f6b782f0be32c6027335bbd49fb40cffa922095ffacc9a0aca78e45023f1a"
PATCHES="rust-$portVersion.patchset"
PATCHES_5="rust-libc-$portVersion.patchset"
PATCHES_12="cargo-vendor-$srcGitRev_12.patchset"
ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:rust_gdb = $portVersion
cmd:rust_lldb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == 0.19.0
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc == 1.18.0
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
BUILD()
{
# With the new build system, Rust always makes a tarball with the source
# In older recipes we symlinked the other git submodules, now we have to
# copy them
rm -rf src/tools/cargo src/compiler-rt src/llvm src/tools/rust-installer \
src/liblibc src/rt/hoedown src/doc/nomicon src/doc/reference \
src/doc/book src/tools/rls
cp -r /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
cp -r /sources-3/rust-installer-$srcGitRev_3 src/tools/rust-installer
cp -r /sources-4/hoedown-$srcGitRev_4 src/rt/hoedown
cp -r /sources-5/libc-$srcGitRev_5 src/liblibc
cp -r /sources-6/llvm-$srcGitRev_6 src/llvm
cp -r /sources-7/cargo-$cargoVersion src/tools/cargo
cp -r /sources-8/nomicon-$srcGitRev_8 src/doc/nomicon
cp -r /sources-9/reference-$srcGitRev_9 src/doc/reference
cp -r /sources-10/book-$srcGitRev_10 src/doc/book
cp -r /sources-11/rls-$srcGitRev_11 src/tools/rls
# write the build configuration
cat >config.toml <<- EOL
[llvm]
targets = "X86"
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/boot/system/bin/rustc"
submodules = false
extended = true
[install]
prefix = "$prefix"
libdir = "$relativeLibDir"
mandir = "$relativeManDir"
docdir = "$relativeDevelopDocDir"
sysconfdir = "$relativeDataDir"
[rust]
channel = "stable"
use-jemalloc = false
rpath = false
EOL
# the install step of rust depends on the cargo vendor command
# build it separately here
cd /sources-12/cargo-vendor-$srcGitRev_12
cargo install --force
# now build rust and cargo
cd /sources/rust-$srcGitRev
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd /sources/rust-$srcGitRev/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture"
do
./$module/install.sh \
--prefix=$prefix \
--docdir=$developDocDir \
--libdir=$libDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move the cargo and binaries (in case of a secondary arch)
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $binDir
mv $prefix/bin/cargo $binDir/cargo
fi
# remove zsh data, it is not used on Haiku anyway
rm -rf $prefix/share
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
# Note; this actually seems to be a bug in the Rust build system. The path
# to rustlib is hardcoded in the rustc binary, but it does allow it to be
# set to libdir_relative (see config.rs in the bootstrap tool). This variable
# is only set when the configure script is used to generate the config, not
# with config.toml
mkdir -p $developLibDir
mv $libDir/rustlib $developLibDir
cd $prefix/lib
ln -s $developLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-cargo
rm $developLibDir/rustlib/manifest-rust-analysis-*haiku
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
make check
}

View File

@@ -1,140 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2015, The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
srcGitRev="cc3dc6313b9098cc97b0aab889b407ea2ee61674"
SOURCE_URI="https://github.com/nielx/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="8b029f873b8a4eed794b3eecb1cd589859eef11e6f0f54f587761390fc648ec0"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="50aaf12f610fd14c40fe8c17d85e27dacc091e84"
SOURCE_URI_2="https://github.com/nielx/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="adabe5ccb750361199db684ea12c25de32106e477eb186d9645787959cc6b7c2"
srcGitRev_3="70b8783064398a74c64c65e7216000dabb695bf9"
SOURCE_URI_3="https://github.com/nielx/llvm/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="f13a30c575be1f4c6ea2787a6435ea20e2a874ed28af8db96ed274ca8bdc0045"
srcGitRev_4="7911d8666bab5bb3456f15431450e719ef2cb2c9"
SOURCE_URI_4="https://github.com/nielx/rust-installer/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="0946d54f64b0dedf43ecafe463bc0370d0e1273621d187b384fc112b6de1304f"
srcGitRev_5="238c4d57cce10d33b05cf52a91fc62a09f31ffbb"
SOURCE_URI_5="https://github.com/rust-lang/hoedown/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="0b48589221adc4748b4a8f79c374006defdaadb1ecc363f395232cfad5b23b5c"
if [ $effectiveTargetArchitecture = x86_64 ]; then
SOURCE_URI_6="http://rust-on-haiku.com/downloads/33#noarchive"
CHECKSUM_SHA256_6="6156c67e3b4d61e330290e86ed11f645c266b7e1512737dff1da7cd7ff6dee35"
SOURCE_FILENAME_6="rust-stage0-2015-11-13-c386da0-haiku-x86_64-d09b23db0ef31209a1ebc42e54177449db0985ef.tar.bz2"
else
SOURCE_URI_6="http://rust-on-haiku.com/downloads/22#noarchive"
CHECKSUM_SHA256_6="87d3f40436f5e82b095e53b884e34e47567ead5a076a0b49c29f6370d20d3643"
SOURCE_FILENAME_6="rust-stage0-2015-08-13-8c5c388-haiku-i386-716818c2428eeb1ba418b7d6db1b7956bd38cdf8.tar.bz2"
fi
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion compat >= 1.2
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
cmd:rust_gdb = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
rust_runtime$secondaryArchSuffix == $portVersion base
"
PROVIDES_runtime="
rust_runtime$secondaryArchSuffix = $portVersion
"
REQUIRES_runtime="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
cmd:find
cmd:grep
cmd:file
cmd:git
cmd:tar
cmd:which
"
BUILD()
{
rm -rf src/compiler-rt src/llvm src/rust-installer
ln -sf /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
ln -sf /sources-3/llvm-$srcGitRev_3 src/llvm
ln -sf /sources-4/rust-installer-$srcGitRev_4 src/rust-installer
ln -sf /sources-5/hoedown-$srcGitRev_5 src/rt/hoedown
# Do not use runConfigure: it generates too much noise, and it creates a totally impossible directory structure
#runConfigure --omit-dirs "docDir libExecDir dataRootDir includeDir sharedStateDir sbinDir binDir oldIncludeDir" ./configure --disable-jemalloc --build=i686-unknown-haiku --host=i686-unknown-haiku --target=i686-unknown-haiku
./configure --prefix=$prefix --mandir=$mandir --disable-jemalloc --release-channel=stable
# download the stage 0 compiler, and put it in the proper place
if [ $effectiveTargetArchitecture = x86_64 ]; then
ln -sf /sources-6/rust-stage0-2015-11-13-c386da0-haiku-x86_64-d09b23db0ef31209a1ebc42e54177449db0985ef.tar.bz2 dl/rust-stage0-2015-11-13-c386da0-haiku-x86_64-d09b23db0ef31209a1ebc42e54177449db0985ef.tar.bz2
else
ln -sf /sources-6/rust-stage0-2015-08-13-8c5c388-haiku-i386-716818c2428eeb1ba418b7d6db1b7956bd38cdf8.tar.bz2 dl/rust-stage0-2015-08-13-8c5c388-haiku-i386-716818c2428eeb1ba418b7d6db1b7956bd38cdf8.tar.bz2
fi
make
}
INSTALL()
{
make install
# move documentation to the proper place
mkdir -p $developDocDir
mv $prefix/share/doc/rust/* $developDocDir
rm -rf $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
# move the libs to the x86 subdir
mkdir -p $libDir
mv $prefix/lib/*.so $libDir
fi
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
mkdir -p $developLibDir
mv $prefix/lib/rustlib $developLibDir
cd $prefix/lib
ln -s ../$relativeDevelopLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
# set up the runtime package
packageEntries runtime \
$libDir/libarena-*.so \
$libDir/libflate-*.so \
$libDir/libgetopts-*.so \
$libDir/libgraphviz-*.so \
$libDir/liblog-*.so \
$libDir/libstd-*.so \
$libDir/libterm-*.so \
$libDir/libtest-*.so
}
TEST()
{
make check
}

View File

@@ -1,214 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2017, The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.21.0"
srcGitRev="1.20.0"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="ca9307bf18a422029a1fca19ae1fa6c22e3047ff066fb041f9d0a9c886937860"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="c8a8767c56ad3d3f4eb45c87b95026936fb9aa35"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="ac595c03dd5dcd3ad66eee76bec2e95770259e4aa4db5df875c2bbcf7781a441"
srcGitRev_3="b4ff403041f17957f735ad750c3241a3a428b9b7"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="dfcce5a555e0aff5f7ba7681968b77529c806c3109ede78eb1b45a0c4455db4b"
srcGitRev_4="da282f1bb7277b4d30fa1599ee29ad8eb4dd2a92"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="623889a326754e93a4a7a8a3487699ea786f4ca9b118f7468c12f8b9966905e6"
srcGitRev_5="2015cf17a6a2a2280e93d9c57214ba92dbbaf42f"
SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="a68699c8947466360bf10a5687c7155eb295de6da4a43b7613dcca29a40db53e"
srcGitRev_6="a5ef0696d7c103006d3cb1f4263bad0ca13adca8"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="9c05c8ba8feb45940b9d646dff26b479add03ec6852edd522e75f0e517155375"
SOURCE_URI_7="https://github.com/rust-lang/cargo/archive/$cargoVersion.tar.gz"
CHECKSUM_SHA256_7="7c36cfb515c37959f06f9e6e7de28fd40eac70b53079f8abdd55eba6ae49bbff"
srcGitRev_8="81134a4dff811403b3b2f349b0c59a819f0fe0c1"
SOURCE_URI_8="https://github.com/rust-lang-nursery/nomicon/archive/$srcGitRev_8.tar.gz"
CHECKSUM_SHA256_8="eaa5028dfb4cb6c1722da244d054e2e2bbae3d7463264262b40fe735705799dc"
srcGitRev_9="1abfbaa70313fdf527cf799ffd9b9a096a62105c"
SOURCE_URI_9="https://github.com/rust-lang-nursery/reference/archive/$srcGitRev_9.tar.gz"
CHECKSUM_SHA256_9="0651328ad6f837370a0b7fb1eee49093f41936e0f0bcfbc4dec596f71280015d"
srcGitRev_10="4ee596df22f8ecaa9a0b2ddc0624b0104540dbf7"
SOURCE_URI_10="https://github.com/rust-lang/book/archive/$srcGitRev_10.tar.gz"
CHECKSUM_SHA256_10="75fe86002ce362a9a405be58ee4a30a487f7c4a0bdca5c40804e8bcabc50f3d2"
srcGitRev_11="618f802f0dcebc9f23a527afd3cd228c1fa468f8"
SOURCE_URI_11="https://github.com/rust-lang-nursery/rls/archive/$srcGitRev_11.tar.gz"
CHECKSUM_SHA256_11="6f82ceee79379efb37a2623b7a360ab65a894db9848f57643d1342c36dfac2ac"
srcGitRev_12="5e49856003f33aa5781a0edca148be21025e18e7"
SOURCE_URI_12="https://github.com/rust-lang-nursery/compiler-builtins/archive/$srcGitRev_12.tar.gz"
CHECKSUM_SHA256_12="025e3944bc30161a5d26cb77fddfe6827d1c5e14941bdf9531c11c29bca3e1f4"
PATCHES="rust-$portVersion.patchset"
PATCHES_5="rust-libc-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:rust_gdb = $portVersion
cmd:rust_lldb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == 0.20.0
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc == 1.19.0
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
BUILD()
{
# With the new build system, Rust always makes a tarball with the source
# In older recipes we symlinked the other git submodules, now we have to
# copy them
rm -rf src/tools/cargo src/libcompiler_builtins src/llvm \
src/tools/rust-installer src/liblibc src/rt/hoedown \
src/doc/nomicon src/doc/reference src/doc/book \
src/tools/rls
cp -r $sourceDir3/rust-installer-$srcGitRev_3 src/tools/rust-installer
cp -r $sourceDir4/hoedown-$srcGitRev_4 src/rt/hoedown
cp -r $sourceDir5/libc-$srcGitRev_5 src/liblibc
cp -r $sourceDir6/llvm-$srcGitRev_6 src/llvm
cp -r $sourceDir7/cargo-$cargoVersion src/tools/cargo
cp -r $sourceDir8/nomicon-$srcGitRev_8 src/doc/nomicon
cp -r $sourceDir9/reference-$srcGitRev_9 src/doc/reference
cp -r $sourceDir10/book-$srcGitRev_10 src/doc/book
cp -r $sourceDir11/rls-$srcGitRev_11 src/tools/rls
cp -r $sourceDir12/compiler-builtins-$srcGitRev_12 src/libcompiler_builtins
rm -rf src/libcompiler_builtins/compiler-rt
cp -r $sourceDir2/compiler-rt-$srcGitRev_2 src/libcompiler_builtins/compiler-rt
# write the build configuration
cat >config.toml <<- EOL
[llvm]
targets = "X86"
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/boot/system/bin/rustc"
submodules = false
extended = true
[install]
prefix = "$prefix"
libdir = "$relativeLibDir"
mandir = "$relativeManDir"
docdir = "$relativeDevelopDocDir"
sysconfdir = "$relativeDataDir"
[rust]
channel = "stable"
use-jemalloc = false
rpath = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture"
do
./$module/install.sh \
--prefix=$prefix \
--docdir=$developDocDir \
--libdir=$libDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move the cargo and binaries (in case of a secondary arch)
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $binDir
mv $prefix/bin/cargo $binDir/cargo
fi
# remove zsh data, it is not used on Haiku anyway
rm -rf $prefix/share
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
# Note; this actually seems to be a bug in the Rust build system. The path
# to rustlib is hardcoded in the rustc binary, but it does allow it to be
# set to libdir_relative (see config.rs in the bootstrap tool). This variable
# is only set when the configure script is used to generate the config, not
# with config.toml
mkdir -p $developLibDir
mv $libDir/rustlib $developLibDir
cd $prefix/lib
ln -s $developLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-cargo
rm $developLibDir/rustlib/manifest-rust-analysis-*haiku
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-*-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
./x.py test
}

View File

@@ -1,212 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2017 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.22.0"
rlsVersion="0.121.0"
srcGitRev="$portVersion"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="a0e674cce176a5c90804d394e57887b278acfcdbda4fe0f2ae5876531a94faa4"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="c8a8767c56ad3d3f4eb45c87b95026936fb9aa35"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="ac595c03dd5dcd3ad66eee76bec2e95770259e4aa4db5df875c2bbcf7781a441"
srcGitRev_3="b4ff403041f17957f735ad750c3241a3a428b9b7"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="dfcce5a555e0aff5f7ba7681968b77529c806c3109ede78eb1b45a0c4455db4b"
srcGitRev_4="da282f1bb7277b4d30fa1599ee29ad8eb4dd2a92"
SOURCE_URI_4="https://github.com/rust-lang/hoedown/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="623889a326754e93a4a7a8a3487699ea786f4ca9b118f7468c12f8b9966905e6"
srcGitRev_5="4d1b322cff63c47e7ed649fae048e680cfeda077"
SOURCE_URI_5="https://github.com/rust-lang/libc/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="e40ca6485049911c319b717404181675e88c2d56d2d8d27395cc85b0e4f428fb"
srcGitRev_6="d9e7d2696e41983b6b5a0b4fac604b4e548a84d3"
SOURCE_URI_6="https://github.com/rust-lang/llvm/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="e5481733ae30cc985674b7494e48ba8717748af9265514dd8516ceceb32ae8f0"
SOURCE_URI_7="https://github.com/rust-lang/cargo/archive/$cargoVersion.tar.gz"
CHECKSUM_SHA256_7="6740e2f8d035a5a5246a12e84a141d37ad4c2b826355aff497e6f1fcfb637aef"
srcGitRev_8="a4322ccb289a43cc238d4536982f184a3eec9ba7"
SOURCE_URI_8="https://github.com/rust-lang-nursery/nomicon/archive/$srcGitRev_8.tar.gz"
CHECKSUM_SHA256_8="d3e255dfe63cabd342229a53605cd94ae6df912e4771f88a1a4de7af3a59d8f2"
srcGitRev_9="266d429a48468371d2d90669f6a30dd659bb4bdb"
SOURCE_URI_9="https://github.com/rust-lang-nursery/reference/archive/$srcGitRev_9.tar.gz"
CHECKSUM_SHA256_9="7e0fb24af053ac9415568b01442a5ab491a9ed5b841e9441808100d63175cb68"
srcGitRev_10="d09c9e8144ed32170b7596abb145ade8b097acaf"
SOURCE_URI_10="https://github.com/rust-lang/book/archive/$srcGitRev_10.tar.gz"
CHECKSUM_SHA256_10="e2059881a339efff63e94d363b75bf34dfad2a0297bc46c568ba40dcc71f2d6f"
srcGitRev_11="86ff0b1413ef45aa05ccca968242ac1f09c12817"
SOURCE_URI_11="https://github.com/rust-lang-nursery/rls/archive/$srcGitRev_11.tar.gz"
CHECKSUM_SHA256_11="fa74c46f239ebd1557dea184de3caf7d76c003c6de64aa7fc07c2c9d9f0543f3"
srcGitRev_12="6b9281d2b2f0ebb94838814b1e8ace2de4b7035b"
SOURCE_URI_12="https://github.com/rust-lang-nursery/compiler-builtins/archive/$srcGitRev_12.tar.gz"
CHECKSUM_SHA256_12="82fa7ada1bdadbba9f780847dc4f9340f15e5f137d838c98ca7e30ec3dda6684"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:rls = $rlsVersion
cmd:rust_gdb = $portVersion
cmd:rust_lldb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
BUILD()
{
# With the rustbuild system, Rust always makes a tarball with the source
# In older recipes we symlinked the other git submodules, now we have to
# copy them
rm -rf src/tools/cargo src/libcompiler_builtins src/llvm \
src/tools/rust-installer src/liblibc src/rt/hoedown \
src/doc/nomicon src/doc/reference src/doc/book \
src/tools/rls
cp -r $sourceDir3/rust-installer-$srcGitRev_3 src/tools/rust-installer
cp -r $sourceDir4/hoedown-$srcGitRev_4 src/rt/hoedown
cp -r $sourceDir5/libc-$srcGitRev_5 src/liblibc
cp -r $sourceDir6/llvm-$srcGitRev_6 src/llvm
cp -r $sourceDir7/cargo-$cargoVersion src/tools/cargo
cp -r $sourceDir8/nomicon-$srcGitRev_8 src/doc/nomicon
cp -r $sourceDir9/reference-$srcGitRev_9 src/doc/reference
cp -r $sourceDir10/book-$srcGitRev_10 src/doc/book
cp -r $sourceDir11/rls-$srcGitRev_11 src/tools/rls
cp -r $sourceDir12/compiler-builtins-$srcGitRev_12 src/libcompiler_builtins
rm -rf src/libcompiler_builtins/compiler-rt
cp -r $sourceDir2/compiler-rt-$srcGitRev_2 src/libcompiler_builtins/compiler-rt
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/boot/system/bin/rustc"
submodules = false
extended = true
[install]
prefix = "$prefix"
libdir = "$relativeLibDir"
mandir = "$relativeManDir"
docdir = "$relativeDevelopDocDir"
sysconfdir = "$relativeDataDir"
[rust]
channel = "stable"
use-jemalloc = false
rpath = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture"
do
./$module/install.sh \
--prefix=$prefix \
--docdir=$developDocDir \
--libdir=$libDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move the cargo and binaries (in case of a secondary arch)
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $binDir
mv $prefix/bin/cargo $binDir/cargo
fi
# remove zsh data, it is not used on Haiku anyway
rm -rf $prefix/share
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
# Note; this actually seems to be a bug in the Rust build system. The path
# to rustlib is hardcoded in the rustc binary, but it does allow it to be
# set to libdir_relative (see config.rs in the bootstrap tool). This variable
# is only set when the configure script is used to generate the config, not
# with config.toml
mkdir -p $developLibDir
mv $libDir/rustlib $developLibDir
cd $prefix/lib
ln -s $developLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-*
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
./x.py test
}

View File

@@ -1,249 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.28.0"
rlsVersion="0.127.0"
rustfmtVersion="0.6.1"
SOURCE_URI="https://github.com/rust-lang/rust/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="0bbca54761be5302efc6e6fdb5f4dab4e0dec24458ca7c13538b7259885f9457"
SOURCE_FILENAME="rust-$portVersion.tar.gz"
srcGitRev_2="7243155b1c3da0a980c868a87adebf00e0b33989"
SOURCE_URI_2="https://github.com/rust-lang/llvm/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="ba1578c156e8f10a9330f8d2b8514987c74a2babaea845ac4c4a1d2d5ef379ec"
SOURCE_FILENAME_2="rust-$portVersion-llvm-$srcGitRev_2.tar.gz"
srcGitRev_3="118e078c5badd520d18b92813fd88789c8d341ab"
SOURCE_URI_3="https://github.com/rust-lang/rust-installer/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="34fd6dd8f8e5943be3ab022cd7d0ca792ea2cfe6fb21e06d6054134fc6441892"
SOURCE_FILENAME_3="rust-$portVersion-rust-installer-$srcGitRev_3.tar.gz"
srcGitRev_4="c5fb6dbe8154732b2af8367c75a9b079b2951154"
SOURCE_URI_4="https://github.com/rust-lang/libc/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="aa083022606be28922dfd94606dc27da11f9f397ed732d93fd70fd6a8fa82594"
SOURCE_FILENAME_4="rust-$portVersion-libc-$srcGitRev_4.tar.gz"
srcGitRev_5="748a5e6742db4a21c4c630a58087f818828e8a0a"
SOURCE_URI_5="https://github.com/rust-lang-nursery/nomicon/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="abf8866307d51259e55fef461e7954d05cf3169001069dc9ed4ab5eb40a73abd"
SOURCE_FILENAME_5="rust-$portVersion-nomicon-$srcGitRev_5.tar.gz"
SOURCE_URI_6="https://github.com/rust-lang/cargo/archive/$cargoVersion.tar.gz"
CHECKSUM_SHA256_6="62f4269af6cd168c91a6b10ef845e6dc0f1c211605bd13d155a6a001ade026a1"
SOURCE_FILENAME_6="rust-$portVersion-cargo-$cargoVersion.tar.gz"
srcGitRev_7="134f419ee62714590b04712fe6072253bc2a7822"
SOURCE_URI_7="https://github.com/rust-lang-nursery/reference/archive/$srcGitRev_7.tar.gz"
CHECKSUM_SHA256_7="9e54405f4a6c487cba04d2e25e7026b86581038a88741ce5757b38ddfab4cb07"
SOURCE_FILENAME_7="rust-$portVersion-reference-$srcGitRev_7.tar.gz"
srcGitRev_8="f51127530d46b9acbf4747c859da185e771cfcf3"
SOURCE_URI_8="https://github.com/rust-lang/book/archive/$srcGitRev_8.tar.gz"
CHECKSUM_SHA256_8="a18b090a3a29313a9e68dbef0ca4a5e0ecb36d9eb0f244a1e6cbd33989546989"
SOURCE_FILENAME_8="rust-$portVersion-book-$srcGitRev_8.tar.gz"
srcGitRev_9="d2ade31a52a417257742de72c5936a8a342a34b5"
SOURCE_URI_9="https://github.com/rust-lang-nursery/rls/archive/$srcGitRev_9.tar.gz"
CHECKSUM_SHA256_9="5ca89b25cf636b018cb1e9862cf2272e1295874c712db23178e36a3b2dded892"
SOURCE_FILENAME_9="rust-$portVersion-rls-$rlsVersion.tar.gz"
srcGitRev_10="2a2f6d96c8dc578d2474742f14c9bab0b36b0408"
SOURCE_URI_10="https://github.com/rust-lang-nursery/compiler-builtins/archive/$srcGitRev_10.tar.gz"
CHECKSUM_SHA256_10="cebece5392d3990a4ed06af378f1e44daea0c30d1d348d1cefb7dae9a4f56bbb"
SOURCE_FILENAME_10="rust-$portVersion-compiler-builtins-$srcGitRev_10.tar.gz"
srcGitRev_11="dfd960b5f1a1751b22738fa34fd27b583f4618db"
SOURCE_URI_11="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_11.tar.gz"
CHECKSUM_SHA256_11="7384b3592a4b05857fbf4e54ff5f0ac17bb8bd982b428f348ae2cc4afd9a552c"
SOURCE_FILENAME_11="rust-$portVersion-compiler-rt-$srcGitRev_11.tar.gz"
srcGitRev_12="49279d715bc9bc979313e7c1056ada821ddc3ee2"
SOURCE_URI_12="https://github.com/rust-lang-nursery/rustfmt/archive/$srcGitRev_12.tar.gz"
CHECKSUM_SHA256_12="9708789d175ce1dd43e1623c1373629d26d583022e9e826d768d9270c4304f36"
SOURCE_FILENAME_12="rust-$portVersion-rustfmt-$rustfmtVersion.tar.gz"
srcGitRev_13="f48fed70d4447445b586a35c4ae88683542ffc72"
SOURCE_URI_13="https://github.com/solson/miri/archive/$srcGitRev_13.tar.gz"
CHECKSUM_SHA256_13="7ab3a7345cc98e96a223b92653374fe1cae2c81f90afb745e933f02eacbf7390"
SOURCE_FILENAME_13="rust-$portVersion-miri-$srcGitRev_13.tar.gz"
srcGitRev_14="eebda16e4b45f2eed4310cf7b9872cc752278163"
SOURCE_URI_14="https://github.com/rust-lang/rust-by-example/archive/$srcGitRev_14.tar.gz"
CHECKSUM_SHA256_14="be12b7ba065470a046f7e2ba3f76abd3fd6028b24393eba292d024de8164b630"
SOURCE_FILENAME_14="rust-$portVersion-rust-by-example-$srcGitRev_14.tar.gz"
srcGitRev_15="a19ca1cd91cf97777af8268a6136bd2e4648e189"
SOURCE_URI_15="https://github.com/rust-lang-nursery/stdsimd/archive/$srcGitRev_15.tar.gz"
CHECKSUM_SHA256_15="ddfb9831e8cb439545ce8180a958e57877a0cd9fc3f54305b38679f2b0dd2f68"
SOURCE_FILENAME_15="rust-$portVersion-stdsimd-$srcGitRev_15.tar.gz"
srcGitRev_16="1742229ebb7843a65c05ee495d8de5366fcc5567"
SOURCE_URI_16="https://github.com/rust-lang-nursery/rust-clippy/archive/$srcGitRev_16.tar.gz"
CHECKSUM_SHA256_16="e5b04a1dfeab2d89fc5ee4509711c381bcdca53586b73a999102e14ac8748c23"
SOURCE_FILENAME_16="rust-$portVersion-clippy-$srcGitRev_16.tar.gz"
PATCHES="rust-$portVersion.patchset"
PATCHES_2="rust-llvm-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_fmt = $cargoVersion
cmd:rls = $rlsVersion
cmd:rust_gdb = $portVersion
cmd:rust_lldb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
BUILD()
{
# Set up the source tree with all the proper submodules
rm -rf src/llvm src/tools/rust-installer src/liblibc src/doc/nomicon \
src/tools/cargo src/doc/reference src/doc/book src/tools/rls \
src/libcompiler_builtins src/tools/rustfmt src/tools/miri \
src/doc/rust-by-example src/stdsimd src/tools/clippy
ln -s $sourceDir2/llvm-$srcGitRev_2 src/llvm
ln -s $sourceDir3/rust-installer-$srcGitRev_3 src/tools/rust-installer
ln -s $sourceDir4/libc-$srcGitRev_4 src/liblibc
ln -s $sourceDir5/nomicon-$srcGitRev_5 src/doc/nomicon
ln -s $sourceDir6/cargo-$cargoVersion src/tools/cargo
ln -s $sourceDir7/reference-$srcGitRev_7 src/doc/reference
ln -s $sourceDir8/book-$srcGitRev_8 src/doc/book
ln -s $sourceDir9/rls-$srcGitRev_9 src/tools/rls
ln -s $sourceDir10/compiler-builtins-$srcGitRev_10 src/libcompiler_builtins
rm -rf src/libcompiler_builtins/compiler-rt
ln -s $sourceDir11/compiler-rt-$srcGitRev_11 src/libcompiler_builtins/compiler-rt
ln -s $sourceDir12/rustfmt-$srcGitRev_12 src/tools/rustfmt
ln -s $sourceDir13/miri-$srcGitRev_13 src/tools/miri
ln -s $sourceDir14/rust-by-example-$srcGitRev_14 src/doc/rust-by-example
ln -s $sourceDir15/stdsimd-$srcGitRev_15 src/stdsimd
ln -s $sourceDir16/rust-clippy-$srcGitRev_16 src/tools/clippy
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/boot/system/bin/rustc"
submodules = false
extended = true
tools = ["cargo", "rls", "rustfmt", "analysis"]
[install]
prefix = "$prefix"
libdir = "$relativeLibDir"
mandir = "$relativeManDir"
docdir = "$relativeDevelopDocDir"
sysconfdir = "$relativeDataDir"
[rust]
channel = "stable"
use-jemalloc = false
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$prefix \
--docdir=$developDocDir \
--libdir=$libDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move the cargo and binaries (in case of a secondary arch)
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $binDir
mv $prefix/bin/cargo $binDir/cargo
fi
# remove zsh data, it is not used on Haiku anyway
rm -rf $prefix/share
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
# Note; this actually seems to be a bug in the Rust build system. The path
# to rustlib is hardcoded in the rustc binary, but it does allow it to be
# set to libdir_relative (see config.rs in the bootstrap tool). This variable
# is only set when the configure script is used to generate the config, not
# with config.toml
mkdir -p $developLibDir
mv $libDir/rustlib $developLibDir
ln -r -s $developLibDir/rustlib $prefix/lib/rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-*
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
./x.py test
}

View File

@@ -1,166 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.29.0"
rlsVersion="0.128.0"
rustfmtVersion="0.8.2"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="8a899afd4b502b4ebff5cfc82cba77a8cb37113b5e6018f15c09545936081848"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_fmt = $cargoVersion
cmd:rls = $rlsVersion
cmd:rust_gdb = $portVersion
cmd:rust_lldb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/boot/system/bin/rustc"
submodules = false
extended = true
tools = ["cargo", "rls", "rustfmt", "analysis"]
[install]
prefix = "$prefix"
libdir = "$relativeLibDir"
mandir = "$relativeManDir"
docdir = "$relativeDevelopDocDir"
sysconfdir = "$relativeDataDir"
[rust]
channel = "stable"
use-jemalloc = false
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$prefix \
--docdir=$developDocDir \
--libdir=$libDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move the cargo and binaries (in case of a secondary arch)
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $binDir
mv $prefix/bin/cargo $binDir/cargo
fi
# remove zsh data, it is not used on Haiku anyway
rm -rf $prefix/share
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
# Note; this actually seems to be a bug in the Rust build system. The path
# to rustlib is hardcoded in the rustc binary, but it does allow it to be
# set to libdir_relative (see config.rs in the bootstrap tool). This variable
# is only set when the configure script is used to generate the config, not
# with config.toml
mkdir -p $developLibDir
mv $libDir/rustlib $developLibDir
ln -r -s $developLibDir/rustlib $prefix/lib/rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-*
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
./x.py test
}

View File

@@ -1,168 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.30.0"
rlsVersion="0.130.0"
rustfmtVersion="0.99.1"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="3943da98fb478a336ede7404e42ff76ef6ba4fc2b82012cfccd6b9fc4bd2c191"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/boot/system/bin/rustc"
submodules = false
extended = true
tools = ["cargo", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installdir"
libdir = "$installdir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
use-jemalloc = false
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,167 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.33.0"
rlsVersion="0.131.6"
rustfmtVersion="1.0.0"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="d617a7dc39daaafa8256320991005fc376c8ef2080593918301b24466d0067af"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,167 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.34.0"
rlsVersion="1.33.0"
rustfmtVersion="1.0.1"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="f4b1a72f1a29b23dcc9d7be5f60878f0434560513273906aa93dcd5c0de39b71"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,167 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.35.0"
rlsVersion="1.34.0"
rustfmtVersion="1.0.3"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="2b3b3a5462aa31d07f39721af73ef394803ceae3472e2470f28b7ee0b12e38ef"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,167 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.36.0"
rlsVersion="1.35.0"
rustfmtVersion="1.2.0"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="169756df2298957bcf02da6a612996c24a51b9ac3b23409e6507d69eb2e6f523"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,167 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.37.0"
rlsVersion="1.36.0"
rustfmtVersion="1.2.2"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="f51645b9f787af4a5d94db17f6af39db0c55980ed24fe366cad55b57900f8f2d"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,167 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.39.0"
rlsVersion="1.38.0"
rustfmtVersion="1.4.4"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="3a7991aa4cb44ef941d71636e45a95468b520dc6fc7cf725364925bd3e3d3a34"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,167 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.41.0"
rlsVersion="1.40.0"
rustfmtVersion="1.4.9"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="6e2aa3a91697f4b225c6b394cbae6b97666f061dba491f666a5281698fe2aace"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,171 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2018 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.42.0"
rlsVersion="1.41.0"
rustfmtVersion="1.4.11"
clippyVersion="0.0.212"
miriVersion="0.1.0"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="38d6742e5c4c98a835de5d6e12a209e442fb3078a03b2c01bab6ea7afb25be6f"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $miriVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $miriVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture" \
"miri-$miriVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt miri cargo-miri; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,171 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2020 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.43.0"
rlsVersion="1.41.0"
rustfmtVersion="1.4.11"
clippyVersion="0.0.212"
miriVersion="0.1.0"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="aa5b4c0f2bac33cc26a11523fce9b0f120d2eff510ed148ae7c586501481ed04"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $miriVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $miriVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture" \
"miri-$miriVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt miri cargo-miri; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,171 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2020 The Rust Project Developers"
LICENSE="MIT"
REVISION="2"
cargoVersion="0.44.0"
rlsVersion="1.41.0"
rustfmtVersion="1.4.12"
clippyVersion="0.0.212"
miriVersion="0.1.0"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="d0899933840369f07394b211cb0b53a5cd4634907633f0bee541133c8b75e309"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $miriVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $miriVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture" \
"miri-$miriVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt miri cargo-miri; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,167 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2020 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.45.0"
rlsVersion="1.41.0"
rustfmtVersion="1.4.14"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="b32fa7d6bd6ff9286aab2aa7ca696d1da921614cefc10f617aef68d9bce9118a"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,167 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2020 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.46.0"
rlsVersion="1.41.0"
rustfmtVersion="1.4.15"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="c436034db42bc0ea7e7f32816ac6555b70d1f76c834407597966dfaf2ec839d6"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:rls$secondaryArchSuffix = $rlsVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rls", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rls-$rlsVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,168 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2020 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.49.0"
rustfmtVersion="1.4.24"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="ff0a242392a1865d7b2d08eb5ca6c1b3fd0820741d4c13a51a4b2d5d2bb53908"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_analyzer$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_gdbgui$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $portVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,168 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2020 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.50.0"
rustfmtVersion="1.4.25"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="ebe910edc824a0a037a10be443446a0511923ba8342fa3c331ec8a22481d5d15"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_analyzer$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_gdbgui$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $portVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,168 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2020 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.51.0"
rustfmtVersion="1.4.30"
clippyVersion="0.0.212"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="f54adf9204ed3cb3998cdc1baa5645b346d8cf8f18205e3b15fcae194ba5457c"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_analyzer$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_gdbgui$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $portVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,168 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2021 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.52.0"
rustfmtVersion="1.4.36"
clippyVersion="0.1.51"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="92c68a91fca33cbafb83442cde722d010cc387dc1ee8a2680e2fb33a575821a1"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_analyzer$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_gdbgui$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $portVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,168 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2021 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.53.0"
rustfmtVersion="1.4.36"
clippyVersion="0.1.52"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="2393e923087f3f8f98190eb0743f1b4a8956a35274ae5d3c0fae6e43238c6af8"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_analyzer$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_gdbgui$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $portVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,168 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2021 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.54.0"
rustfmtVersion="1.4.37"
clippyVersion="0.1.53"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="e53a2df2c2c26f8929d551852eeae242b9a6167fba34481f92010b30def32dec"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_analyzer$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_gdbgui$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $portVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -1,168 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2021 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.55.0"
rustfmtVersion="1.4.37"
clippyVersion="0.1.54"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="a2934f85f76a35a3796c0fefd31e91f5b6dd8377cd8c3769c1c10e7ce7a495f4"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
rust_bin$secondaryArchSuffix = $portVersion
cmd:rustc$secondaryArchSuffix = $portVersion
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_analyzer$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_gdbgui$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $portVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cargo$secondaryArchSuffix == $cargoVersion
cmd:cmake
cmd:cmp
cmd:file
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:rustc$secondaryArchSuffix == $portVersion
cmd:sed
cmd:tar
cmd:which
cmd:xargs
"
relativeInstallDir="develop/tools$secondaryArchSubDir/rust"
installDir="$prefix/$relativeInstallDir"
BUILD()
{
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
experimental-targets = ""
[build]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rustfmt", "analysis"]
[install]
prefix = "$installDir"
libdir = "$installDir/bin/lib"
mandir = "$manDir"
docdir = "$developDocDir"
sysconfdir = "$dataDir"
[rust]
channel = "stable"
rpath = false
deny-warnings = false
dist-src = false
[dist]
src-tarball = false
EOL
# Disable ASLR: compiling stage 1 rustc requires a lot of RAM (about 1.5
# GB). Haiku has a per-process limit of 2GB on 32 bit systems. ASLR makes
# the available space even smaller. Disabling it will give us the space to
# compile Rust
export DISABLE_ASLR=1
# now build rust and cargo
./x.py dist
}
INSTALL()
{
# we will manually invoke the install scripts
if [ $effectiveTargetArchitecture = x86 ]; then
architecture="i686-unknown-haiku"
fi
if [ $effectiveTargetArchitecture = x86_64 ]; then
architecture="x86_64-unknown-haiku"
fi
# let's install the packages one by one
cd $sourceDir/build/tmp/dist/
for module in "rust-docs-$srcGitRev-$architecture" \
"rust-std-$srcGitRev-$architecture" \
"rustc-$srcGitRev-$architecture" \
"rust-analysis-$srcGitRev-$architecture" \
"cargo-$cargoVersion-$architecture" \
"clippy-$clippyVersion-$architecture" \
"rustfmt-$rustfmtVersion-$architecture"
do
./$module/install.sh \
--prefix=$installDir \
--docdir=$developDocDir \
--mandir=$manDir \
--sysconfdir=$dataDir \
--disable-ldconfig
done
# move zsh data to the datadir
mv $installDir/share/zsh $dataDir
rm -rf $installDir/share
# clean out unneccesary files created by the rust installer
rm $installDir/lib/rustlib/components
rm $installDir/lib/rustlib/install.log
rm $installDir/lib/rustlib/manifest-*
rm $installDir/lib/rustlib/rust-installer-version
rm $installDir/lib/rustlib/uninstall.sh
# link the binaries in $binDir
mkdir -p $binDir
for f in cargo cargo-clippy cargo-fmt clippy-driver rls rust-gdb \
rust-lldb rustc rustdoc rustfmt; do
symlinkRelative -sfn $installDir/bin/$f $binDir
done
# make sure runtime_loader can find the libraries in the lib dir relative
# to the binaries
symlinkRelative -sfn $installDir/lib $installDir/bin/lib
}
TEST()
{
./x.py test
}

View File

@@ -2,17 +2,19 @@ SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, \
prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2021 The Rust Project Developers"
COPYRIGHT="2023 The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
cargoVersion="0.56.0"
rustfmtVersion="1.4.37"
clippyVersion="0.1.55"
cargoVersion="0.74.0"
rustfmtVersion="1.6.0"
clippyVersion="0.1.73"
rlsVersion="2.0.0"
SOURCE_URI="https://static.rust-lang.org/dist/rustc-$portVersion-src.tar.xz"
CHECKSUM_SHA256="aec85a7c1f40b7a40818a58ae13632f8a12cfaa4d3e2a10957d0e9d16dfdd556"
CHECKSUM_SHA256="6eaf672dbea2e6596af8c999f5e6924b9af4bb8b02166bfe0b928e68aa75ae62"
SOURCE_DIR="rustc-$portVersion-src"
PATCHES="rust-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86"
@@ -22,28 +24,24 @@ PROVIDES="
cmd:rustdoc$secondaryArchSuffix = $portVersion
cmd:rustfmt$secondaryArchSuffix = $portVersion
cmd:rust_analyzer$secondaryArchSuffix = $portVersion
cmd:rust_demangler$secondaryArchSuffix = $portVersion
cmd:rust_gdb$secondaryArchSuffix = $portVersion
cmd:rust_gdbgui$secondaryArchSuffix = $portVersion
cmd:rust_lldb$secondaryArchSuffix = $portVersion
cmd:cargo$secondaryArchSuffix = $cargoVersion
cmd:cargo_clippy$secondaryArchSuffix = $clippyVersion
cmd:cargo_fmt$secondaryArchSuffix = $cargoVersion
cmd:cargo_miri$secondaryArchSuffix = $portVersion
cmd:clippy_driver$secondaryArchSuffix = $clippyVersion
cmd:miri$secondaryArchSuffix = $portVersion
cmd:rustfmt = $rustfmtVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
@@ -58,6 +56,7 @@ BUILD_PREREQUIRES="
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:ninja
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:rustc$secondaryArchSuffix == $portVersion
@@ -75,15 +74,18 @@ BUILD()
# write the build configuration
tr -d '\t' >config.toml <<- EOL
[llvm]
targets = "X86"
targets = "WebAssembly;X86"
experimental-targets = ""
static-libstdcpp = false
[build]
host = ["$effectiveTargetArchitecture-unknown-haiku"]
target = ["$effectiveTargetArchitecture-unknown-haiku", "wasm32-unknown-unknown"]
cargo = "/$relativeBinDir/cargo"
rustc = "/$relativeBinDir/rustc"
submodules = false
extended = true
tools = ["cargo", "clippy", "rustfmt", "analysis"]
verbose = 1
[install]
prefix = "$installDir"
@@ -94,6 +96,7 @@ BUILD()
[rust]
channel = "stable"
lld = true
rpath = false
deny-warnings = false
dist-src = false
@@ -107,8 +110,13 @@ EOL
# compile Rust
export DISABLE_ASLR=1
# Version-specific fixes: these fixes need to be applied
pushd src/tools/cargo
cargo update -p socket2 --precise 0.4.1
cargo update -p tempfile --precise 3.7.1
popd
# now build rust and cargo
./x.py dist
./x.py dist $jobArgs
}
INSTALL()

View File

@@ -1,144 +0,0 @@
SUMMARY="Modern and safe systems programming language"
DESCRIPTION="Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races."
HOMEPAGE="https://www.rust-lang.org/"
COPYRIGHT="2016, The Rust Project Developers"
LICENSE="MIT"
REVISION="1"
srcGitRev="cc71d3af918369b668c9cb9f092e13ed3e34671d"
SOURCE_URI="https://github.com/nielx/rust/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="25aae4f00f8be26125c5aab902c42bc17e06acbfa71f6218a02c73091ee95346"
SOURCE_FILENAME="rust-$srcGitRev.tar.gz"
SOURCE_DIR="rust-$srcGitRev"
srcGitRev_2="57315f7e07d09b6f0341ebbcd50dded6c20d782f"
SOURCE_URI_2="https://github.com/rust-lang/compiler-rt/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="244e97dbad67f752a4c394407e0929dbf44ed520a2dd9f19ebf86f2919112c3e"
srcGitRev_3="2686d1d16f4bbcb9e6310fc8d48b95ae12eb7643"
SOURCE_URI_3="https://github.com/nielx/llvm/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="2492c7a1e04c47c99c8471f4f9b1ea5581887d969a7fbcbf33d2c9c7fb62f1bf"
srcGitRev_4="f96680f5a059069a320f62568d5afc88db9a7ec0"
SOURCE_URI_4="https://github.com/nielx/rust-installer/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="d5f79186cd4b9221c07cf89b3f038aa073674e13ddd35f2e7e22486b8eb16020"
srcGitRev_5="4638c60dedfa581fd5fa7c6420d8f32274c9ca0b"
SOURCE_URI_5="https://github.com/rust-lang/hoedown/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="a5a0a957544a5f8cf08c0b67cb503f294b0e1bb20c65766abf9dc3c683d3b9c5"
srcGitRev_6="a8510ebfbd9231db7d97b5df95bdaf983e68a04f"
SOURCE_URI_6="https://github.com/nielx/libc/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="6831b6ca212d531e8f775bc05af573a33d1e7c7b8b0d5e1d4ac056ac2a079141"
SOURCE_URI_7="http://rust-on-haiku.com/downloads/44#noarchive"
CHECKSUM_SHA256_7="08fd4f697c08ed3da24225643eb8ae1331feb6afe13ada398691c0e2dbdc3b1f"
SOURCE_FILENAME_7="rust-stage0-2016-08-07-b71ea1d-haiku-i386-bb4f6267ef13d945bdfaa443a0a007a84c8ce187.tar.bz2"
SOURCE_URI_8="http://rust-on-haiku.com/downloads/46#noarchive"
CHECKSUM_SHA256_8="357b1d6a1307d2b9a784daf0a71ca1982f040d8539d7d4e1e0443523347445b0"
SOURCE_FILENAME_8="rust-stage0-haiku-x86_64.tar.bz2"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
rust$secondaryArchSuffix = $portVersion
cmd:rust_gdb = $portVersion
cmd:rustc = $portVersion
cmd:rustdoc = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:file
cmd:find
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
cmd:tar
cmd:which
"
BUILD()
{
if [ $effectiveTargetArchitecture = x86_64 ]; then
# For x86_64 this recipe will unwrap the pre-built binary rustc compiler
# This compiler misses all the libraries and can only be used to bootstrap
# newer versions of Rust.
return
fi
rm -rf src/compiler-rt src/llvm src/rust-installer
ln -sf /sources-2/compiler-rt-$srcGitRev_2 src/compiler-rt
ln -sf /sources-3/llvm-$srcGitRev_3 src/llvm
ln -sf /sources-4/rust-installer-$srcGitRev_4 src/rust-installer
rm -r src/rt/hoedown
ln -sf /sources-5/hoedown-$srcGitRev_5 src/rt/hoedown
rm -r src/liblibc
ln -sf /sources-6/libc-$srcGitRev_6 src/liblibc
# Do not use runConfigure: it generates too much noise, and it creates a totally impossible directory structure
#runConfigure --omit-dirs "docDir libExecDir dataRootDir includeDir sharedStateDir sbinDir binDir oldIncludeDir" ./configure --disable-jemalloc --build=i686-unknown-haiku --host=i686-unknown-haiku --target=i686-unknown-haiku
./configure --prefix=$prefix --mandir=$manDir --disable-jemalloc --disable-rpath --release-channel=stable
# download the stage 0 compiler, and put it in the proper place
if [ $effectiveTargetArchitecture = x86_64 ]; then
# TODO: update x86_64 port
ln -sf /sources-7/rust-stage0-2015-11-13-c386da0-haiku-x86_64-d09b23db0ef31209a1ebc42e54177449db0985ef.tar.bz2 dl/rust-stage0-2015-11-13-c386da0-haiku-x86_64-d09b23db0ef31209a1ebc42e54177449db0985ef.tar.bz2
else
ln -sf /sources-7/rust-stage0-2016-08-07-b71ea1d-haiku-i386-bb4f6267ef13d945bdfaa443a0a007a84c8ce187.tar.bz2 dl/rust-stage0-2016-08-07-b71ea1d-haiku-i386-bb4f6267ef13d945bdfaa443a0a007a84c8ce187.tar.bz2
fi
make
}
INSTALL()
{
if [ $effectiveTargetArchitecture = x86_64 ]; then
cd /sources-8
tar xvfj rust-stage0-haiku-x86_64.tar.bz2
mkdir -p $binDir
cp rust-1.9.0-x86_64-distro/bin/rustc $binDir
return
fi
make install
# move documentation to the proper place
mkdir -p $developDocDir
mv $prefix/share/doc/rust/* $developDocDir
rm -rf $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
# move the libs to the x86 subdir
mkdir -p $libDir
mv $prefix/lib/*.so $libDir
fi
# move the `rustlib` folder to the developLibDirs (as it is a framework of sorts)
# do create a link in $prefix/lib as that is where rustc expects things to live
mkdir -p $developLibDir
mv $prefix/lib/rustlib $developLibDir
cd $prefix/lib
ln -s ../$relativeDevelopLibDir/rustlib rustlib
# clean out unneccesary files created by the rust installer
rm $developLibDir/rustlib/components
rm $developLibDir/rustlib/install.log
rm $developLibDir/rustlib/manifest-rust-docs
rm $developLibDir/rustlib/manifest-rust-std-i686-unknown-haiku
rm $developLibDir/rustlib/manifest-rustc
rm $developLibDir/rustlib/rust-installer-version
rm $developLibDir/rustlib/uninstall.sh
}
TEST()
{
if [ $effectiveTargetArchitecture = x86_64 ]; then
return
fi
make check
}