aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2018-02-24 06:17:17 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2018-02-24 06:17:17 +0000
commit01b60efd6f1dcb88ae5af68b322e65c319909022 (patch)
tree117b807343b8d48b2603671aeba52d6ec1fee64d /lang
parentd1c499f952c799b5eb2786cad266fb8b24bb030d (diff)
downloadports-01b60efd6f1dcb88ae5af68b322e65c319909022.tar.gz
ports-01b60efd6f1dcb88ae5af68b322e65c319909022.zip
Unbreak on i386/amd64 and update to 1.25.0-2018-02-19
- Stop using git to build as it is unmaintainable due to submodules, but more importantly because src/vendor is no longer bundled. Just fetch the source already generated that has all dependencies bundled. It may be a bit slower to get updates but is far more maintainable. - Copy all patches to lang/rust-nightly/files since they may not always apply exactly between both versions. - Add in patch for llvm-config getting -lexecinfo wrong, this is in review with LLVM at https://reviews.llvm.org/D42702. - Bring in other random updates from lang/rust.
Notes
Notes: svn path=/head/; revision=462769
Diffstat (limited to 'lang')
-rw-r--r--lang/rust-nightly/Makefile30
-rw-r--r--lang/rust-nightly/distinfo44
-rw-r--r--lang/rust-nightly/files/extra-patch-ino64385
-rw-r--r--lang/rust-nightly/files/patch-configure10
-rw-r--r--lang/rust-nightly/files/patch-src_binaryen_CMakeLists.txt60
-rw-r--r--lang/rust-nightly/files/patch-src_libbacktrace_fileline.c42
-rw-r--r--lang/rust-nightly/files/patch-src_librustc__back_target_freebsd__base.rs13
-rw-r--r--lang/rust-nightly/files/patch-src_librustc__back_target_i686__unknown__freebsd.rs11
-rw-r--r--lang/rust-nightly/files/patch-src_librustc__llvm_build.rs11
-rw-r--r--lang/rust-nightly/files/patch-src_llvm_lib_Support_CMakeLists.txt13
-rw-r--r--lang/rust-nightly/files/patch-src_llvm_utils_llvm-build_llvmbuild_main.py11
-rw-r--r--lang/rust/Makefile3
12 files changed, 562 insertions, 71 deletions
diff --git a/lang/rust-nightly/Makefile b/lang/rust-nightly/Makefile
index e9273a178429..907d2a449bca 100644
--- a/lang/rust-nightly/Makefile
+++ b/lang/rust-nightly/Makefile
@@ -1,36 +1,26 @@
# Created by: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
# $FreeBSD$
-PORTVERSION= 1.17.0.20170212
+PORTVERSION= 1.25.0.${NIGHTLY_DATE:C,-,,g}
PKGNAMESUFFIX= -nightly
-DISTNAME= #
-DISTFILES= ${BOOTSTRAP_FILES}
+DISTNAME= rustc-nightly-src
MASTERDIR= ${.CURDIR}/../rust
-PATCHDIR= ${.CURDIR}/files
DISTINFO_FILE= ${.CURDIR}/distinfo
-USE_GITHUB= yes
-GH_TUPLE= rust-lang:rust:282fa87 \
- rust-lang:compiler-rt:d30da54:compiler_rt/src/compiler-rt \
- rust-lang:hoedown:da282f1:hoedown/src/rt/hoedown \
- rust-lang:jemalloc:11bfb0d:jemalloc/src/jemalloc \
- rust-lang:libc:8d8264b:liblibc/src/liblibc \
- rust-lang:rust-installer:4f99485:rust_installer/src/rust-installer
-
-BROKEN= needs to be adapted after changes in lang/rust
-DEPRECATED= Broken for more than 6 months
-EXPIRATION_DATE= 2018-03-19
-
CONFLICTS_BUILD= rust # see FIXME in `pre-fetch` in lang/rust/Makefile
CONFLICTS_INSTALL= rust
-PKGMESSAGE= ${.CURDIR}/../rust/pkg-message
+# Which source to pull:
+# https://static.rust-lang.org/dist/${NIGHTLY_DATE}/rustc-nightly-src.tar.gz
+NIGHTLY_DATE= 2018-02-19
+NIGHTLY_SUBDIR= ${NIGHTLY_DATE}/
-RUST_BOOTSTRAP_DIR= 2017-02-01
+# See WRKSRC/src/stage0.txt for this date
+BOOTSTRAPS_DATE= 2018-01-02
RUST_BOOTSTRAP_VERSION= beta
+CARGO_BOOTSTRAP_VERSION= beta
-CARGO_BOOTSTRAP_DIR= bfee18f73287687c543bda8c35e4e33808792715
-CARGO_BOOTSTRAP_VERSION= nightly
+ONLY_FOR_ARCHS= i386 amd64
.include "${MASTERDIR}/Makefile"
diff --git a/lang/rust-nightly/distinfo b/lang/rust-nightly/distinfo
index f7c6c6d2613a..e951493d6064 100644
--- a/lang/rust-nightly/distinfo
+++ b/lang/rust-nightly/distinfo
@@ -1,29 +1,15 @@
-TIMESTAMP = 1486939425
-SHA256 (rust/2017-02-01/rustc-beta-x86_64-unknown-freebsd.tar.gz) = 7eb2af5e61aab30e3678aa9db15f124966e709bb9d635df11e00e807c61dd16a
-SIZE (rust/2017-02-01/rustc-beta-x86_64-unknown-freebsd.tar.gz) = 41101034
-SHA256 (rust/2017-02-01/rust-std-beta-x86_64-unknown-freebsd.tar.gz) = a6c1ec233c4d2292ae7c1cd128b6792f561b408b4fa2a50e6baffee113052cd0
-SIZE (rust/2017-02-01/rust-std-beta-x86_64-unknown-freebsd.tar.gz) = 54926610
-SHA256 (rust/bfee18f73287687c543bda8c35e4e33808792715/cargo-nightly-x86_64-unknown-freebsd.tar.gz) = 4c3ac6008e112916db3dac7049babe77baad2d3f479c683706571c1e5f2a576b
-SIZE (rust/bfee18f73287687c543bda8c35e4e33808792715/cargo-nightly-x86_64-unknown-freebsd.tar.gz) = 4981466
-SHA256 (rust/2017-02-01/rustc-beta-i686-unknown-freebsd.tar.gz) = 9cb43cf8fb35e56ba9cb4c86a7a28c4db90898f2890a98debc771a2f5c062aad
-SIZE (rust/2017-02-01/rustc-beta-i686-unknown-freebsd.tar.gz) = 42818277
-SHA256 (rust/2017-02-01/rust-std-beta-i686-unknown-freebsd.tar.gz) = f51cc32f6c24b32309e3b49423c716f036c12deb6aabfc274ec48092f6de46ff
-SIZE (rust/2017-02-01/rust-std-beta-i686-unknown-freebsd.tar.gz) = 56176862
-SHA256 (rust/bfee18f73287687c543bda8c35e4e33808792715/cargo-nightly-i686-unknown-freebsd.tar.gz) = bfa152e787369f629294c8d85e2d6afce3730fe78bd469e2fbc3be731c795f7f
-SIZE (rust/bfee18f73287687c543bda8c35e4e33808792715/cargo-nightly-i686-unknown-freebsd.tar.gz) = 4795563
-SHA256 (rust/rust-registry-1.17.0.20170212.tar.xz) = 589f0d1fdc0f8c7ccf4c6d9b07b54cef5daa784ad7657be93cd9a1f2faac87ef
-SIZE (rust/rust-registry-1.17.0.20170212.tar.xz) = 2915044
-SHA256 (rust/rust-lang-rust-1.17.0.20170212-282fa87_GH0.tar.gz) = e5f131ce5121366cb49c398f1a2f0a24778127ca66f6247871ecfe00547a2759
-SIZE (rust/rust-lang-rust-1.17.0.20170212-282fa87_GH0.tar.gz) = 6922864
-SHA256 (rust/rust-lang-compiler-rt-d30da54_GH0.tar.gz) = be5584a5940e8b0fb697a3b1c9fcd8c72473ce23e32d6a8757786aa1a22518fb
-SIZE (rust/rust-lang-compiler-rt-d30da54_GH0.tar.gz) = 2379819
-SHA256 (rust/rust-lang-hoedown-da282f1_GH0.tar.gz) = f560d87ca049942ff527512543605968f03d36d5c5f366bbddcda8dd375eceb7
-SIZE (rust/rust-lang-hoedown-da282f1_GH0.tar.gz) = 69232
-SHA256 (rust/rust-lang-jemalloc-11bfb0d_GH0.tar.gz) = f372479de2388fd27930d525dc243d794af33f636966b42043a6ff0f35b096e5
-SIZE (rust/rust-lang-jemalloc-11bfb0d_GH0.tar.gz) = 470843
-SHA256 (rust/rust-lang-libc-8d8264b_GH0.tar.gz) = cb7b05a487fbffbf25dfb74e903d29f1bf64562aeda2b91e79a7d98519bdc8ab
-SIZE (rust/rust-lang-libc-8d8264b_GH0.tar.gz) = 134142
-SHA256 (rust/rust-lang-rust-installer-4f99485_GH0.tar.gz) = daa34a28d8fe64dd358e5a0c3a83b7018da6df41c9b4420d28ffdb8b05a82478
-SIZE (rust/rust-lang-rust-installer-4f99485_GH0.tar.gz) = 19990
-SHA256 (rust/rust-lang-llvm-ceb177e_GH0.tar.gz) = cab8e64a987fdb4a8f8bef083e9b1f6cdd4397bb2ce5825c119a9057cb0d0da4
-SIZE (rust/rust-lang-llvm-ceb177e_GH0.tar.gz) = 26271233
+TIMESTAMP = 1519452432
+SHA256 (rust/2018-02-19/rustc-nightly-src.tar.xz) = 509703b2411ca480f5c06b41425388648672f9fe827bd3ce5395753c356a2425
+SIZE (rust/2018-02-19/rustc-nightly-src.tar.xz) = 52974588
+SHA256 (rust/2018-01-02/rustc-beta-x86_64-unknown-freebsd.tar.gz) = 807e121b18661b5ad8ea64ff6e0f64205af8565219ebbd2120037166bdc7311b
+SIZE (rust/2018-01-02/rustc-beta-x86_64-unknown-freebsd.tar.gz) = 62532641
+SHA256 (rust/2018-01-02/rust-std-beta-x86_64-unknown-freebsd.tar.gz) = 5fd52e76a5e137d960edbbd5676fefaa0cad32ae98e723ad5990b86fa3df29a3
+SIZE (rust/2018-01-02/rust-std-beta-x86_64-unknown-freebsd.tar.gz) = 81901991
+SHA256 (rust/2018-01-02/cargo-beta-x86_64-unknown-freebsd.tar.gz) = 8075ca816c15ca429cfa306284cc9c06c68a2c2a8c1c86c75c5c34e954ca05d0
+SIZE (rust/2018-01-02/cargo-beta-x86_64-unknown-freebsd.tar.gz) = 5598173
+SHA256 (rust/2018-01-02/rustc-beta-i686-unknown-freebsd.tar.gz) = 1ecb0a14d39df1fa3cbdce1a4b03f94cf19cb172b4bd8181457079e81bb2e876
+SIZE (rust/2018-01-02/rustc-beta-i686-unknown-freebsd.tar.gz) = 63778566
+SHA256 (rust/2018-01-02/rust-std-beta-i686-unknown-freebsd.tar.gz) = e5871d96ea6d9fab0ebdb7c47621545255407975b62f768aef8eec3f6ca90f67
+SIZE (rust/2018-01-02/rust-std-beta-i686-unknown-freebsd.tar.gz) = 82314542
+SHA256 (rust/2018-01-02/cargo-beta-i686-unknown-freebsd.tar.gz) = c4bf5b40291e051ffd46375aac0576c5213f0c782b2efd99a2fb8911634ae4d2
+SIZE (rust/2018-01-02/cargo-beta-i686-unknown-freebsd.tar.gz) = 5452446
diff --git a/lang/rust-nightly/files/extra-patch-ino64 b/lang/rust-nightly/files/extra-patch-ino64
new file mode 100644
index 000000000000..1c2bcfb6de34
--- /dev/null
+++ b/lang/rust-nightly/files/extra-patch-ino64
@@ -0,0 +1,385 @@
+--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs.orig 2017-04-24 18:56:45.000000000 +0000
++++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs 2017-05-30 07:55:40.703709000 +0000
+@@ -7,10 +7,12 @@
+ pub struct stat {
+ pub st_dev: ::dev_t,
+ pub st_ino: ::ino_t,
+- pub st_mode: ::mode_t,
+ pub st_nlink: ::nlink_t,
++ pub st_mode: ::mode_t,
++ pub st_pad0: ::uint16_t,
+ pub st_uid: ::uid_t,
+ pub st_gid: ::gid_t,
++ pub st_pad1: ::uint32_t,
+ pub st_rdev: ::dev_t,
+ pub st_atime: ::time_t,
+ pub st_atime_nsec: ::c_long,
+@@ -18,13 +20,13 @@
+ pub st_mtime_nsec: ::c_long,
+ pub st_ctime: ::time_t,
+ pub st_ctime_nsec: ::c_long,
++ pub st_birthtime: ::time_t,
++ pub st_birthtime_nsec: ::c_long,
+ pub st_size: ::off_t,
+ pub st_blocks: ::blkcnt_t,
+ pub st_blksize: ::blksize_t,
+ pub st_flags: ::fflags_t,
+- pub st_gen: ::uint32_t,
+- pub st_lspare: ::int32_t,
+- pub st_birthtime: ::time_t,
+- pub st_birthtime_nsec: ::c_long,
++ pub st_gen: ::uint64_t,
++ pub st_spare: [::uint64_t; 10],
+ }
+ }
+--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2017-04-24 18:56:45.000000000 +0000
++++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/mod.rs 2017-05-25 16:28:37.280076000 +0000
+@@ -1,8 +1,8 @@
+ pub type fflags_t = u32;
+ pub type clock_t = i32;
+-pub type ino_t = u32;
++pub type ino_t = u64;
+ pub type lwpid_t = i32;
+-pub type nlink_t = u16;
++pub type nlink_t = u64;
+ pub type blksize_t = u32;
+ pub type clockid_t = ::c_int;
+ pub type sem_t = _sem;
+@@ -40,10 +40,13 @@
+ }
+
+ pub struct dirent {
+- pub d_fileno: u32,
++ pub d_fileno: u64,
++ pub d_off: u64,
+ pub d_reclen: u16,
+ pub d_type: u8,
+- pub d_namlen: u8,
++ pub d_pad0: u8,
++ pub d_namlen: u16,
++ pub d_pad1: u16,
+ pub d_name: [::c_char; 256],
+ }
+
+--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/x86.rs.orig 2017-04-24 18:56:45.000000000 +0000
++++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/x86.rs 2017-05-25 16:25:42.303616000 +0000
+@@ -7,25 +7,30 @@
+ pub struct stat {
+ pub st_dev: ::dev_t,
+ pub st_ino: ::ino_t,
+- pub st_mode: ::mode_t,
+ pub st_nlink: ::nlink_t,
++ pub st_mode: ::mode_t,
++ pub st_pad0: ::uint16_t,
+ pub st_uid: ::uid_t,
+ pub st_gid: ::gid_t,
++ pub st_pad1: ::uint32_t,
+ pub st_rdev: ::dev_t,
++ pub st_atime_ext: ::int32_t,
+ pub st_atime: ::time_t,
+ pub st_atime_nsec: ::c_long,
++ pub st_mtime_ext: ::int32_t,
+ pub st_mtime: ::time_t,
+ pub st_mtime_nsec: ::c_long,
++ pub st_ctime_ext: ::int32_t,
+ pub st_ctime: ::time_t,
+ pub st_ctime_nsec: ::c_long,
++ pub st_birthtime_ext: ::int32_t,
++ pub st_birthtime: ::time_t,
++ pub st_birthtime_nsec: ::c_long,
+ pub st_size: ::off_t,
+ pub st_blocks: ::blkcnt_t,
+ pub st_blksize: ::blksize_t,
+ pub st_flags: ::fflags_t,
+- pub st_gen: ::uint32_t,
+- pub st_lspare: ::int32_t,
+- pub st_birthtime: ::time_t,
+- pub st_birthtime_nsec: ::c_long,
+- __unused: [u8; 8],
++ pub st_gen: ::uint64_t,
++ pub st_spare: [::uint64_t; 10],
+ }
+ }
+--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs.orig 2017-04-24 18:56:45.000000000 +0000
++++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs 2017-05-25 16:25:42.303910000 +0000
+@@ -7,10 +7,12 @@
+ pub struct stat {
+ pub st_dev: ::dev_t,
+ pub st_ino: ::ino_t,
+- pub st_mode: ::mode_t,
+ pub st_nlink: ::nlink_t,
++ pub st_mode: ::mode_t,
++ pub st_pad0: ::uint16_t,
+ pub st_uid: ::uid_t,
+ pub st_gid: ::gid_t,
++ pub st_pad1: ::uint32_t,
+ pub st_rdev: ::dev_t,
+ pub st_atime: ::time_t,
+ pub st_atime_nsec: ::c_long,
+@@ -18,13 +20,13 @@
+ pub st_mtime_nsec: ::c_long,
+ pub st_ctime: ::time_t,
+ pub st_ctime_nsec: ::c_long,
++ pub st_birthtime: ::time_t,
++ pub st_birthtime_nsec: ::c_long,
+ pub st_size: ::off_t,
+ pub st_blocks: ::blkcnt_t,
+ pub st_blksize: ::blksize_t,
+ pub st_flags: ::fflags_t,
+- pub st_gen: ::uint32_t,
+- pub st_lspare: ::int32_t,
+- pub st_birthtime: ::time_t,
+- pub st_birthtime_nsec: ::c_long,
++ pub st_gen: ::uint64_t,
++ pub st_spare: [::uint64_t; 10],
+ }
+ }
+--- ./src/liblibc/src/unix/bsd/freebsdlike/mod.rs.orig 2017-04-24 18:56:45.000000000 +0000
++++ ./src/liblibc/src/unix/bsd/freebsdlike/mod.rs 2017-05-25 16:25:42.304391000 +0000
+@@ -1,4 +1,4 @@
+-pub type dev_t = u32;
++pub type dev_t = u64;
+ pub type mode_t = u16;
+ pub type pthread_attr_t = *mut ::c_void;
+ pub type rlim_t = i64;
+--- ./src/libstd/os/freebsd/raw.rs.orig 2017-04-24 18:53:46.000000000 +0000
++++ ./src/libstd/os/freebsd/raw.rs 2017-05-25 16:25:42.304715000 +0000
+@@ -38,32 +38,52 @@
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub struct stat {
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+- pub st_dev: u32,
++ pub st_dev: u64,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+- pub st_ino: u32,
++ pub st_ino: u64,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
++ pub st_nlink: u64,
++ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_mode: u16,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+- pub st_nlink: u16,
++ pub st_pad0: u16,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_uid: u32,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_gid: u32,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+- pub st_rdev: u32,
++ pub st_pad1: u32,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
++ pub st_rdev: u64,
++ #[cfg(target_arch = "x86")]
++ #[stable(feature = "raw_ext", since = "1.1.0")]
++ pub st_atime_ext: c_long,
++ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_atime: c_long,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_atime_nsec: c_long,
++ #[cfg(target_arch = "x86")]
+ #[stable(feature = "raw_ext", since = "1.1.0")]
++ pub st_mtime_ext: c_long,
++ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_mtime: c_long,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_mtime_nsec: c_long,
++ #[cfg(target_arch = "x86")]
+ #[stable(feature = "raw_ext", since = "1.1.0")]
++ pub st_ctime_ext: c_long,
++ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_ctime: c_long,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_ctime_nsec: c_long,
++ #[cfg(target_arch = "x86")]
+ #[stable(feature = "raw_ext", since = "1.1.0")]
++ pub st_birthtime_ext: c_long,
++ #[stable(feature = "raw_ext", since = "1.1.0")]
++ pub st_birthtime: c_long,
++ #[stable(feature = "raw_ext", since = "1.1.0")]
++ pub st_birthtime_nsec: c_long,
++ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_size: i64,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_blocks: i64,
+@@ -72,14 +92,7 @@
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub st_flags: u32,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+- pub st_gen: u32,
++ pub st_gen: u64,
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+- pub st_lspare: i32,
+- #[stable(feature = "raw_ext", since = "1.1.0")]
+- pub st_birthtime: c_long,
+- #[stable(feature = "raw_ext", since = "1.1.0")]
+- pub st_birthtime_nsec: c_long,
+- #[cfg(target_arch = "x86")]
+- #[stable(feature = "raw_ext", since = "1.1.0")]
+- pub __unused: [u8; 8],
++ pub st_spare: [u64; 10],
+ }
+--- ./src/libstd/os/freebsd/fs.rs.orig 2017-04-24 18:53:46.000000000 +0000
++++ ./src/libstd/os/freebsd/fs.rs 2017-05-25 16:25:42.304989000 +0000
+@@ -74,8 +74,6 @@
+ fn st_flags(&self) -> u32;
+ #[stable(feature = "metadata_ext2", since = "1.8.0")]
+ fn st_gen(&self) -> u32;
+- #[stable(feature = "metadata_ext2", since = "1.8.0")]
+- fn st_lspare(&self) -> u32;
+ }
+
+ #[stable(feature = "metadata_ext", since = "1.1.0")]
+@@ -146,9 +144,6 @@
+ }
+ fn st_flags(&self) -> u32 {
+ self.as_inner().as_inner().st_flags as u32
+- }
+- fn st_lspare(&self) -> u32 {
+- self.as_inner().as_inner().st_lspare as u32
+ }
+ }
+
+--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs.orig 2017-04-24 20:20:26.000000000 +0000
++++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs 2017-05-30 07:57:19.874957000 +0000
+@@ -7,10 +7,12 @@
+ pub struct stat {
+ pub st_dev: ::dev_t,
+ pub st_ino: ::ino_t,
+- pub st_mode: ::mode_t,
+ pub st_nlink: ::nlink_t,
++ pub st_mode: ::mode_t,
++ pub st_pad0: ::uint16_t,
+ pub st_uid: ::uid_t,
+ pub st_gid: ::gid_t,
++ pub st_pad1: ::uint32_t,
+ pub st_rdev: ::dev_t,
+ pub st_atime: ::time_t,
+ pub st_atime_nsec: ::c_long,
+@@ -18,13 +20,13 @@
+ pub st_mtime_nsec: ::c_long,
+ pub st_ctime: ::time_t,
+ pub st_ctime_nsec: ::c_long,
++ pub st_birthtime: ::time_t,
++ pub st_birthtime_nsec: ::c_long,
+ pub st_size: ::off_t,
+ pub st_blocks: ::blkcnt_t,
+ pub st_blksize: ::blksize_t,
+ pub st_flags: ::fflags_t,
+- pub st_gen: ::uint32_t,
+- pub st_lspare: ::int32_t,
+- pub st_birthtime: ::time_t,
+- pub st_birthtime_nsec: ::c_long,
++ pub st_gen: ::uint64_t,
++ pub st_spare: [::uint64_t; 10],
+ }
+ }
+--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs.orig 2017-04-24 20:20:26.000000000 +0000
++++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs 2017-05-25 16:25:42.305261000 +0000
+@@ -7,10 +7,12 @@
+ pub struct stat {
+ pub st_dev: ::dev_t,
+ pub st_ino: ::ino_t,
+- pub st_mode: ::mode_t,
+ pub st_nlink: ::nlink_t,
++ pub st_mode: ::mode_t,
++ pub st_pad0: ::uint16_t,
+ pub st_uid: ::uid_t,
+ pub st_gid: ::gid_t,
++ pub st_pad1: ::uint32_t,
+ pub st_rdev: ::dev_t,
+ pub st_atime: ::time_t,
+ pub st_atime_nsec: ::c_long,
+@@ -18,13 +20,13 @@
+ pub st_mtime_nsec: ::c_long,
+ pub st_ctime: ::time_t,
+ pub st_ctime_nsec: ::c_long,
++ pub st_birthtime: ::time_t,
++ pub st_birthtime_nsec: ::c_long,
+ pub st_size: ::off_t,
+ pub st_blocks: ::blkcnt_t,
+ pub st_blksize: ::blksize_t,
+ pub st_flags: ::fflags_t,
+- pub st_gen: ::uint32_t,
+- pub st_lspare: ::int32_t,
+- pub st_birthtime: ::time_t,
+- pub st_birthtime_nsec: ::c_long,
++ pub st_gen: ::uint64_t,
++ pub st_spare: [::uint64_t; 10],
+ }
+ }
+--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2017-04-24 20:20:26.000000000 +0000
++++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs 2017-05-25 16:28:29.708287000 +0000
+@@ -1,8 +1,8 @@
+ pub type fflags_t = u32;
+ pub type clock_t = i32;
+-pub type ino_t = u32;
++pub type ino_t = u64;
+ pub type lwpid_t = i32;
+-pub type nlink_t = u16;
++pub type nlink_t = u64;
+ pub type blksize_t = u32;
+ pub type clockid_t = ::c_int;
+ pub type sem_t = _sem;
+@@ -40,10 +40,13 @@
+ }
+
+ pub struct dirent {
+- pub d_fileno: u32,
++ pub d_fileno: u64,
++ pub d_off: u64,
+ pub d_reclen: u16,
+ pub d_type: u8,
+- pub d_namlen: u8,
++ pub d_pad0: u8,
++ pub d_namlen: u16,
++ pub d_pad1: u16,
+ pub d_name: [::c_char; 256],
+ }
+
+--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86.rs.orig 2017-04-24 20:20:26.000000000 +0000
++++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86.rs 2017-05-25 16:25:42.305967000 +0000
+@@ -7,25 +7,30 @@
+ pub struct stat {
+ pub st_dev: ::dev_t,
+ pub st_ino: ::ino_t,
+- pub st_mode: ::mode_t,
+ pub st_nlink: ::nlink_t,
++ pub st_mode: ::mode_t,
++ pub st_pad0: ::uint16_t,
+ pub st_uid: ::uid_t,
+ pub st_gid: ::gid_t,
++ pub st_pad1: ::uint32_t,
+ pub st_rdev: ::dev_t,
++ pub st_atime_ext: ::int32_t,
+ pub st_atime: ::time_t,
+ pub st_atime_nsec: ::c_long,
++ pub st_mtime_ext: i32,
+ pub st_mtime: ::time_t,
+ pub st_mtime_nsec: ::c_long,
++ pub st_ctime_ext: ::int32_t,
+ pub st_ctime: ::time_t,
+ pub st_ctime_nsec: ::c_long,
++ pub st_birthtime_ext: ::int32_t,
++ pub st_birthtime: ::time_t,
++ pub st_birthtime_nsec: ::c_long,
+ pub st_size: ::off_t,
+ pub st_blocks: ::blkcnt_t,
+ pub st_blksize: ::blksize_t,
+ pub st_flags: ::fflags_t,
+- pub st_gen: ::uint32_t,
+- pub st_lspare: ::int32_t,
+- pub st_birthtime: ::time_t,
+- pub st_birthtime_nsec: ::c_long,
+- __unused: [u8; 8],
++ pub st_gen: ::uint64_t,
++ pub st_spare: [::uint64_t; 10],
+ }
+ }
+--- ./src/vendor/libc/src/unix/bsd/freebsdlike/mod.rs.orig 2017-04-24 20:20:26.000000000 +0000
++++ ./src/vendor/libc/src/unix/bsd/freebsdlike/mod.rs 2017-05-25 16:25:42.306480000 +0000
+@@ -1,4 +1,4 @@
+-pub type dev_t = u32;
++pub type dev_t = u64;
+ pub type mode_t = u16;
+ pub type pthread_attr_t = *mut ::c_void;
+ pub type rlim_t = i64;
diff --git a/lang/rust-nightly/files/patch-configure b/lang/rust-nightly/files/patch-configure
deleted file mode 100644
index 3914be291368..000000000000
--- a/lang/rust-nightly/files/patch-configure
+++ /dev/null
@@ -1,10 +0,0 @@
---- configure.orig 2016-07-17 07:06:29 UTC
-+++ configure
-@@ -737,7 +737,6 @@ if [ -n "$CFG_ENABLE_ORBIT" ]; then putv
-
- step_msg "looking for build programs"
-
--probe_need CFG_CURL curl
- if [ -z "$CFG_PYTHON_PROVIDED" ]; then
- probe_need CFG_PYTHON python2.7 python2 python
- fi
diff --git a/lang/rust-nightly/files/patch-src_binaryen_CMakeLists.txt b/lang/rust-nightly/files/patch-src_binaryen_CMakeLists.txt
new file mode 100644
index 000000000000..88f374664024
--- /dev/null
+++ b/lang/rust-nightly/files/patch-src_binaryen_CMakeLists.txt
@@ -0,0 +1,60 @@
+https://github.com/WebAssembly/binaryen/commit/07f6dfbf0d89
+https://github.com/WebAssembly/binaryen/commit/d9692277357b
+
+--- src/binaryen/CMakeLists.txt.orig 2018-02-12 18:56:16 UTC
++++ src/binaryen/CMakeLists.txt
+@@ -99,51 +99,12 @@ ELSE()
+ FIND_PACKAGE(Threads REQUIRED)
+ ADD_CXX_FLAG("-std=c++11")
+ if (NOT EMSCRIPTEN)
+- # try to get the target architecture by compiling a dummy.c file and
+- # checking the architecture using the file command.
+- file(WRITE ${PROJECT_BINARY_DIR}/dummy.c "main(){}")
+- try_compile(
+- COMPILE_OK
+- ${PROJECT_BINARY_DIR}
+- ${PROJECT_BINARY_DIR}/dummy.c
+- OUTPUT_VARIABLE COMPILE_OUTPUT
+- COPY_FILE ${PROJECT_BINARY_DIR}/dummy
+- )
+- if (COMPILE_OK)
+- execute_process(
+- COMMAND file ${PROJECT_BINARY_DIR}/dummy
+- RESULT_VARIABLE FILE_RESULT
+- OUTPUT_VARIABLE FILE_OUTPUT
+- ERROR_QUIET
+- )
+-
+- if (FILE_RESULT EQUAL 0)
+- if (${FILE_OUTPUT} MATCHES "x86[-_]64")
+- set(TARGET_ARCH "x86-64")
+- elseif (${FILE_OUTPUT} MATCHES "Intel 80386")
+- set(TARGET_ARCH "i386")
+- elseif (${FILE_OUTPUT} MATCHES "ARM")
+- set(TARGET_ARCH "ARM")
+- else ()
+- message(WARNING "Unknown target architecture!")
+- endif ()
+- if(TARGET_ARCH)
+- MESSAGE(STATUS "Building for platform ${TARGET_ARCH}")
+- endif ()
+- else ()
+- message(WARNING "Error running file on dummy executable")
+- endif ()
+- else ()
+- message(WARNING "Error compiling dummy.c file: ${COMPILE_OUTPUT}")
+- endif ()
+-
+- if (TARGET_ARCH STREQUAL "i386")
++ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
+ # wasm doesn't allow for x87 floating point math
+ ADD_COMPILE_FLAG("-msse2")
+ ADD_COMPILE_FLAG("-mfpmath=sse")
+- elseif(TARGET_ARCH STREQUAL "ARM")
+- # stub for ARM-specific instructions. GCC6 adds NEON with the below flags
+- ADD_COMPILE_FLAG("-march=native")
++ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv[2-6]" AND NOT CMAKE_CXX_FLAGS MATCHES "-mfpu=")
++ ADD_COMPILE_FLAG("-mfpu=vfpv3")
+ endif ()
+ endif ()
+ ADD_COMPILE_FLAG("-Wall")
diff --git a/lang/rust-nightly/files/patch-src_libbacktrace_fileline.c b/lang/rust-nightly/files/patch-src_libbacktrace_fileline.c
new file mode 100644
index 000000000000..88e16025ddfc
--- /dev/null
+++ b/lang/rust-nightly/files/patch-src_libbacktrace_fileline.c
@@ -0,0 +1,42 @@
+--- src/libbacktrace/fileline.c.orig 2017-06-06 00:42:59 UTC
++++ src/libbacktrace/fileline.c
+@@ -38,8 +38,39 @@ POSSIBILITY OF SUCH DAMAGE. */
+ #include <fcntl.h>
+ #include <stdlib.h>
+
++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#include <sys/sysctl.h>
++#include <limits.h>
++#endif
++
+ #include "backtrace.h"
+ #include "internal.h"
++
++#if !defined(HAVE_GETEXECNAME) && defined(KERN_PROC_PATHNAME)
++/* Return pathname of executable or 0 on failure. */
++#define HAVE_GETEXECNAME
++static char execname[PATH_MAX + 1];
++static const char *
++getexecname(void)
++{
++ size_t path_len = sizeof(execname);
++ int mib[] = {
++ CTL_KERN,
++#if defined(__NetBSD__)
++ KERN_PROC_ARGS,
++ -1,
++ KERN_PROC_PATHNAME,
++#else
++ KERN_PROC,
++ KERN_PROC_PATHNAME,
++ -1,
++#endif
++ };
++ u_int miblen = sizeof(mib) / sizeof(mib[0]);
++ int rc = sysctl(mib, miblen, execname, &path_len, NULL, 0);
++ return rc ? NULL : execname;
++}
++#endif /* !HAVE_GETEXECNAME && KERN_PROC_PATHNAME */
+
+ #ifndef HAVE_GETEXECNAME
+ #define getexecname() NULL
diff --git a/lang/rust-nightly/files/patch-src_librustc__back_target_freebsd__base.rs b/lang/rust-nightly/files/patch-src_librustc__back_target_freebsd__base.rs
new file mode 100644
index 000000000000..2f2b3ccc423b
--- /dev/null
+++ b/lang/rust-nightly/files/patch-src_librustc__back_target_freebsd__base.rs
@@ -0,0 +1,13 @@
+Return struct like OpenBSD, see src/librustc_trans/cabi_x86.rs
+
+--- src/librustc_back/target/freebsd_base.rs.orig 2017-11-22 21:33:00 UTC
++++ src/librustc_back/target/freebsd_base.rs
+@@ -31,6 +31,8 @@ pub fn opts() -> TargetOptions {
+ target_family: Some("unix".to_string()),
+ linker_is_gnu: true,
+ has_rpath: true,
++ is_like_openbsd: true,
++ eliminate_frame_pointer: false,
+ pre_link_args: args,
+ position_independent_executables: true,
+ relro_level: RelroLevel::Full,
diff --git a/lang/rust-nightly/files/patch-src_librustc__back_target_i686__unknown__freebsd.rs b/lang/rust-nightly/files/patch-src_librustc__back_target_i686__unknown__freebsd.rs
new file mode 100644
index 000000000000..47f594784f7e
--- /dev/null
+++ b/lang/rust-nightly/files/patch-src_librustc__back_target_i686__unknown__freebsd.rs
@@ -0,0 +1,11 @@
+--- src/librustc_back/target/i686_unknown_freebsd.rs.orig 2017-10-09 20:04:51 UTC
++++ src/librustc_back/target/i686_unknown_freebsd.rs
+@@ -13,7 +13,7 @@ use target::{Target, TargetResult};
+
+ pub fn target() -> TargetResult {
+ let mut base = super::freebsd_base::opts();
+- base.cpu = "pentium4".to_string();
++ base.cpu = "pentiumpro".to_string();
+ base.max_atomic_width = Some(64);
+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
+ base.stack_probes = true;
diff --git a/lang/rust-nightly/files/patch-src_librustc__llvm_build.rs b/lang/rust-nightly/files/patch-src_librustc__llvm_build.rs
deleted file mode 100644
index 255a10ee5db4..000000000000
--- a/lang/rust-nightly/files/patch-src_librustc__llvm_build.rs
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/librustc_llvm/build.rs.orig 2017-01-18 02:20:03 UTC
-+++ src/librustc_llvm/build.rs
-@@ -234,6 +234,8 @@ fn main() {
- // OpenBSD has a particular C++ runtime library name
- let stdcppname = if target.contains("openbsd") {
- "estdc++"
-+ } else if target.contains("freebsd") {
-+ "c++"
- } else {
- "stdc++"
- };
diff --git a/lang/rust-nightly/files/patch-src_llvm_lib_Support_CMakeLists.txt b/lang/rust-nightly/files/patch-src_llvm_lib_Support_CMakeLists.txt
new file mode 100644
index 000000000000..db836e0731c5
--- /dev/null
+++ b/lang/rust-nightly/files/patch-src_llvm_lib_Support_CMakeLists.txt
@@ -0,0 +1,13 @@
+--- src/llvm/lib/Support/CMakeLists.txt.orig 2018-02-09 16:06:37 UTC
++++ src/llvm/lib/Support/CMakeLists.txt
+@@ -13,7 +13,9 @@ elseif( CMAKE_HOST_UNIX )
+ set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
+ endif()
+ if( HAVE_BACKTRACE )
+- set(system_libs ${system_libs} ${Backtrace_LIBRARIES})
++ get_filename_component(Backtrace_LIBFILE ${Backtrace_LIBRARIES} NAME_WE)
++ STRING(REGEX REPLACE "^lib" "" Backtrace_LIBFILE ${Backtrace_LIBFILE})
++ set(system_libs ${system_libs} ${Backtrace_LIBFILE})
+ endif()
+ if(LLVM_ENABLE_TERMINFO)
+ if(HAVE_TERMINFO)
diff --git a/lang/rust-nightly/files/patch-src_llvm_utils_llvm-build_llvmbuild_main.py b/lang/rust-nightly/files/patch-src_llvm_utils_llvm-build_llvmbuild_main.py
new file mode 100644
index 000000000000..50b7587e40f8
--- /dev/null
+++ b/lang/rust-nightly/files/patch-src_llvm_utils_llvm-build_llvmbuild_main.py
@@ -0,0 +1,11 @@
+--- src/llvm/utils/llvm-build/llvmbuild/main.py.orig 2015-10-28 01:10:50 UTC
++++ src/llvm/utils/llvm-build/llvmbuild/main.py
+@@ -719,6 +719,8 @@ def add_magic_target_components(parser,
+ # We handle a few special cases of target names here for historical
+ # reasons, as these are the names configure currently comes up with.
+ native_target_name = { 'x86' : 'X86',
++ 'i386' : 'X86',
++ 'amd64' : 'X86',
+ 'x86_64' : 'X86',
+ 'Unknown' : None }.get(opts.native_target,
+ opts.native_target)
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index d5e6f407d1ed..a93092dd14a1 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -12,7 +12,7 @@ MASTER_SITES= http://static.rust-lang.org/dist/:src \
https://s3.amazonaws.com/rust-lang-ci/cargo-builds/:cargo_bootstrap \
LOCAL/marino:bootstrap
DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src
-DISTFILES?= ${DISTNAME}${EXTRACT_SUFX}:src \
+DISTFILES?= ${NIGHTLY_SUBDIR}${DISTNAME}${EXTRACT_SUFX}:src \
${RUSTC_BOOTSTRAP}:rust_bootstrap \
${RUST_STD_BOOTSTRAP}:rust_bootstrap \
${CARGO_BOOTSTRAP}:cargo_bootstrap
@@ -42,6 +42,7 @@ ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler
#CONFLICTS_BUILD+= ${PKGBASE}
CONFLICTS_INSTALL?= rust-nightly
+# See WRKSRC/src/stage0.txt for this date and version values.
BOOTSTRAPS_DATE?= 2018-01-04
RUST_BOOTSTRAP_VERSION?= 1.23.0