Skip to content

Commit

Permalink
Upgrade rust to version 1.30.0.
Browse files Browse the repository at this point in the history
Upstream changes:

Language
 * Procedural macros are now available. These kinds of macros allow
   for more powerful code generation. There is a new chapter available
   in the Rust Programming Language book that goes further in depth.
 * You can now use keywords as identifiers using the raw identifiers
   syntax (r#), e.g. let r#for = true;
 * Using anonymous parameters in traits is now deprecated with a
   warning and will be a hard error in the 2018 edition.
 * You can now use crate in paths. This allows you to refer to the
   crate root in the path, e.g. use crate::foo; refers to foo in
   src/lib.rs.
 * Using a external crate no longer requires being prefixed with
   ::. Previously, using a external crate in a module without a
   use statement required let json = ::serde_json::from_str(foo);
   but can now be written as let json = serde_json::from_str(foo);.
 * You can now apply the #[used] attribute to static items to
   prevent the compiler from optimising them away, even if they
   appear to be unused, e.g. #[used] static FOO: u32 = 1;
 * You can now import and reexport macros from other crates with
   the use syntax. Macros exported with #[macro_export] are now
   placed into the root module of the crate. If your macro relies
   on calling other local macros, it is recommended to export with
   the #[macro_export(local_inner_macros)] attribute so users won't
   have to import those macros.
 * You can now catch visibility keywords (e.g. pub, pub(crate)) in
   macros using the vis specifier.
 * Non-macro attributes now allow all forms of literals, not just
   strings. Previously, you would write #[attr("true")], and you
   can now write #[attr(true)].
 * You can now specify a function to handle a panic in the Rust
   runtime with the #[panic_handler] attribute.

Compiler
 * Added the riscv32imc-unknown-none-elf target.
 * Added the aarch64-unknown-netbsd target

Libraries
 * ManuallyDrop now allows the inner type to be unsized.

Stabilized APIs
 * Ipv4Addr::BROADCAST
 * Ipv4Addr::LOCALHOST
 * Ipv4Addr::UNSPECIFIED
 * Ipv6Addr::LOCALHOST
 * Ipv6Addr::UNSPECIFIED
 * Iterator::find_map
 * The following methods are replacement methods for trim_left,
   trim_right, trim_left_matches, and trim_right_matches, which
   will be deprecated in 1.33.0:
 * str::trim_end_matches
 * str::trim_end
 * str::trim_start_matches
 * str::trim_start

Cargo
 * cargo run doesn't require specifying a package in workspaces.
 * cargo doc now supports --message-format=json. This is equivalent
   to calling rustdoc --error-format=json.
 * Cargo will now provide a progress bar for builds.

Misc
 * rustdoc allows you to specify what edition to treat your code
   as with the --edition option.
 * rustdoc now has the --color (specify whether to output color)
   and --error-format (specify error format, e.g. json) options.
 * We now distribute a rust-gdbgui script that invokes gdbgui with
   Rust debug symbols.
 * Attributes from Rust tools such as rustfmt or clippy are now
   available, e.g. #[rustfmt::skip] will skip formatting the next
   item.


Pkgsrc changest:
 * Explicitly list bootstrap kit version number for each kit we carry,
   so that one entry's version doesn't "bleed into" following kits.
 * Tweak for handling "earmv7hf" CPU type for NetBSD in the bootstrap.py
   script
 * Add two patches from Debian for sparc64; rust would generate code
   generating unaligned accesses, causing SIGBUS on sparc64
 * Update most of the bootstrap kits to version 1.29.2; need minimum
   1.29.0 to build 1.30.0.
 * Rust regrettably doesn't build for powerpc or earmv7hf in this version,
   most probably due to "char" being "unsigned char" on these platforms.
   Ref. rust-lang/rust#55465
  • Loading branch information
he32 committed Oct 29, 2018
1 parent 7ef5499 commit 149426d
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 99 deletions.
21 changes: 15 additions & 6 deletions lang/rust/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.62 2018/10/28 13:21:36 he Exp $
# $NetBSD: Makefile,v 1.63 2018/10/29 22:24:11 he Exp $

DISTNAME= rustc-1.29.2-src
DISTNAME= rustc-1.30.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
#PKGREVISION= 1
CATEGORIES= lang
Expand Down Expand Up @@ -46,7 +46,7 @@ CONFIGURE_ARGS.SunOS+= --disable-jemalloc
#GNU_CROSS_TARGET= armv7--netbsdelf-eabihf
#GNU_CROSS_TARGET= sparc64--netbsd
#GNU_CROSS_TARGET= powerpc--netbsd
#MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}
MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}

# To cross-build rust, you need to specify
# the ultimate target to built for, as well as the
Expand Down Expand Up @@ -120,37 +120,42 @@ BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags
# own bootstrap. See the stage0-bootstrap below for more details.
#
DISTFILES:= ${DEFAULT_DISTFILES}
RUST_STAGE0_VER= 1.28.0
RUST_STAGE0_VER= 1.29.2
#
.if !empty(MACHINE_PLATFORM:MDarwin-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.29.2
RUST_ARCH:= i686-apple-darwin
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.29.2
RUST_ARCH:= x86_64-apple-darwin
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.29.2
RUST_ARCH:= i686-unknown-linux-gnu
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.29.2
RUST_ARCH:= x86_64-unknown-linux-gnu
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER:= 1.29.2
RUST_ARCH:= x86_64-sun-solaris
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
SITES.${RUST_STAGE0}= https://us-east.manta.joyent.com/pkgsrc/public/pkg-bootstraps/
Expand All @@ -159,20 +164,23 @@ RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.29.2
RUST_ARCH:= i686-unknown-freebsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.29.2
RUST_ARCH:= x86_64-unknown-freebsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER:= 1.29.1
RUST_ARCH= i686-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
Expand All @@ -189,15 +197,16 @@ pre-build-fix:
${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/cargo
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.29.2
RUST_ARCH= x86_64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH= powerpc-unknown-netbsd
RUST_STAGE0_VER= 1.29.2
RUST_ARCH= powerpc-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
Expand All @@ -207,8 +216,8 @@ SITES.${RUST_STD_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.30.0
RUST_ARCH= sparc64-unknown-netbsd
RUST_STAGE0_VER= 1.29.2
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
Expand Down
Loading

0 comments on commit 149426d

Please sign in to comment.