Skip to content

Commit dde37e9

Browse files
committed
Import files from dragonfly-rust-bootstrap
1 parent 268cb51 commit dde37e9

14 files changed

+397
-0
lines changed

1.23.0/build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
# Must be set to the directory where a recent rust snapshot can be found.
4+
# BOOTSTRAP_DIR=
5+
6+
RUSTC_BOOTSTRAP_VERSION=1.22.1
7+
CARGO_BOOTSTRAP_VERSION=0.23.0
8+
RUST_VERSION=1.23.0
9+
10+
BASE=`pwd`
11+
DEST=$1
12+
LLVM_ROOT=""
13+
14+
. ../checksums.sh
15+
. ../common.sh
16+
17+
fixup-vendor() {
18+
fixup-vendor-patch curl-sys build.rs || exit 1
19+
}
20+
21+
RUN info clean extract prepatch fixup-vendor config build dist inst 2>&1
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- src/llvm/cmake/modules/HandleLLVMOptions.cmake.orig 2017-06-26 10:55:45.047965000 +0200
2+
+++ src/llvm/cmake/modules/HandleLLVMOptions.cmake 2017-06-26 10:55:52.978184000 +0200
3+
@@ -106,6 +106,7 @@
4+
${TARGET_TRIPLE} MATCHES "windows" OR
5+
${TARGET_TRIPLE} MATCHES "mingw" OR
6+
${TARGET_TRIPLE} MATCHES "freebsd" OR
7+
+ ${TARGET_TRIPLE} MATCHES "dragonfly" OR
8+
${TARGET_TRIPLE} MATCHES "netbsd" OR
9+
${TARGET_TRIPLE} MATCHES "openbsd") AND
10+
NOT LLVM_USE_SANITIZER)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--- src/vendor/curl-sys/build.rs.orig
2+
+++ src/vendor/curl-sys/build.rs
3+
@@ -172,7 +172,7 @@ fn main() {
4+
}
5+
6+
cmd.arg("--without-librtmp");
7+
- cmd.arg("--without-libidn");
8+
+ cmd.arg("--without-libidn2");
9+
cmd.arg("--without-libssh2");
10+
cmd.arg("--without-libpsl");
11+
cmd.arg("--disable-ldap");
12+
@@ -224,7 +224,7 @@ fn fail(s: &str) -> ! {
13+
}
14+
15+
fn make() -> Command {
16+
- let cmd = if cfg!(target_os = "freebsd") {"gmake"} else {"make"};
17+
+ let cmd = if cfg!(target_os = "dragonfly") {"gmake"} else {"make"};
18+
let mut cmd = Command::new(cmd);
19+
// We're using the MSYS make which doesn't work with the mingw32-make-style
20+
// MAKEFLAGS, so remove that from the env if present.
21+

1.24.0/build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
# Must be set to the directory where a recent rust snapshot can be found.
4+
# BOOTSTRAP_DIR=
5+
6+
RUSTC_BOOTSTRAP_VERSION=1.23.0
7+
CARGO_BOOTSTRAP_VERSION=0.24.0
8+
RUST_VERSION=1.24.0
9+
10+
BASE=`pwd`
11+
DEST=$1
12+
LLVM_ROOT=""
13+
14+
. ../checksums.sh
15+
. ../common.sh
16+
17+
fixup-vendor() {
18+
fixup-vendor-patch curl-sys build.rs || exit 1
19+
}
20+
21+
RUN info clean extract prepatch fixup-vendor config build dist inst 2>&1
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- src/llvm/cmake/modules/HandleLLVMOptions.cmake.orig 2017-06-26 10:55:45.047965000 +0200
2+
+++ src/llvm/cmake/modules/HandleLLVMOptions.cmake 2017-06-26 10:55:52.978184000 +0200
3+
@@ -106,6 +106,7 @@
4+
${TARGET_TRIPLE} MATCHES "windows" OR
5+
${TARGET_TRIPLE} MATCHES "mingw" OR
6+
${TARGET_TRIPLE} MATCHES "freebsd" OR
7+
+ ${TARGET_TRIPLE} MATCHES "dragonfly" OR
8+
${TARGET_TRIPLE} MATCHES "netbsd" OR
9+
${TARGET_TRIPLE} MATCHES "openbsd") AND
10+
NOT LLVM_USE_SANITIZER)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--- src/vendor/curl-sys/build.rs.orig
2+
+++ src/vendor/curl-sys/build.rs
3+
@@ -172,7 +172,7 @@ fn main() {
4+
}
5+
6+
cmd.arg("--without-librtmp");
7+
- cmd.arg("--without-libidn");
8+
+ cmd.arg("--without-libidn2");
9+
cmd.arg("--without-libssh2");
10+
cmd.arg("--without-libpsl");
11+
cmd.arg("--disable-ldap");
12+
@@ -224,7 +224,7 @@ fn fail(s: &str) -> ! {
13+
}
14+
15+
fn make() -> Command {
16+
- let cmd = if cfg!(target_os = "freebsd") {"gmake"} else {"make"};
17+
+ let cmd = if cfg!(target_os = "dragonfly") {"gmake"} else {"make"};
18+
let mut cmd = Command::new(cmd);
19+
// We're using the MSYS make which doesn't work with the mingw32-make-style
20+
// MAKEFLAGS, so remove that from the env if present.
21+

1.25.0/build.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
# Must be set to the directory where a recent rust snapshot can be found.
4+
# BOOTSTRAP_DIR=
5+
6+
RUSTC_BOOTSTRAP_VERSION=1.24.0
7+
CARGO_BOOTSTRAP_VERSION=0.25.0
8+
RUST_VERSION=1.25.0
9+
10+
BASE=`pwd`
11+
DEST=$1
12+
LLVM_ROOT=""
13+
14+
. ../checksums.sh
15+
. ../common.sh
16+
17+
RUN info clean extract prepatch config build dist inst 2>&1
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- src/llvm/cmake/modules/HandleLLVMOptions.cmake.orig 2018-03-10 02:51:13 UTC
2+
+++ src/llvm/cmake/modules/HandleLLVMOptions.cmake
3+
@@ -146,6 +146,7 @@ endif()
4+
# build might work on ELF but fail on MachO/COFF.
5+
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
6+
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
7+
+ ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" OR
8+
${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
9+
NOT LLVM_USE_SANITIZER)
10+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- src/llvm/lib/Support/Unix/Path.inc.orig 2018-04-04 15:39:54 UTC
2+
+++ src/llvm/lib/Support/Unix/Path.inc
3+
@@ -68,13 +68,13 @@
4+
5+
#include <sys/types.h>
6+
#if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && \
7+
- !defined(__linux__)
8+
+ !defined(__DragonFly__) && !defined(__linux__)
9+
#include <sys/statvfs.h>
10+
#define STATVFS statvfs
11+
#define FSTATVFS fstatvfs
12+
#define STATVFS_F_FRSIZE(vfs) vfs.f_frsize
13+
#else
14+
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
15+
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
16+
#include <sys/mount.h>
17+
#include <sys/param.h>
18+
#elif defined(__linux__)

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
# rust-bootstrap-dragonfly
2+
23
Boostrapping the Rust compiler on DragonFlyBSD (Scripts only, no binaries)
4+
5+
## Build dependencies
6+
7+
* devel/llvm50
8+
* lang/python27
9+
* devel/cmake
10+
* security/libssh

0 commit comments

Comments
 (0)