Skip to content

Commit 7da1524

Browse files
committed
Build 1.62.1
1 parent b37eebe commit 7da1524

6 files changed

+108
-0
lines changed

Diff for: 1.62.1/build.sh

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
RUSTC_BOOTSTRAP_VERSION=1.61.0
4+
CARGO_BOOTSTRAP_VERSION=1.61.0
5+
RUST_VERSION=1.62.1
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 build.rs || exit 1
24+
fixup-vendor-patch openssl-sys build/cfgs.rs || exit 1
25+
}
26+
27+
RUN info clean extract prepatch fixup-vendor config xbuild xdist inst 2>&1
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
+24
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+

Diff for: 1.62.1/patches/patch-vendor_openssl_build.rs

+20
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+
}

Diff for: checksums.sh

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ SHA256_rustc_1_58_1_src_tar_gz=a839afdd3625d6f3f3c4c10b79813675d1775c460d14be1fe
4444
SHA256_rustc_1_59_0_src_tar_gz=a7c8eeaee85bfcef84c96b02b3171d1e6540d15179ff83dddd9eafba185f85f9
4545
SHA256_rustc_1_60_0_src_tar_gz=20ca826d1cf674daf8e22c4f8c4b9743af07973211c839b85839742314c838b7
4646
SHA256_rustc_1_61_0_src_tar_gz=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
47+
SHA256_rustc_1_62_1_src_tar_gz=72acbe6ffcd94f598382a7430b0d85ee8f679e6d0b27f3f566ed1c16c978133f
4748

4849
SHA256_cargo_0_27_0_x86_64_unknown_dragonfly_tar_xz=a0b670f797d01ea156cf3ca9f0a7aa2a76bfa8b35dfa779510cfedc1d82eb19b
4950
SHA256_rustc_1_26_0_x86_64_unknown_dragonfly_tar_xz=d14e5d973bfb671535212460d7eca2552379150ffc207712e825f06febdd57c6
@@ -185,3 +186,7 @@ SHA256_cargo_1_60_0_x86_64_unknown_dragonfly_tar_xz=2bba04fbfb41dafc58c711ac3e8a
185186
SHA256_rustc_1_60_0_x86_64_unknown_dragonfly_tar_xz=bd10a519b4e53e64020c4c900c2dc11591c725c029583b3eb7029f739bb196b1
186187
SHA256_rust_std_1_60_0_x86_64_unknown_dragonfly_tar_xz=42d56c7526b61de4d64156a8c520e3ed9c879b683f8fa9527207b1ea72fd16eb
187188

189+
SHA256_cargo_1_61_0_x86_64_unknown_dragonfly_tar_xz=8a67a560d69603b0704a8112c9eb5990c89dd950c91b8fae1e75b4f576c4f7a7
190+
SHA256_rustc_1_61_0_x86_64_unknown_dragonfly_tar_xz=40dc6b7bdc82f661dd6321f4b50bd12390620fcb8f5458b4e1a1b22ac7972adf
191+
SHA256_rust_std_1_61_0_x86_64_unknown_dragonfly_tar_xz=359d1be2bd00bd8e788e7901efd0d9845afeb796a8be5f1aebe1fabe07ac3627
192+

Diff for: common.sh

+4
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ create-config() {
183183
$DEST/rustc-$RUST_VERSION-src/config.toml
184184
}
185185

186+
# Disable llvm static linking against libstdc++
187+
# https://github.com/rust-lang/rust/pull/94832
186188
config() {
187189
cd $DEST/rustc-$RUST_VERSION-src
188190
./configure \
@@ -195,6 +197,8 @@ config() {
195197
--sysconfdir=${DEST_INSTALL}/etc \
196198
--prefix=${DEST_INSTALL} \
197199
--python=/usr/local/bin/python \
200+
--disable-llvm-static-stdcpp \
201+
--disable-docs \
198202
${LLVM_ROOT_OPT}
199203
}
200204

0 commit comments

Comments
 (0)