Skip to content

Commit 0a0abce

Browse files
committed
Build 1.42.0
1 parent c15df7c commit 0a0abce

8 files changed

+144
-0
lines changed

1.42.0/build.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
3+
RUSTC_BOOTSTRAP_VERSION=1.41.0
4+
CARGO_BOOTSTRAP_VERSION=0.42.0
5+
RUST_VERSION=1.42.0
6+
7+
CONFIGURE_CARGO_STATIC_FLAGS="--enable-cargo-native-static"
8+
9+
# XXX: miri does not build correctly that's why we need the flag below.
10+
ADDITIONAL_CONFIGURE_FLAGS="--enable-missing-tools"
11+
12+
# Since rust 1.38, OPENSSL_DIR has to be specified.
13+
export OPENSSL_DIR="/usr/local"
14+
15+
BASE=`pwd`
16+
DEST=$1
17+
LLVM_ROOT=""
18+
19+
. ../checksums.sh
20+
. ../common.sh
21+
22+
fixup-vendor() {
23+
fixup-vendor-patch openssl src/version.rs || exit 1
24+
fixup-vendor-patch openssl src/ssl/mod.rs || exit 1
25+
fixup-vendor-patch openssl build.rs || exit 1
26+
fixup-vendor-patch openssl-sys build/main.rs || exit 1
27+
fixup-vendor-patch openssl-sys build/cfgs.rs || exit 1
28+
fixup-vendor-patch openssl-sys src/ssl.rs || exit 1
29+
fixup-vendor-patch openssl-sys src/crypto.rs || exit 1
30+
fixup-vendor-patch libc src/unix/bsd/freebsdlike/dragonfly/mod.rs || exit 1
31+
fixup-vendor-patch libc src/lib.rs || exit 1
32+
}
33+
34+
RUN info clean extract prepatch fixup-vendor config xbuild xdist inst 2>&1
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--- src/llvm-project/llvm/lib/Support/Unix/Path.inc.orig 2019-09-09 18:30:53 UTC
2+
+++ src/llvm-project/llvm/lib/Support/Unix/Path.inc
3+
@@ -56,13 +56,14 @@
4+
5+
#include <sys/types.h>
6+
#if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && \
7+
- !defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(_AIX)
8+
+ !defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(_AIX) && \
9+
+ !defined(__DragonFly__)
10+
#include <sys/statvfs.h>
11+
#define STATVFS statvfs
12+
#define FSTATVFS fstatvfs
13+
#define STATVFS_F_FRSIZE(vfs) vfs.f_frsize
14+
#else
15+
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
16+
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
17+
#include <sys/mount.h>
18+
#include <sys/param.h>
19+
#elif defined(__linux__)
20+
@@ -93,7 +94,7 @@ typedef uint_t uint;
21+
#define STATVFS_F_FRSIZE(vfs) static_cast<uint64_t>(vfs.f_bsize)
22+
#endif
23+
24+
-#if defined(__NetBSD__) || defined(__DragonFly__) || defined(__GNU__)
25+
+#if defined(__NetBSD__) || defined(__GNU__)
26+
#define STATVFS_F_FLAG(vfs) (vfs).f_flag
27+
#else
28+
#define STATVFS_F_FLAG(vfs) (vfs).f_flags
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- vendor/libc/src/lib.rs.orig 2019-11-04 17:34:41 UTC
2+
+++ vendor/libc/src/lib.rs
3+
@@ -21,7 +21,7 @@
4+
feature = "rustc-dep-of-std",
5+
feature(cfg_target_vendor, link_cfg, no_core)
6+
)]
7+
-#![cfg_attr(libc_thread_local, feature(thread_local))]
8+
+#![feature(thread_local)]
9+
// Enable extra lints:
10+
#![cfg_attr(feature = "extra_traits", deny(missing_debug_implementations))]
11+
#![deny(missing_copy_implementations, safe_packed_borrows)]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--- vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs.orig 2019-12-16 17:26:11 UTC
2+
+++ vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
3+
@@ -1053,7 +1053,18 @@ f! {
4+
}
5+
}
6+
7+
+// DragonFlyBSD's __error function is declared with "static inline", so it must
8+
+// be implemented in the libc crate, as a pointer to a static thread_local.
9+
+f! {
10+
+ pub fn __error() -> *mut ::c_int {
11+
+ &mut errno
12+
+ }
13+
+}
14+
+
15+
extern "C" {
16+
+ #[thread_local]
17+
+ pub static mut errno: ::c_int;
18+
+
19+
pub fn setgrent();
20+
pub fn mprotect(
21+
addr: *mut ::c_void,
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--- vendor/openssl-sys/build/cfgs.rs.orig 2020-01-27 17:21:00 UTC
2+
+++ vendor/openssl-sys/build/cfgs.rs
3+
@@ -28,6 +28,21 @@ pub fn get(openssl_version: Option<u64>,
4+
if libressl_version >= 0x2_09_01_00_0 {
5+
cfgs.push("libressl291");
6+
}
7+
+ if libressl_version >= 0x2_09_02_00_0 {
8+
+ cfgs.push("libressl292");
9+
+ }
10+
+
11+
+ if libressl_version >= 0x3_00_00_00_0 {
12+
+ cfgs.push("libressl300");
13+
+ }
14+
+
15+
+ if libressl_version >= 0x3_00_01_00_0 {
16+
+ cfgs.push("libressl301");
17+
+ }
18+
+
19+
+ if libressl_version >= 0x3_00_02_00_0 {
20+
+ cfgs.push("libressl302");
21+
+ }
22+
} else {
23+
let openssl_version = openssl_version.unwrap();
24+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- vendor/openssl/build.rs.orig 2020-01-27 17:21:00 UTC
2+
+++ vendor/openssl/build.rs
3+
@@ -61,5 +61,17 @@ fn main() {
4+
if version >= 0x2_09_01_00_0 {
5+
println!("cargo:rustc-cfg=libressl291");
6+
}
7+
+
8+
+ if version >= 0x3_00_00_00_0 {
9+
+ println!("cargo:rustc-cfg=libressl300");
10+
+ }
11+
+
12+
+ if version >= 0x3_00_01_00_0 {
13+
+ println!("cargo:rustc-cfg=libressl301");
14+
+ }
15+
+
16+
+ if version >= 0x3_00_02_00_0 {
17+
+ println!("cargo:rustc-cfg=libressl302");
18+
+ }
19+
}
20+
}

checksums.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ SHA256_rustc_1_38_0_src_tar_gz=644263ca7c7106f8ee8fcde6bb16910d246b30668a74be20b
2323
SHA256_rustc_1_39_0_src_tar_gz=b4a1f6b6a93931f270691aba4fc85eee032fecda973e6b9c774cd06857609357
2424
SHA256_rustc_1_40_0_src_tar_gz=dd97005578defc10a482bff3e4e728350d2099c60ffcf1f5e189540c39a549ad
2525
SHA256_rustc_1_41_0_src_tar_gz=5546822c09944c4d847968e9b7b3d0e299f143f307c00fa40e84a99fabf8d74b
26+
SHA256_rustc_1_42_0_src_tar_gz=d2e8f931d16a0539faaaacd801e0d92c58df190269014b2360c6ab2a90ee3475
2627

2728
SHA256_cargo_0_27_0_x86_64_unknown_dragonfly_tar_xz=a0b670f797d01ea156cf3ca9f0a7aa2a76bfa8b35dfa779510cfedc1d82eb19b
2829
SHA256_rustc_1_26_0_x86_64_unknown_dragonfly_tar_xz=d14e5d973bfb671535212460d7eca2552379150ffc207712e825f06febdd57c6
@@ -84,3 +85,7 @@ SHA256_cargo_0_41_0_x86_64_unknown_dragonfly_tar_xz=c5f1fdd42aad458461eaaf75e441
8485
SHA256_rustc_1_40_0_x86_64_unknown_dragonfly_tar_xz=cb159091ebe6d709b050bb6495103f8cc04a233c3768bc6de47a8937ec7e1f11
8586
SHA256_rust_std_1_40_0_x86_64_unknown_dragonfly_tar_xz=c7ed9e60314ebe69bbb6da1c4b0d76819decbc1d55ad2f9a2fd2ee4f4c72aeec
8687

88+
SHA256_cargo_0_42_0_x86_64_unknown_dragonfly_tar_xz=58af8a92f8bf09d0bfecce641a95df40dad821438ffffd4f5283ac17b9766604
89+
SHA256_rustc_1_41_0_x86_64_unknown_dragonfly_tar_xz=f5fe54d3228b9b88f9b308d53e2a35678979072f13e9ec229b7c011fe86d142b
90+
SHA256_rust_std_1_41_0_x86_64_unknown_dragonfly_tar_xz=1ff3628ae1a9e869f9291a13a97015a3a3a8f09990673335225b883b4eb80739
91+

common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export LD_LIBRARY_PATH="${BOOTSTRAP_COMPILER_BASE}/lib:$LD_LIBRARY_PATH"
9494

9595
# for static cargo
9696
export LIBSSH2_NO_PKG_CONFIG=1
97+
export LIBGIT2_NO_PKG_CONFIG=1
9798
export LIBCURL_NO_PKG_CONFIG=1
9899
export LIBZ_NO_PKG_CONFIG=1
99100
export PROFILE=release

0 commit comments

Comments
 (0)