Index: head/lang/rust-nightly/Makefile =================================================================== --- head/lang/rust-nightly/Makefile (revision 526565) +++ head/lang/rust-nightly/Makefile (revision 526566) @@ -1,33 +1,33 @@ # Created by: Jean-Sébastien Pédron # $FreeBSD$ PORTVERSION= 1.43.0.${NIGHTLY_DATE:C,-,,g} # Always set PORTREVISION explicitly as otherwise it is inherited from lang/rust PORTREVISION= 0 PKGNAMESUFFIX= -nightly DISTNAME= rustc-nightly-src ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= upstream does not provide bootstraps for other architectures CONFLICTS_INSTALL= rust MASTERDIR= ${.CURDIR}/../rust PATCHDIR= ${.CURDIR}/files DISTINFO_FILE= ${.CURDIR}/distinfo # Get latest from top level 'date' key in # https://static.rust-lang.org/dist/channel-rust-nightly.toml -NIGHTLY_DATE= 2020-02-15 +NIGHTLY_DATE= 2020-02-20 # See WRKSRC/src/stage0.txt for this date BOOTSTRAPS_DATE= 2020-01-30 RUST_BOOTSTRAP_VERSION= beta CARGO_BOOTSTRAP_VERSION= beta post-configure: # Don't abort if optional tools fail to build # https://github.com/rust-lang/rust/commit/53254a888b42 @${ECHO_CMD} 'missing-tools = true' >>${WRKSRC}/config.toml .include "${MASTERDIR}/Makefile" Index: head/lang/rust-nightly/distinfo =================================================================== --- head/lang/rust-nightly/distinfo (revision 526565) +++ head/lang/rust-nightly/distinfo (revision 526566) @@ -1,15 +1,15 @@ -TIMESTAMP = 1581774340 -SHA256 (rust/2020-02-15/rustc-nightly-src.tar.xz) = 3c70d19fd4aba6cefde4ca1684ea48b719bc841f5c9d7f8ae0f46d6d71c8b9e8 -SIZE (rust/2020-02-15/rustc-nightly-src.tar.xz) = 94355884 +TIMESTAMP = 1582182852 +SHA256 (rust/2020-02-20/rustc-nightly-src.tar.xz) = 31db047319c5fcee593e0cabc21ecb58b11e29759e5a5b1b8700520f91da2c91 +SIZE (rust/2020-02-20/rustc-nightly-src.tar.xz) = 94305996 SHA256 (rust/2020-01-30/rustc-beta-x86_64-unknown-freebsd.tar.xz) = de239e7838f913c1b4c03ec866b32966e83941a4797809f2baab2b07bb0b7225 SIZE (rust/2020-01-30/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 34914832 SHA256 (rust/2020-01-30/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = f8ff7d3298374817cbe40c20ae131f9ed95a4271f952596b6581da52d655618f SIZE (rust/2020-01-30/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 16447192 SHA256 (rust/2020-01-30/cargo-beta-x86_64-unknown-freebsd.tar.xz) = ce5aa910f740219741342a092139a3b7278a7970c88b6f10966a3528a3bfc483 SIZE (rust/2020-01-30/cargo-beta-x86_64-unknown-freebsd.tar.xz) = 5018440 SHA256 (rust/2020-01-30/rustc-beta-i686-unknown-freebsd.tar.xz) = c3fdeb888e5bf7f98b82196f22553d97f93b4d486feae049c7b831049e3595b2 SIZE (rust/2020-01-30/rustc-beta-i686-unknown-freebsd.tar.xz) = 35156088 SHA256 (rust/2020-01-30/rust-std-beta-i686-unknown-freebsd.tar.xz) = 349f6534c6af0cb261523deaf497bb66158212d3a7bad2b7c748a4ed6abd269c SIZE (rust/2020-01-30/rust-std-beta-i686-unknown-freebsd.tar.xz) = 16429800 SHA256 (rust/2020-01-30/cargo-beta-i686-unknown-freebsd.tar.xz) = 009bc310c8702a56c7b39f2f401a0ce80b833c0371e67eb2f378ba5ab9257181 SIZE (rust/2020-01-30/cargo-beta-i686-unknown-freebsd.tar.xz) = 4918876 Index: head/lang/rust-nightly/files/patch-vendor_backtrace-sys_build.rs =================================================================== --- head/lang/rust-nightly/files/patch-vendor_backtrace-sys_build.rs (nonexistent) +++ head/lang/rust-nightly/files/patch-vendor_backtrace-sys_build.rs (revision 526566) @@ -0,0 +1,17 @@ +https://github.com/rust-lang/backtrace-rs/pull/294 + +--- vendor/backtrace-sys/build.rs.orig 2020-02-19 21:11:31 UTC ++++ vendor/backtrace-sys/build.rs +@@ -60,6 +60,12 @@ fn main() { + File::create(out_dir.join("config.h")).unwrap(); + if target.contains("android") { + maybe_enable_dl_iterate_phdr_android(&mut build); ++ } else if target.contains("freebsd") { ++ build.define("HAVE_DL_ITERATE_PHDR", "1"); ++ build.define("HAVE_KERN_PROC", "1"); ++ } else if target.contains("netbsd") { ++ build.define("HAVE_DL_ITERATE_PHDR", "1"); ++ build.define("HAVE_KERN_PROC_ARGS", "1"); + } else if !target.contains("apple-ios") + && !target.contains("solaris") + && !target.contains("redox") Property changes on: head/lang/rust-nightly/files/patch-vendor_backtrace-sys_build.rs ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/rust-nightly/files/patch-vendor_backtrace-sys_src_libbacktrace_fileline.c =================================================================== --- head/lang/rust-nightly/files/patch-vendor_backtrace-sys_src_libbacktrace_fileline.c (revision 526565) +++ head/lang/rust-nightly/files/patch-vendor_backtrace-sys_src_libbacktrace_fileline.c (revision 526566) @@ -1,44 +1,117 @@ -This file is in the public domain. +https://github.com/ianlancetaylor/libbacktrace/commit/0f06cda953cc4e26f38751c5b9f15ae8dfa5ff2d +https://github.com/rust-lang-nursery/libbacktrace/pull/1 ---- vendor/backtrace-sys/src/libbacktrace/fileline.c.orig 2017-06-06 00:42:59 UTC +--- vendor/backtrace-sys/src/libbacktrace/fileline.c.orig 2020-02-19 21:11:31 UTC +++ vendor/backtrace-sys/src/libbacktrace/fileline.c -@@ -38,8 +38,39 @@ POSSIBILITY OF SUCH DAMAGE. */ - #include +@@ -39,6 +39,10 @@ POSSIBILITY OF SUCH DAMAGE. */ #include + #include -+#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined (HAVE_KERN_PROC_ARGS) || defined (HAVE_KERN_PROC) +#include -+#include +#endif + #include "backtrace.h" #include "internal.h" + +@@ -46,6 +50,78 @@ POSSIBILITY OF SUCH DAMAGE. */ + #define getexecname() NULL + #endif + ++#if !defined (HAVE_KERN_PROC_ARGS) && !defined (HAVE_KERN_PROC) + -+#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) ++#define sysctl_exec_name1(state, error_callback, data) NULL ++#define sysctl_exec_name2(state, error_callback, data) NULL ++ ++#else /* defined (HAVE_KERN_PROC_ARGS) || |defined (HAVE_KERN_PROC) */ ++ ++static char * ++sysctl_exec_name (struct backtrace_state *state, ++ int mib0, int mib1, int mib2, int mib3, ++ backtrace_error_callback error_callback, void *data) +{ -+ size_t path_len = sizeof(execname); -+ int mib[] = { -+ CTL_KERN, -+#if defined(__NetBSD__) -+ KERN_PROC_ARGS, -+ -1, -+ KERN_PROC_PATHNAME, ++ int mib[4]; ++ size_t len; ++ char *name; ++ size_t rlen; ++ ++ mib[0] = mib0; ++ mib[1] = mib1; ++ mib[2] = mib2; ++ mib[3] = mib3; ++ ++ if (sysctl (mib, 4, NULL, &len, NULL, 0) < 0) ++ return NULL; ++ name = (char *) backtrace_alloc (state, len, error_callback, data); ++ if (name == NULL) ++ return NULL; ++ rlen = len; ++ if (sysctl (mib, 4, name, &rlen, NULL, 0) < 0) ++ { ++ backtrace_free (state, name, len, error_callback, data); ++ return NULL; ++ } ++ return name; ++} ++ ++#ifdef HAVE_KERN_PROC_ARGS ++ ++static char * ++sysctl_exec_name1 (struct backtrace_state *state, ++ backtrace_error_callback error_callback, void *data) ++{ ++ /* This variant is used on NetBSD. */ ++ return sysctl_exec_name (state, CTL_KERN, KERN_PROC_ARGS, -1, ++ KERN_PROC_PATHNAME, error_callback, data); ++} ++ +#else -+ KERN_PROC, -+ KERN_PROC_PATHNAME, -+ -1, ++ ++#define sysctl_exec_name1(state, error_callback, data) NULL ++ +#endif -+ }; -+ u_int miblen = sizeof(mib) / sizeof(mib[0]); -+ int rc = sysctl(mib, miblen, execname, &path_len, NULL, 0); -+ return rc ? NULL : execname; ++ ++#ifdef HAVE_KERN_PROC ++ ++static char * ++sysctl_exec_name2 (struct backtrace_state *state, ++ backtrace_error_callback error_callback, void *data) ++{ ++ /* This variant is used on FreeBSD. */ ++ return sysctl_exec_name (state, CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1, ++ error_callback, data); +} -+#endif /* !HAVE_GETEXECNAME && KERN_PROC_PATHNAME */ ++ ++#else ++ ++#define sysctl_exec_name2(state, error_callback, data) NULL ++ ++#endif ++ ++#endif /* defined (HAVE_KERN_PROC_ARGS) || |defined (HAVE_KERN_PROC) */ ++ + /* Initialize the fileline information from the executable. Returns 1 + on success, 0 on failure. */ - #ifndef HAVE_GETEXECNAME - #define getexecname() NULL +@@ -83,7 +159,7 @@ fileline_initialize (struct backtrace_state *state, + + descriptor = -1; + called_error_callback = 0; +- for (pass = 0; pass < 5; ++pass) ++ for (pass = 0; pass < 7; ++pass) + { + int does_not_exist; + +@@ -105,6 +181,12 @@ fileline_initialize (struct backtrace_state *state, + snprintf (buf, sizeof (buf), "/proc/%ld/object/a.out", + (long) getpid ()); + filename = buf; ++ break; ++ case 5: ++ filename = sysctl_exec_name1 (state, error_callback, data); ++ break; ++ case 6: ++ filename = sysctl_exec_name2 (state, error_callback, data); + break; + default: + abort ();