Skip to content

Commit df1f225

Browse files
committed
Build 1.50.0
1 parent dfc4c68 commit df1f225

7 files changed

+149
-0
lines changed

1.50.0/build.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/sh
2+
3+
RUSTC_BOOTSTRAP_VERSION=1.49.0
4+
CARGO_BOOTSTRAP_VERSION=1.49.0
5+
RUST_VERSION=1.50.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+
fixup-vendor-patch libc-0.2.79 src/unix/bsd/freebsdlike/dragonfly/errno.rs || exit 1
33+
}
34+
35+
RUN info clean extract prepatch fixup-vendor config xbuild xdist inst 2>&1
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- vendor/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs.orig 2021-02-10 18:18:38 UTC
2+
+++ vendor/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs
3+
@@ -1,13 +1,2 @@
4+
// DragonFlyBSD's __error function is declared with "static inline", so it must
5+
// be implemented in the libc crate, as a pointer to a static thread_local.
6+
-f! {
7+
- #[deprecated(since = "0.2.77", note = "Use `__errno_location()` instead")]
8+
- pub fn __error() -> *mut ::c_int {
9+
- &mut errno
10+
- }
11+
-}
12+
-
13+
-extern "C" {
14+
- #[thread_local]
15+
- pub static mut errno: ::c_int;
16+
-}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- library/std/src/sys/unix/os.rs.orig 2020-10-07 07:53:22 UTC
2+
+++ library/std/src/sys/unix/os.rs
3+
@@ -87,6 +87,7 @@ pub fn errno() -> i32 {
4+
}
5+
6+
#[cfg(target_os = "dragonfly")]
7+
+#[allow(dead_code)] // but not all target cfgs actually end up using it
8+
pub fn set_errno(e: i32) {
9+
extern "C" {
10+
#[thread_local]
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 2020-09-22 17:14:20 UTC
2+
+++ src/llvm-project/llvm/lib/Support/Unix/Path.inc
3+
@@ -69,13 +69,14 @@ extern char **environ;
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+
@@ -106,7 +107,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__) || (__GNU__) || \
26+
defined(__MVS__)
27+
#define STATVFS_F_FLAG(vfs) (vfs).f_flag
28+
#else
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- vendor/libc-0.2.79/src/unix/bsd/freebsdlike/dragonfly/errno.rs.orig 2021-02-10 18:18:38 UTC
2+
+++ vendor/libc-0.2.79/src/unix/bsd/freebsdlike/dragonfly/errno.rs
3+
@@ -1,13 +1,2 @@
4+
// DragonFlyBSD's __error function is declared with "static inline", so it must
5+
// be implemented in the libc crate, as a pointer to a static thread_local.
6+
-f! {
7+
- #[deprecated(since = "0.2.77", "Use `__errno_location()` instead")]
8+
- pub fn __error() -> *mut ::c_int {
9+
- &mut errno
10+
- }
11+
-}
12+
-
13+
-extern "C" {
14+
- #[thread_local]
15+
- pub static mut errno: ::c_int;
16+
-}
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+
}

0 commit comments

Comments
 (0)