pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mrustc: re-work to 2022aug14 upstream: v0.10 (now handles rust 1.54.0)



Module Name:	pkgsrc-wip
Committed By:	dave <none@none>
Pushed By:	dave
Date:		Sun Aug 21 11:17:05 2022 -0400
Changeset:	a67f907ef2864b70557f78054e07e91ef45c0fc4

Modified Files:
	mrust-cargo/Makefile
	mrust-cargo/distinfo
	mrust-cargo/patches/patch-minicargo.mk
	mrust-libs/Makefile
	mrust-libs/PLIST
	mrust-libs/distinfo
	mrust-libs/patches/patch-minicargo.mk
	mrust-minicargo/distinfo
	mrust-minicargo/patches/patch-tools_minicargo_build.cpp
	mrust-mrustc/distinfo
	mrust-mrustc/patches/patch-Makefile
	mrust-mrustc/patches/patch-src_hir__conv_constant__evaluation.cpp
	mrust-rustc/Makefile
	mrust-rustc/distinfo
	mrust-rustc/patches/patch-minicargo.mk
	mrust/Makefile.common
	mrust/TODO
Removed Files:
	mrust-cargo/patches/patch-Makefile
	mrust-libs/patches/patch-.._rustc-1.39.0-src_src_libstd_sys_unix_thread.rs
	mrust-libs/patches/patch-Makefile
	mrust-libs/patches/patch-script-overrides_stable-1.39.0-linux_build__std.txt
	mrust-libs/patches/patch-tools_testrunner_main.cpp
	mrust-minicargo/patches/patch-tools_minicargo_build.h
	mrust-minicargo/patches/patch-tools_minicargo_main.cpp
	mrust-rustc/patches/patch-Makefile
	mrust-rustc/patches/patch-rustc-1.39.0-src.patch
	mrust-rustc/patches/patch-script-overrides_stable-1.39.0-linux_build__std.txt

Log Message:
mrustc: re-work to 2022aug14 upstream: v0.10 (now handles rust 1.54.0)

- Builds (with a little babysitting--i.e., sometimes errors
out with a signal 13, without error msg or explanation;
however, continues fine if manually re-invoked).

- Not yet thoroughly runtime-tested for functionality

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a67f907ef2864b70557f78054e07e91ef45c0fc4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mrust-cargo/Makefile                               | 35 +++++++++++-
 mrust-cargo/distinfo                               | 16 ++----
 mrust-cargo/patches/patch-Makefile                 | 19 -------
 mrust-cargo/patches/patch-minicargo.mk             | 57 ++++++++++++++++---
 mrust-libs/Makefile                                | 35 +++++++++++-
 mrust-libs/PLIST                                   | 65 +++++++++++-----------
 mrust-libs/distinfo                                | 20 +++----
 ..._rustc-1.39.0-src_src_libstd_sys_unix_thread.rs | 42 --------------
 mrust-libs/patches/patch-Makefile                  | 27 ---------
 mrust-libs/patches/patch-minicargo.mk              | 37 ++++++++++--
 ...pt-overrides_stable-1.39.0-linux_build__std.txt |  9 ---
 mrust-libs/patches/patch-tools_testrunner_main.cpp | 12 ----
 mrust-minicargo/distinfo                           | 10 +---
 .../patches/patch-tools_minicargo_build.cpp        | 28 +---------
 .../patches/patch-tools_minicargo_build.h          | 12 ----
 .../patches/patch-tools_minicargo_main.cpp         | 40 -------------
 mrust-mrustc/distinfo                              | 10 ++--
 mrust-mrustc/patches/patch-Makefile                | 22 +++-----
 .../patch-src_hir__conv_constant__evaluation.cpp   |  2 +-
 mrust-rustc/Makefile                               | 38 ++++++++++++-
 mrust-rustc/distinfo                               | 18 ++----
 mrust-rustc/patches/patch-Makefile                 | 19 -------
 mrust-rustc/patches/patch-minicargo.mk             | 57 ++++++++++++++++---
 mrust-rustc/patches/patch-rustc-1.39.0-src.patch   | 59 --------------------
 ...pt-overrides_stable-1.39.0-linux_build__std.txt |  9 ---
 mrust/Makefile.common                              | 10 ++--
 mrust/TODO                                         | 62 ++++++++++++---------
 27 files changed, 344 insertions(+), 426 deletions(-)

diffs:
diff --git a/mrust-cargo/Makefile b/mrust-cargo/Makefile
index 1bca0a5338..8ce126d5aa 100644
--- a/mrust-cargo/Makefile
+++ b/mrust-cargo/Makefile
@@ -6,6 +6,8 @@ PKGNAME=	mrust-cargo-${SNAPSTAMP}
 COMMENT=	Cargo--built from rustc src, using mrustc toolchain
 BUILD_TARGET=	${MR_OUTDIR}cargo
 DISTFILES=	${DEFAULT_DISTFILES} ${RUSTSRC_DIST}
+MRUST_DISTDIR=	${DISTDIR}/${DIST_SUBDIR}
+RUSTSRC_LINK=	${DISTDIR}/${DIST_SUBDIR}/${RUSTSRC_DIST}
 MAKE_FILE=	minicargo.mk
 MAKE_ENV+=	LD_RUN_PATH=${PREFIX}/lib
 MAKE_ENV+=	LIBGIT2_SYS_USE_PKG_CONFIG=1
@@ -30,6 +32,32 @@ CARGOBIN=		mrust-cargo
 #* (no options yet) *#.include "options.mk"
 
 
+#
+# "De-duplicate" the rust source tarball.
+#
+# Without the following pre-fetch and pre-extract targets,
+# the mrust build infrastructure will needlessly download its
+# own, duplicate copy of the rust-lang source tarball into
+# distinfo/mrustc.  Instead, this makes a hardlink from the
+# canonical location, if the tarball already exists there.
+#
+pre-fetch:
+	[ -e "${MRUST_DISTDIR}" ] || ${MKDIR} "${MRUST_DISTDIR}"
+	if [ -e "${DISTDIR}/${RUSTSRC_DIST}" ]; then			\
+	    ${LN} -f "${DISTDIR}/${RUSTSRC_DIST}" "${MRUST_DISTDIR}";	\
+	fi
+#
+# Once the checksum is verified, also make the rust source tarball
+# available in the expected location for real rust-src builds.
+# Note: be certain the checksum for the rust-lang tarball
+# in the mrust* distinfo files matches the one in the rust-src
+# distinfo files.
+#
+pre-extract:
+	[ -e "${DISTDIR}/${RUSTSRC_DIST}" ] ||				\
+	    ${LN} "${RUSTSRC_LINK}" "${DISTDIR}/"
+
+
 # "put" (link?) mrustc & minicargo binaries and libraries into
 # directories where minicargo.mk will look for them.
 # Could buildlink3 help with this?  (Probably not without changing
@@ -39,14 +67,17 @@ pre-build:
 		[ -e "$${dd}" ] || ${MKDIR} "$${dd}";			\
 	done
 	for ff in mrustc minicargo; do					\
-	    [ -e "${WRKSRC}/bin/$${ff}" ] ||				\
-		${LN} -s ${PREFIX}/bin/$${ff} "${WRKSRC}/bin";		\
+	    [ -e "${WRKSRC}/bin/$$ff" ] ||				\
+		${LN} -s "${PREFIX}/bin/$$ff" "${WRKSRC}/bin";		\
+		${TOUCH} -hr "${PREFIX}/bin/$$ff" "${WRKSRC}/bin/$$ff";	\
 	done
 	( cd ${PREFIX}/lib/mrust/;					\
 	    for ff in *; do						\
 		[ -e "${WRKSRC}/${MR_OUTDIR}$$ff" ] ||			\
 		    ${LN} -s "${PREFIX}/lib/mrust/$$ff"			\
 			"${WRKSRC}/${MR_OUTDIR}";			\
+		    ${TOUCH} -hr "${PREFIX}/lib/mrust/$$ff"		\
+			"${WRKSRC}/${MR_OUTDIR}/$$ff";			\
 	    done; )
 	cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} \
 		${MAKE_PROGRAM} ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} RUSTCSRC
diff --git a/mrust-cargo/distinfo b/mrust-cargo/distinfo
index c31d0c7644..5a67c35393 100644
--- a/mrust-cargo/distinfo
+++ b/mrust-cargo/distinfo
@@ -1,12 +1,8 @@
 $NetBSD$
 
-SHA1 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 3c2e1bff891239cc0431b3e6928112ebb7b36793
-RMD160 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = c99362354c652e037622c84b8076ea3bfc4e1ec8
-SHA512 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 8af5c92102f9964c8f68ff469f0d1197e9b84fcf07d9efa8805011766ce256ddef794c2d08a3a85c7cd0234c9235ca5fe0b18372a71fa984d36e2e765d379037
-Size (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 1354302 bytes
-SHA1 (mrustc/rustc-1.39.0-src.tar.gz) = 82ef6f3b88b8d5e3bfa2fab67bbacf5d6f6ba6bb
-RMD160 (mrustc/rustc-1.39.0-src.tar.gz) = d5b04b87fc336e3be7d592f70de0363aa66622aa
-SHA512 (mrustc/rustc-1.39.0-src.tar.gz) = 77be74410b9f7a2e9f78f7a9860964e122ab9518553acc2cc80d5abeecf3302e9b3ed1fd29e022cccff1f9ff4a568b4015c0d3ac0a524f06e38e9cb360a3341e
-Size (mrustc/rustc-1.39.0-src.tar.gz) = 152803201 bytes
-SHA1 (patch-Makefile) = 4cec2c6cc36210bf5ca77f2ae6bbfa23396769e7
-SHA1 (patch-minicargo.mk) = a13fa4b05e443871b8d25aa7f008069f5dd2f91d
+SHA512 (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = ede7bee90a5b14548fb86c91b78d20a0c7847ab6795040399bbb6d6435985470f175ffe26262e3a86ab1c33a7ffa011ba09cddd6857ca8b5d3c1d7d9cfd96b09
+Size (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = 1454068 bytes
+
+SHA512 (mrustc/rustc-1.54.0-src.tar.gz) = f6a1d925e233ef40351193e5507d74b1aed13ce516679558c246e6b6955a6ef393d7e61e6c51a0c5696a7e40a9dcee026bea938b954f5ea5394854cc3ca67f90
+Size (mrustc/rustc-1.54.0-src.tar.gz) = 170480637 bytes
+SHA1 (patch-minicargo.mk) = ced7229e639261a080379a2155a298798f1b2945
diff --git a/mrust-cargo/patches/patch-Makefile b/mrust-cargo/patches/patch-Makefile
deleted file mode 100644
index 68a07ca3a3..0000000000
--- a/mrust-cargo/patches/patch-Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- Makefile.orig	2021-09-12 00:15:52.000000000 +0000
-+++ Makefile
-@@ -213,9 +213,12 @@ $(RUSTC_SRC_TARBALL): $(RUSTC_SRC_DES)
- 	@echo [CURL] $@
- 	@rm -f $@
- 	@curl -sS https://static.rust-lang.org/dist/$@ -o $@
--$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
--	tar -xf $(RUSTC_SRC_TARBALL)
-+##$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
-+$(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src.patch
-+	@###tar -xf $(RUSTC_SRC_TARBALL)
-+	@mv ../$(RUSTCSRC) ./
- 	cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch;
-+	find $(RUSTCSRC) -name '*.[oa]' -print0 | xargs -0 rm
- 	cat $(RUSTC_SRC_DES) > $(RUSTC_SRC_DL)
- endif
- 
diff --git a/mrust-cargo/patches/patch-minicargo.mk b/mrust-cargo/patches/patch-minicargo.mk
index 51856ffe46..4095d8d281 100644
--- a/mrust-cargo/patches/patch-minicargo.mk
+++ b/mrust-cargo/patches/patch-minicargo.mk
@@ -1,12 +1,55 @@
 $NetBSD$
 
---- minicargo.mk.orig	2021-09-12 00:15:52.000000000 +0000
+--- minicargo.mk.orig	2022-08-14 04:09:16.000000000 +0000
 +++ minicargo.mk
-@@ -56,7 +56,6 @@ RUSTC_TARGET ?= x86_64-unknown-linux-gnu
- LLVM_TARGETS ?= X86;ARM;AArch64#;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX
- OVERRIDE_DIR := script-overrides/$(RUSTC_CHANNEL)-$(RUSTC_VERSION)$(OVERRIDE_SUFFIX)/
+@@ -134,8 +134,8 @@ OVERRIDE_DIR := script-overrides/$(RUSTC
+ #  Top-level targets
+ # ---------------------------------------------------------------------
  
--.PHONY: bin/mrustc bin/minicargo
- .PHONY: $(OUTDIR)libstd.rlib $(OUTDIR)libtest.rlib $(OUTDIR)libpanic_unwind.rlib $(OUTDIR)libproc_macro.rlib
- .PHONY: $(OUTDIR)rustc $(OUTDIR)cargo
+-.PHONY: $(OUTDIR)libstd.rlib $(OUTDIR)libtest.rlib $(OUTDIR)libpanic_unwind.rlib $(OUTDIR)libproc_macro.rlib
+-.PHONY: $(OUTDIR)rustc $(OUTDIR)cargo
++###.PHONY: $(OUTDIR)libstd.rlib $(OUTDIR)libtest.rlib $(OUTDIR)libpanic_unwind.rlib $(OUTDIR)libproc_macro.rlib
++###.PHONY: $(OUTDIR)rustc $(OUTDIR)cargo
  
+ .PHONY: all test LIBS
+ .PHONY: RUSTCSRC
+@@ -155,7 +155,7 @@ rust_tests: RUST_TESTS_run-pass
+ # rust_tests-compile-fail
+ 
+ # --- Ensure that mrustc/minicargo are built ---
+-.PHONY: bin/mrustc$(EXESUF) bin/minicargo$(EXESUF) bin/testrunner$(EXESUF)
++###.PHONY: bin/mrustc$(EXESUF) bin/minicargo$(EXESUF) bin/testrunner$(EXESUF)
+ bin/mrustc$(EXESUF):
+ 	$(MAKE) -f Makefile all
+ 	test -e $@
+@@ -176,15 +176,18 @@ $(RUSTC_SRC_TARBALL):
+ 	@echo [CURL] $@
+ 	@rm -f $@
+ 	@curl -sS https://static.rust-lang.org/dist/$@ -o $@
+-$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
+-	tar -xf $(RUSTC_SRC_TARBALL)
++##$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
++$(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src.patch
++	@###tar -xf $(RUSTC_SRC_TARBALL)
++	@mv ../$(RUSTCSRC) ./
+ 	cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch;
++	find $(RUSTCSRC) -name '*.[oa]' -print0 | xargs -0 rm
+ 	touch $(RUSTC_SRC_DL)
+ 
+ # Standard library crates
+ # - libstd, libpanic_unwind, libtest and libgetopts
+ # - libproc_macro (mrustc)
+-$(OUTDIR)libstd.rlib: $(MRUSTC) $(MINICARGO) $(RUSTC_SRC_DL)
++$(OUTDIR)libstd.rlib: $(MRUSTC) $(MINICARGO)
+ 	$(MINICARGO) $(RUSTCSRC)$(RUST_LIB_PREFIX)std --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(OUTDIR) $(MINICARGO_FLAGS)
+ 	@test -e $@
+ $(OUTDIR)libpanic_unwind.rlib: $(OUTDIR)libstd.rlib
+@@ -199,7 +202,7 @@ $(OUTDIR)libproc_macro.rlib: $(OUTDIR)li
+ 	@test -e $@
+ 
+ # Dynamically linked version of the standard library
+-$(OUTDIR)test/libtest.so: $(RUSTC_SRC_DL)
++$(OUTDIR)test/libtest.so:
+ 	mkdir -p $(dir $@)
+ 	MINICARGO_DYLIB=1 $(MINICARGO) $(RUSTCSRC)$(RUST_LIB_PREFIX)std          --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(dir $@) $(MINICARGO_FLAGS)
+ 	MINICARGO_DYLIB=1 $(MINICARGO) $(RUSTCSRC)$(RUST_LIB_PREFIX)panic_unwind --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(dir $@) $(MINICARGO_FLAGS)
diff --git a/mrust-libs/Makefile b/mrust-libs/Makefile
index f96ac0dc95..877a97d794 100644
--- a/mrust-libs/Makefile
+++ b/mrust-libs/Makefile
@@ -6,6 +6,8 @@ PKGNAME=	mrust-libs-${SNAPSTAMP}
 COMMENT=	Rustc libraries & crates built using mrustc toolchain
 
 DISTFILES=		${DEFAULT_DISTFILES} ${RUSTSRC_DIST}
+MRUST_DISTDIR=		${DISTDIR}/${DIST_SUBDIR}
+RUSTSRC_LINK=		${DISTDIR}/${DIST_SUBDIR}/${RUSTSRC_DIST}
 BUILD_TARGET=		LIBS
 TEST_TARGET=		mrustc_tests
 ##TEST_TARGET2=		rust_tests-libs
@@ -32,6 +34,35 @@ USE_LANGUAGES+=		c c++14
 #* (no options yet) *#.include "options.mk"
 
 
+#
+# "De-duplicate" the rust source tarball.
+#
+# Without the following pre-fetch and pre-extract targets,
+# the mrust build infrastructure will needlessly download its
+# own, duplicate copy of the rust-lang source tarball into
+# distinfo/mrustc.  Instead, this makes a hardlink from the
+# canonical location, if the tarball already exists there.
+#
+pre-fetch:
+	[ -e "${MRUST_DISTDIR}" ] || ${MKDIR} "${MRUST_DISTDIR}"
+	if [ -e "${DISTDIR}/${RUSTSRC_DIST}" ]; then			\
+	    ${LN} -f "${DISTDIR}/${RUSTSRC_DIST}" "${MRUST_DISTDIR}";	\
+	fi
+
+##	    ${RM} -f "${RUSTSRC_LINK}" && 				\
+
+#
+# Once the checksum is verified, also make the rust source tarball
+# available in the expected location for real rust-src builds.
+# Note: be certain the checksum for the rust-lang tarball
+# in the mrust* distinfo files matches the one in the rust-src
+# distinfo files.
+#
+pre-extract:
+	[ -e "${DISTDIR}/${RUSTSRC_DIST}" ] ||				\
+	    ${LN} "${RUSTSRC_LINK}" "${DISTDIR}/"
+
+
 #
 # "put" (link?) mrustc & minicargo binaries and libraries into
 # directories where minicargo.mk will look for them.
@@ -66,12 +97,14 @@ do-install:
 	${PKGSRC_SETENV} ${INSTALL_ENV}					\
 	    ${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/lib/mrust
 	( cd ${WRKSRC}/${MR_OUTDIR} &&					\
-	    for ff in lib*.rlib lib*.rlib.[ho]* *build build*.txt; do	\
+	    ${RM} build*_cmd.txt build*_dbg.txt;			\
+	    for ff in lib*.rlib lib*.rlib.[ho]* build*.txt; do		\
 	        ${PKGSRC_SETENV} ${INSTALL_ENV}                         \
 		    ${INSTALL_LIB} $$ff					\
 			${DESTDIR}${PREFIX}/lib/mrust;			\
 	    done )
 
+##	    for ff in lib*.rlib lib*.rlib.[ho]* *build build*.txt; do	\
 
 BUILD_DEPENDS+=	mrust-mrustc>=${SNAPSTAMP}:../../wip/mrust-mrustc
 BUILD_DEPENDS+=	mrust-minicargo>=${SNAPSTAMP}:../../wip/mrust-minicargo
diff --git a/mrust-libs/PLIST b/mrust-libs/PLIST
index 41be7ebd17..5d15483020 100644
--- a/mrust-libs/PLIST
+++ b/mrust-libs/PLIST
@@ -1,40 +1,35 @@
 @comment $NetBSD$
-lib/mrust/build_compiler_builtins.txt
-lib/mrust/build_libc.txt
+lib/mrust/build_compiler_builtins-0_1_45_H92.txt
+lib/mrust/build_libc-0_2_95_H19.txt
 lib/mrust/build_std.txt
 lib/mrust/build_unwind.txt
-lib/mrust/compiler_builtins_build
 lib/mrust/liballoc.rlib
 lib/mrust/liballoc.rlib.hir
 lib/mrust/liballoc.rlib.o
-lib/mrust/libbacktrace-0_3_37_H4004.rlib
-lib/mrust/libbacktrace-0_3_37_H4004.rlib.hir
-lib/mrust/libbacktrace-0_3_37_H4004.rlib.o
-lib/mrust/libc_build
-lib/mrust/libcc-1_0_35.rlib
-lib/mrust/libcc-1_0_35.rlib.hir
-lib/mrust/libcc-1_0_35.rlib.o
-lib/mrust/libcfg_if-0_1_8.rlib
-lib/mrust/libcfg_if-0_1_8.rlib.hir
-lib/mrust/libcfg_if-0_1_8.rlib.o
-lib/mrust/libcfg_if-0_1_8_H3.rlib
-lib/mrust/libcfg_if-0_1_8_H3.rlib.hir
-lib/mrust/libcfg_if-0_1_8_H3.rlib.o
-lib/mrust/libcompiler_builtins-0_1_18_H22.rlib
-lib/mrust/libcompiler_builtins-0_1_18_H22.rlib.hir
-lib/mrust/libcompiler_builtins-0_1_18_H22.rlib.o
+lib/mrust/libcc-1_0_68.rlib
+lib/mrust/libcc-1_0_68.rlib.hir
+lib/mrust/libcc-1_0_68.rlib.o
+lib/mrust/libcfg_if-0_1_10.rlib
+lib/mrust/libcfg_if-0_1_10.rlib.hir
+lib/mrust/libcfg_if-0_1_10.rlib.o
+lib/mrust/libcfg_if-0_1_10_H3.rlib
+lib/mrust/libcfg_if-0_1_10_H3.rlib.hir
+lib/mrust/libcfg_if-0_1_10_H3.rlib.o
+lib/mrust/libcompiler_builtins-0_1_45_H92.rlib
+lib/mrust/libcompiler_builtins-0_1_45_H92.rlib.hir
+lib/mrust/libcompiler_builtins-0_1_45_H92.rlib.o
 lib/mrust/libcore.rlib
 lib/mrust/libcore.rlib.hir
 lib/mrust/libcore.rlib.o
 lib/mrust/libgetopts-0_2_21_H1.rlib
 lib/mrust/libgetopts-0_2_21_H1.rlib.hir
 lib/mrust/libgetopts-0_2_21_H1.rlib.o
-lib/mrust/libhashbrown-0_5_0_Hb.rlib
-lib/mrust/libhashbrown-0_5_0_Hb.rlib.hir
-lib/mrust/libhashbrown-0_5_0_Hb.rlib.o
-lib/mrust/liblibc-0_2_62_Hd.rlib
-lib/mrust/liblibc-0_2_62_Hd.rlib.hir
-lib/mrust/liblibc-0_2_62_Hd.rlib.o
+lib/mrust/libhashbrown-0_11_0_H328.rlib
+lib/mrust/libhashbrown-0_11_0_H328.rlib.hir
+lib/mrust/libhashbrown-0_11_0_H328.rlib.o
+lib/mrust/liblibc-0_2_95_H19.rlib
+lib/mrust/liblibc-0_2_95_H19.rlib.hir
+lib/mrust/liblibc-0_2_95_H19.rlib.o
 lib/mrust/libpanic_abort.rlib
 lib/mrust/libpanic_abort.rlib.hir
 lib/mrust/libpanic_abort.rlib.o
@@ -44,9 +39,9 @@ lib/mrust/libpanic_unwind.rlib.o
 lib/mrust/libproc_macro.rlib
 lib/mrust/libproc_macro.rlib.hir
 lib/mrust/libproc_macro.rlib.o
-lib/mrust/librustc_demangle-0_1_16_H3.rlib
-lib/mrust/librustc_demangle-0_1_16_H3.rlib.hir
-lib/mrust/librustc_demangle-0_1_16_H3.rlib.o
+lib/mrust/librustc_demangle-0_1_19_H3.rlib
+lib/mrust/librustc_demangle-0_1_19_H3.rlib.hir
+lib/mrust/librustc_demangle-0_1_19_H3.rlib.o
 lib/mrust/librustc_std_workspace_alloc-1_99_0.rlib
 lib/mrust/librustc_std_workspace_alloc-1_99_0.rlib.hir
 lib/mrust/librustc_std_workspace_alloc-1_99_0.rlib.o
@@ -59,17 +54,21 @@ lib/mrust/librustc_std_workspace_std-1_99_0.rlib.o
 lib/mrust/libstd.rlib
 lib/mrust/libstd.rlib.hir
 lib/mrust/libstd.rlib.o
+lib/mrust/libstd_detect-0_1_5_H5.rlib
+lib/mrust/libstd_detect-0_1_5_H5.rlib.hir
+lib/mrust/libstd_detect-0_1_5_H5.rlib.o
+lib/mrust/libstd_detect-0_1_5_Ha7.rlib
+lib/mrust/libstd_detect-0_1_5_Ha7.rlib.hir
+lib/mrust/libstd_detect-0_1_5_Ha7.rlib.o
 lib/mrust/libterm.rlib
 lib/mrust/libterm.rlib.hir
 lib/mrust/libterm.rlib.o
 lib/mrust/libtest.rlib
 lib/mrust/libtest.rlib.hir
 lib/mrust/libtest.rlib.o
-lib/mrust/libunicode_width-0_1_6_Ha.rlib
-lib/mrust/libunicode_width-0_1_6_Ha.rlib.hir
-lib/mrust/libunicode_width-0_1_6_Ha.rlib.o
+lib/mrust/libunicode_width-0_1_8_Ha.rlib
+lib/mrust/libunicode_width-0_1_8_Ha.rlib.hir
+lib/mrust/libunicode_width-0_1_8_Ha.rlib.o
 lib/mrust/libunwind.rlib
 lib/mrust/libunwind.rlib.hir
 lib/mrust/libunwind.rlib.o
-lib/mrust/std_build
-lib/mrust/unwind_build
diff --git a/mrust-libs/distinfo b/mrust-libs/distinfo
index d89e49815d..a56277e648 100644
--- a/mrust-libs/distinfo
+++ b/mrust-libs/distinfo
@@ -1,15 +1,9 @@
 $NetBSD$
 
-SHA1 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 3c2e1bff891239cc0431b3e6928112ebb7b36793
-RMD160 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = c99362354c652e037622c84b8076ea3bfc4e1ec8
-SHA512 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 8af5c92102f9964c8f68ff469f0d1197e9b84fcf07d9efa8805011766ce256ddef794c2d08a3a85c7cd0234c9235ca5fe0b18372a71fa984d36e2e765d379037
-Size (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 1354302 bytes
-SHA1 (mrustc/rustc-1.39.0-src.tar.gz) = 82ef6f3b88b8d5e3bfa2fab67bbacf5d6f6ba6bb
-RMD160 (mrustc/rustc-1.39.0-src.tar.gz) = d5b04b87fc336e3be7d592f70de0363aa66622aa
-SHA512 (mrustc/rustc-1.39.0-src.tar.gz) = 77be74410b9f7a2e9f78f7a9860964e122ab9518553acc2cc80d5abeecf3302e9b3ed1fd29e022cccff1f9ff4a568b4015c0d3ac0a524f06e38e9cb360a3341e
-Size (mrustc/rustc-1.39.0-src.tar.gz) = 152803201 bytes
-SHA1 (patch-.._rustc-1.39.0-src_src_libstd_sys_unix_thread.rs) = b787f0118df7f01a37b4f6205c4e56614ca74876
-SHA1 (patch-Makefile) = 3326e1e1f9dbe83f7b3147ee073c3c821d4ce939
-SHA1 (patch-minicargo.mk) = a13fa4b05e443871b8d25aa7f008069f5dd2f91d
-SHA1 (patch-script-overrides_stable-1.39.0-linux_build__std.txt) = 728fce6fbbd81db342bdc1eb0f6ac57abf45f8b7
-SHA1 (patch-tools_testrunner_main.cpp) = 9444715ce7b1e496178c4c82375a8181f652d089
+SHA512 (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = ede7bee90a5b14548fb86c91b78d20a0c7847ab6795040399bbb6d6435985470f175ffe26262e3a86ab1c33a7ffa011ba09cddd6857ca8b5d3c1d7d9cfd96b09
+Size (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = 1454068 bytes
+
+SHA512 (mrustc/rustc-1.54.0-src.tar.gz) = f6a1d925e233ef40351193e5507d74b1aed13ce516679558c246e6b6955a6ef393d7e61e6c51a0c5696a7e40a9dcee026bea938b954f5ea5394854cc3ca67f90
+Size (mrustc/rustc-1.54.0-src.tar.gz) = 170480637 bytes
+SHA1 (patch-.._rustc-1.54.0-src_library_std_src_sys_unix_thread.rs) = 56f21806645071eebccfdbc0fdfdbfc071f59e9e
+SHA1 (patch-minicargo.mk) = 380c30e56e5e8a88d0245c49d54929d992bd0dc1
diff --git a/mrust-libs/patches/patch-.._rustc-1.39.0-src_src_libstd_sys_unix_thread.rs b/mrust-libs/patches/patch-.._rustc-1.39.0-src_src_libstd_sys_unix_thread.rs
deleted file mode 100644
index 0177a2c313..0000000000
--- a/mrust-libs/patches/patch-.._rustc-1.39.0-src_src_libstd_sys_unix_thread.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD$
-
---- ../rustc-1.39.0-src/src/libstd/sys/unix/thread.rs.orig	2019-11-04 15:45:21.000000000 +0000
-+++ ../rustc-1.39.0-src/src/libstd/sys/unix/thread.rs
-@@ -321,6 +321,20 @@ pub mod guard {
-             // trust that the kernel's own stack guard will work.
-             let stackaddr = stackaddr as usize;
-             Some(stackaddr - PAGE_SIZE..stackaddr)
-+        } else if cfg!(target_os = "netbsd") {
-+            // [The following should be reviewed/confirmed, -DLB]:
-+            // Using the default else clause below, sporadic guard page
-+            // errors were occurring during builds of rustc & cargo with
-+            // mrustc on NetBSD; however, NetBSD has a kernel-based
-+            // guard area mechanism too.  Therefore, try relying on that
-+            // instead of the default mmap/mprotect solution; but note:
-+            // if userland code changes the stack address, the NetBSD
-+            // kernel-based guard mechanism is deactivated (see
-+            // pthread_attr_getstack(3)) and the userland code must
-+            // manage a guard area itself.  Fortunately, the stack
-+            // appears to be unchanged by this version of thread.rs
-+            let stackaddr = stackaddr as usize;
-+            Some(stackaddr - PAGE_SIZE..stackaddr)
-         } else {
-             // Reallocate the last page of the stack.
-             // This ensures SIGBUS will be raised on
-@@ -333,11 +347,16 @@ pub mod guard {
-             let result = mmap(stackaddr, PAGE_SIZE, PROT_READ | PROT_WRITE,
-                               MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
-             if result != stackaddr || result == MAP_FAILED {
-+                println!( "stackaddr = {}", stackaddr as u64 );
-+                println!( "mmap() -> result {}", result as u64 );
-+                println!( "mmap() -> ERRNO {}", os::errno() as u64 );
-                 panic!("failed to allocate a guard page");
-             }
- 
-             let result = mprotect(stackaddr, PAGE_SIZE, PROT_NONE);
-             if result != 0 {
-+                println!( "stackaddr = {}", stackaddr as u64 );
-+                println!( "mprotect() -> ERRNO {}", os::errno() as u64 );
-                 panic!("failed to protect the guard page");
-             }
- 
diff --git a/mrust-libs/patches/patch-Makefile b/mrust-libs/patches/patch-Makefile
deleted file mode 100644
index 5ec8d1e8a0..0000000000
--- a/mrust-libs/patches/patch-Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
---- Makefile.orig	2021-09-12 00:15:52.000000000 +0000
-+++ Makefile
-@@ -213,15 +213,19 @@ $(RUSTC_SRC_TARBALL): $(RUSTC_SRC_DES)
- 	@echo [CURL] $@
- 	@rm -f $@
- 	@curl -sS https://static.rust-lang.org/dist/$@ -o $@
--$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
--	tar -xf $(RUSTC_SRC_TARBALL)
-+##$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
-+$(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src.patch
-+	@###tar -xf $(RUSTC_SRC_TARBALL)
-+	@mv ../$(RUSTCSRC) ./
- 	cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch;
-+	find $(RUSTCSRC) -name '*.[oa]' -print0 | xargs -0 rm
- 	cat $(RUSTC_SRC_DES) > $(RUSTC_SRC_DL)
- endif
- 
- 
- # MRUSTC-specific tests
--.PHONY: local_tests
-+.PHONY: local_tests mrustc_tests
-+mrustc_tests: test local_tests
- local_tests: $(TEST_DEPS)
- 	@$(MAKE) -C tools/testrunner
- 	@mkdir -p output$(OUTDIR_SUF)/local_tests
diff --git a/mrust-libs/patches/patch-minicargo.mk b/mrust-libs/patches/patch-minicargo.mk
index 51856ffe46..7a690cdd2f 100644
--- a/mrust-libs/patches/patch-minicargo.mk
+++ b/mrust-libs/patches/patch-minicargo.mk
@@ -1,12 +1,37 @@
 $NetBSD$
 
---- minicargo.mk.orig	2021-09-12 00:15:52.000000000 +0000
+--- minicargo.mk.orig	2022-08-14 04:09:16.000000000 +0000
 +++ minicargo.mk
-@@ -56,7 +56,6 @@ RUSTC_TARGET ?= x86_64-unknown-linux-gnu
- LLVM_TARGETS ?= X86;ARM;AArch64#;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX
- OVERRIDE_DIR := script-overrides/$(RUSTC_CHANNEL)-$(RUSTC_VERSION)$(OVERRIDE_SUFFIX)/
+@@ -135,7 +135,7 @@ OVERRIDE_DIR := script-overrides/$(RUSTC
+ # ---------------------------------------------------------------------
  
--.PHONY: bin/mrustc bin/minicargo
  .PHONY: $(OUTDIR)libstd.rlib $(OUTDIR)libtest.rlib $(OUTDIR)libpanic_unwind.rlib $(OUTDIR)libproc_macro.rlib
- .PHONY: $(OUTDIR)rustc $(OUTDIR)cargo
+-.PHONY: $(OUTDIR)rustc $(OUTDIR)cargo
++###.PHONY: $(OUTDIR)rustc $(OUTDIR)cargo
  
+ .PHONY: all test LIBS
+ .PHONY: RUSTCSRC
+@@ -155,7 +155,7 @@ rust_tests: RUST_TESTS_run-pass
+ # rust_tests-compile-fail
+ 
+ # --- Ensure that mrustc/minicargo are built ---
+-.PHONY: bin/mrustc$(EXESUF) bin/minicargo$(EXESUF) bin/testrunner$(EXESUF)
++###.PHONY: bin/mrustc$(EXESUF) bin/minicargo$(EXESUF) bin/testrunner$(EXESUF)
+ bin/mrustc$(EXESUF):
+ 	$(MAKE) -f Makefile all
+ 	test -e $@
+@@ -176,9 +176,12 @@ $(RUSTC_SRC_TARBALL):
+ 	@echo [CURL] $@
+ 	@rm -f $@
+ 	@curl -sS https://static.rust-lang.org/dist/$@ -o $@
+-$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
+-	tar -xf $(RUSTC_SRC_TARBALL)
++##$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
++$(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src.patch
++	@###tar -xf $(RUSTC_SRC_TARBALL)
++	@mv ../$(RUSTCSRC) ./
+ 	cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch;
++	find $(RUSTCSRC) -name '*.[oa]' -print0 | xargs -0 rm
+ 	touch $(RUSTC_SRC_DL)
+ 
+ # Standard library crates
diff --git a/mrust-libs/patches/patch-script-overrides_stable-1.39.0-linux_build__std.txt b/mrust-libs/patches/patch-script-overrides_stable-1.39.0-linux_build__std.txt
deleted file mode 100644
index cf44e8fa2e..0000000000
--- a/mrust-libs/patches/patch-script-overrides_stable-1.39.0-linux_build__std.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-$NetBSD$
-
---- script-overrides/stable-1.39.0-linux/build_std.txt.orig	2021-09-12 00:15:52.000000000 +0000
-+++ script-overrides/stable-1.39.0-linux/build_std.txt
-@@ -1,4 +1,3 @@
--cargo:rustc-link-lib=dl
- cargo:rustc-link-lib=rt
- cargo:rustc-link-lib=pthread
- 
diff --git a/mrust-libs/patches/patch-tools_testrunner_main.cpp b/mrust-libs/patches/patch-tools_testrunner_main.cpp
deleted file mode 100644
index 610b37efac..0000000000
--- a/mrust-libs/patches/patch-tools_testrunner_main.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- tools/testrunner/main.cpp.orig	2021-09-12 00:15:52.000000000 +0000
-+++ tools/testrunner/main.cpp
-@@ -14,6 +14,7 @@
- #include <vector>
- #include <fstream>
- #include <cctype>   // std::isblank
-+#include <csignal>
- #include "../common/debug.h"
- #include "../common/path.h"
- #ifdef _WIN32
diff --git a/mrust-minicargo/distinfo b/mrust-minicargo/distinfo
index 51b94cb8b4..252e8ec2da 100644
--- a/mrust-minicargo/distinfo
+++ b/mrust-minicargo/distinfo
@@ -1,9 +1,5 @@
 $NetBSD$
 
-SHA1 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 3c2e1bff891239cc0431b3e6928112ebb7b36793
-RMD160 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = c99362354c652e037622c84b8076ea3bfc4e1ec8
-SHA512 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 8af5c92102f9964c8f68ff469f0d1197e9b84fcf07d9efa8805011766ce256ddef794c2d08a3a85c7cd0234c9235ca5fe0b18372a71fa984d36e2e765d379037
-Size (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 1354302 bytes
-SHA1 (patch-tools_minicargo_build.cpp) = c17d70ae42d8302afd1650ffc69061f4675a5d97
-SHA1 (patch-tools_minicargo_build.h) = 4149736055d68e67717a9fd4ecfe5e2a2cc09afd
-SHA1 (patch-tools_minicargo_main.cpp) = 943679c189e43db2f4d07f4b8353b2c53cebc25e
+SHA512 (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = ede7bee90a5b14548fb86c91b78d20a0c7847ab6795040399bbb6d6435985470f175ffe26262e3a86ab1c33a7ffa011ba09cddd6857ca8b5d3c1d7d9cfd96b09
+Size (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = 1454068 bytes
+SHA1 (patch-tools_minicargo_build.cpp) = 73c4d4bd9ce55d26dc12ffde6b229108dbfc9f66
diff --git a/mrust-minicargo/patches/patch-tools_minicargo_build.cpp b/mrust-minicargo/patches/patch-tools_minicargo_build.cpp
index 5c9b62fc54..e9567f67b7 100644
--- a/mrust-minicargo/patches/patch-tools_minicargo_build.cpp
+++ b/mrust-minicargo/patches/patch-tools_minicargo_build.cpp
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- tools/minicargo/build.cpp.orig	2021-09-12 00:15:52.000000000 +0000
+--- tools/minicargo/build.cpp.orig	2022-08-14 04:09:16.000000000 +0000
 +++ tools/minicargo/build.cpp
-@@ -48,7 +48,7 @@ extern int _putenv_s(const char*, const 
+@@ -49,7 +49,7 @@ extern int _putenv_s(const char*, const 
  #ifdef __APPLE__
  # include <mach-o/dyld.h>
  #endif
@@ -11,29 +11,7 @@ $NetBSD$
  # include <sys/sysctl.h>
  #endif
  
-@@ -906,9 +906,11 @@ bool Builder::build_target(const Package
-         }
-     }
-     if( true /*this->enable_debug*/ ) {
--        args.push_back("-g");
-         args.push_back("--cfg"); args.push_back("debug_assertions");
-     }
-+    if( m_opts.mrustc_g ) {
-+        args.push_back("-g");
-+    }
-     if( true /*this->enable_optimise*/ ) {
-         args.push_back("-O");
-     }
-@@ -1044,7 +1046,7 @@ bool Builder::build_target(const Package
-     args.push_back("--crate-type"); args.push_back("bin");
-     args.push_back("-o"); args.push_back(outfile);
-     args.push_back("-L"); args.push_back(this->get_output_dir(true).str()); // NOTE: Forces `is_for_host` to true here.
--    if( true )
-+    if( m_opts.mrustc_g )
-     {
-         args.push_back("-g");
-     }
-@@ -1266,7 +1268,11 @@ const helpers::path& get_mrustc_path()
+@@ -1353,7 +1353,11 @@ const helpers::path& get_mrustc_path()
          else
              // TODO: Buffer too small
  # elif defined(__FreeBSD__) || defined(__DragonFly__) || (defined(__NetBSD__) && defined(KERN_PROC_PATHNAME)) // NetBSD 8.0+
diff --git a/mrust-minicargo/patches/patch-tools_minicargo_build.h b/mrust-minicargo/patches/patch-tools_minicargo_build.h
deleted file mode 100644
index 0cb663abe8..0000000000
--- a/mrust-minicargo/patches/patch-tools_minicargo_build.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- tools/minicargo/build.h.orig	2021-09-12 00:15:52.000000000 +0000
-+++ tools/minicargo/build.h
-@@ -20,6 +20,7 @@ struct BuildOptions
-     ::helpers::path build_script_overrides;
-     ::std::vector<::helpers::path>  lib_search_dirs;
-     bool emit_mmir = false;
-+    bool mrustc_g  = false;
-     const char* target_name = nullptr;  // if null, host is used
-     enum class Mode {
-         /// Build the binary/library
diff --git a/mrust-minicargo/patches/patch-tools_minicargo_main.cpp b/mrust-minicargo/patches/patch-tools_minicargo_main.cpp
deleted file mode 100644
index ca35bb844e..0000000000
--- a/mrust-minicargo/patches/patch-tools_minicargo_main.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- tools/minicargo/main.cpp.orig	2021-09-12 00:15:52.000000000 +0000
-+++ tools/minicargo/main.cpp
-@@ -44,6 +44,9 @@ struct ProgramOptions
-     // Library search directories
-     ::std::vector<const char*>  lib_search_dirs;
- 
-+    // Pass "-g" to backend mrustc (for compiling in debugging symbols)
-+    bool mrustc_g = false;
-+
-     // Number of build jobs to run at a time
-     unsigned build_jobs = 1;
- 
-@@ -220,6 +223,7 @@ int main(int argc, const char* argv[])
-         build_opts.output_dir = opts.output_directory ? ::helpers::path(opts.output_directory) : ::helpers::path("output");
-         build_opts.lib_search_dirs.reserve(opts.lib_search_dirs.size());
-         build_opts.emit_mmir = opts.emit_mmir;
-+        build_opts.mrustc_g = opts.mrustc_g;
-         build_opts.target_name = opts.target;
-         for(const auto* d : opts.lib_search_dirs)
-             build_opts.lib_search_dirs.push_back( ::helpers::path(d) );
-@@ -318,6 +322,9 @@ int ProgramOptions::parse(int argc, cons
-                     return 1;
-                 }
-                 break;
-+            case 'g':
-+                this->mrustc_g = true;
-+                break;
-             case 'n':
-                 this->build_jobs = 0;
-                 break;
-@@ -429,6 +436,7 @@ void ProgramOptions::help() const
-         << "--vendor-dir <dir>       : Directory containing vendored packages (from `cargo vendor`)\n"
-         << "--output-dir,-o <dir>    : Specify the compiler output directory\n"
-         << "-L <dir>                 : Search for pre-built crates (e.g. libstd) in the specified directory\n"
-+        << "-g                       : Pass -g to invocations of mrustc (for compiling in debugging symbols)\n"
-         << "-j <count>               : Run at most <count> build tasks at once (default is to run only one)\n"
-         << "-n                       : Don't build any packages, just list the packages that would be built\n"
-         ;
diff --git a/mrust-mrustc/distinfo b/mrust-mrustc/distinfo
index 101810f755..4f1d7895a9 100644
--- a/mrust-mrustc/distinfo
+++ b/mrust-mrustc/distinfo
@@ -1,8 +1,6 @@
 $NetBSD$
 
-SHA1 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 3c2e1bff891239cc0431b3e6928112ebb7b36793
-RMD160 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = c99362354c652e037622c84b8076ea3bfc4e1ec8
-SHA512 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 8af5c92102f9964c8f68ff469f0d1197e9b84fcf07d9efa8805011766ce256ddef794c2d08a3a85c7cd0234c9235ca5fe0b18372a71fa984d36e2e765d379037
-Size (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 1354302 bytes
-SHA1 (patch-Makefile) = 5b2fa73e1fec373cbce1c6669c1b69e6a8f810b7
-SHA1 (patch-src_hir__conv_constant__evaluation.cpp) = 9fc26a65b34d3d9b88b838bd7b0a65b85aae0d1a
+SHA512 (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = ede7bee90a5b14548fb86c91b78d20a0c7847ab6795040399bbb6d6435985470f175ffe26262e3a86ab1c33a7ffa011ba09cddd6857ca8b5d3c1d7d9cfd96b09
+Size (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = 1454068 bytes
+SHA1 (patch-Makefile) = 3ff1523b9475f4e5667c3a5c17026afef9ce2f90
+SHA1 (patch-src_hir__conv_constant__evaluation.cpp) = dae575bff16aa41aba4bfd80474b7b2054fadf84
diff --git a/mrust-mrustc/patches/patch-Makefile b/mrust-mrustc/patches/patch-Makefile
index 9408486cda..51a51f15fd 100644
--- a/mrust-mrustc/patches/patch-Makefile
+++ b/mrust-mrustc/patches/patch-Makefile
@@ -1,32 +1,24 @@
 $NetBSD$
 
---- Makefile.orig	2021-09-12 00:15:52.000000000 +0000
+--- Makefile.orig	2022-08-14 04:09:16.000000000 +0000
 +++ Makefile
-@@ -45,10 +45,8 @@ CXXFLAGS += $(CXXFLAGS_EXTRA)
+@@ -49,10 +49,8 @@ CXXFLAGS += $(CXXFLAGS_EXTRA)
  CPPFLAGS := -I src/include/ -I src/
  CPPFLAGS += -I tools/common/
  
 -CXXFLAGS += -Wno-pessimizing-move
  CXXFLAGS += -Wno-misleading-indentation
  #CXXFLAGS += -Wno-unused-private-field
--CXXFLAGS += -Wno-unknown-warning-option
+-#CXXFLAGS += -Wno-unknown-warning-option
  
  CXXFLAGS += -Werror=return-type
  
-@@ -216,6 +214,7 @@ $(RUSTC_SRC_TARBALL): $(RUSTC_SRC_DES)
- $(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
- 	tar -xf $(RUSTC_SRC_TARBALL)
- 	cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch;
-+	find $(RUSTCSRC) -name '*.[oa]' -print0 | xargs -0 rm
- 	cat $(RUSTC_SRC_DES) > $(RUSTC_SRC_DL)
- endif
- 
-@@ -310,7 +309,7 @@ $(OBJDIR)%.o: src/%.cpp
+@@ -178,7 +176,7 @@ $(OBJDIR)%.o: src/%.cpp
  $(OBJDIR)version.o: $(OBJDIR)%.o: src/%.cpp $(filter-out $(OBJDIR)version.o,$(OBJ)) Makefile
- 	@mkdir -p $(dir $@)
+ 	@+mkdir -p $(dir $@)
  	@echo [CXX] -o $@
--	$V$(CXX) -o $@ -c $< $(CXXFLAGS) $(CPPFLAGS) -MMD -MP -MF $@.dep -D VERSION_GIT_FULLHASH=\"$(shell git show --pretty=%H -s)\" -D VERSION_GIT_BRANCH="\"$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)\"" -D VERSION_GIT_SHORTHASH=\"$(shell git show -s --pretty=%h)\" -D VERSION_BUILDTIME="\"$(shell date -uR)\"" -D VERSION_GIT_ISDIRTY=$(shell git diff-index --quiet HEAD; echo $$?)
-+	$V$(CXX) -o $@ -c $< $(CXXFLAGS) $(CPPFLAGS) -MMD -MP -MF $@.dep -D VERSION_GIT_FULLHASH=\"$(GIT_L_HASH)\" -D VERSION_GIT_BRANCH="\"(branch n/a)"\" -D VERSION_GIT_SHORTHASH=\"$(GIT_S_HASH)\" -D VERSION_BUILDTIME="\"$(shell date -u +"%a, %d %b %Y %X %z")\"" -D VERSION_GIT_ISDIRTY="\"(not available)"\"
+-	$V$(CXX) -o $@ -c $< $(CXXFLAGS) $(CPPFLAGS) -MMD -MP -MF $@.dep -D VERSION_GIT_FULLHASH=\"$(shell git show --pretty=%H -s --no-show-signature)\" -D VERSION_GIT_BRANCH="\"$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)\"" -D VERSION_GIT_SHORTHASH=\"$(shell git show -s --pretty=%h --no-show-signature)\" -D VERSION_BUILDTIME="\"$(shell date -uR)\"" -D VERSION_GIT_ISDIRTY=$(shell git diff-index --quiet HEAD; echo $$?)
++	$V$(CXX) -o $@ -c $< $(CXXFLAGS) $(CPPFLAGS) -MMD -MP -MF $@.dep -D VERSION_GIT_FULLHASH=\"$(GIT_L_HASH)\" -D VERSION_GIT_BRANCH="\"master\"" -D VERSION_GIT_SHORTHASH=\"$(GIT_S_HASH)\" -D VERSION_BUILDTIME="\"$(shell date -u +"%a, %d %b %Y %X %z")\"" -D VERSION_GIT_ISDIRTY=1
  
  src/main.cpp: $(PCHS:%=src/%.gch)
  
diff --git a/mrust-mrustc/patches/patch-src_hir__conv_constant__evaluation.cpp b/mrust-mrustc/patches/patch-src_hir__conv_constant__evaluation.cpp
index 139e1755ee..fe0861d524 100644
--- a/mrust-mrustc/patches/patch-src_hir__conv_constant__evaluation.cpp
+++ b/mrust-mrustc/patches/patch-src_hir__conv_constant__evaluation.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- src/hir_conv/constant_evaluation.cpp.orig	2021-09-12 00:15:52.000000000 +0000
+--- src/hir_conv/constant_evaluation.cpp.orig	2022-08-14 04:09:16.000000000 +0000
 +++ src/hir_conv/constant_evaluation.cpp
 @@ -21,6 +21,12 @@
  #include <trans/monomorphise.hpp>   // For handling monomorph of MIR in provided associated constants
diff --git a/mrust-rustc/Makefile b/mrust-rustc/Makefile
index 26450e706f..81ef953240 100644
--- a/mrust-rustc/Makefile
+++ b/mrust-rustc/Makefile
@@ -7,6 +7,8 @@ COMMENT=	Rustc--built from rustc src, using mrustc toolchain
 
 BUILD_TARGET=		${MR_OUTDIR}rustc
 DISTFILES=		${DEFAULT_DISTFILES} ${RUSTSRC_DIST}
+MRUST_DISTDIR=		${DISTDIR}/${DIST_SUBDIR}
+RUSTSRC_LINK=		${DISTDIR}/${DIST_SUBDIR}/${RUSTSRC_DIST}
 ##TEST_TARGET=		rust_tests-libs
 ##TEST_MAKE_FLAGS=	-o bin/mrustc -o LIBS
 MAKE_FILE=		minicargo.mk
@@ -14,6 +16,7 @@ MAKE_ENV+=		LD_RUN_PATH=${PREFIX}/lib
 MAKE_ENV+=		RUSTC_INSTALL_BINDIR=bin
 MAKE_ENV+=		RUSTC_TARGET=${MACHINE_ARCH}-unknown-${OPSYS:tl}
 ##BUILD_MAKE_FLAGS+=	MINICARGO_FLAGS:="-L ${PREFIX}/lib/"
+##BUILD_MAKE_FLAGS+=	--trace
 
 ##MAKE_JOBS_SAFE=	no		# DLBFLAG: this may be needed
 UNLIMIT_RESOURCES=	stacksize	# DLBFLAG: stacksize doesn't need to
@@ -33,6 +36,32 @@ RUSTBIN=		mrust-rustc
 #* (no options yet) *#.include "options.mk"
 
 
+#
+# "De-duplicate" the rust source tarball.
+#
+# Without the following pre-fetch and pre-extract targets,
+# the mrust build infrastructure will needlessly download its
+# own, duplicate copy of the rust-lang source tarball into
+# distinfo/mrustc.  Instead, this makes a hardlink from the
+# canonical location, if the tarball already exists there.
+#
+pre-fetch:
+	[ -e "${MRUST_DISTDIR}" ] || ${MKDIR} "${MRUST_DISTDIR}"
+	if [ -e "${DISTDIR}/${RUSTSRC_DIST}" ]; then			\
+	    ${LN} -f "${DISTDIR}/${RUSTSRC_DIST}" "${MRUST_DISTDIR}";	\
+	fi
+#
+# Once the checksum is verified, also make the rust source tarball
+# available in the expected location for real rust-src builds.
+# Note: be certain the checksum for the rust-lang tarball
+# in the mrust* distinfo files matches the one in the rust-src
+# distinfo files.
+#
+pre-extract:
+	[ -e "${DISTDIR}/${RUSTSRC_DIST}" ] ||				\
+	    ${LN} "${RUSTSRC_LINK}" "${DISTDIR}/"
+
+
 # "put" (link?) mrustc & minicargo binaries and libraries into
 # directories where minicargo.mk will look for them.
 # Could buildlink3 help with this?  (Probably not without changing
@@ -42,14 +71,17 @@ pre-build:
 		[ -e "$${dd}" ] || ${MKDIR} "$${dd}";			\
 	done
 	for ff in mrustc minicargo; do					\
-	    [ -e "${WRKSRC}/bin/$${ff}" ] ||				\
-		${LN} -s ${PREFIX}/bin/$${ff} "${WRKSRC}/bin";		\
+	    [ -e "${WRKSRC}/bin/$$ff" ] ||				\
+		${LN} -s "${PREFIX}/bin/$$ff" "${WRKSRC}/bin";		\
+		${TOUCH} -hr "${PREFIX}/bin/$$ff" "${WRKSRC}/bin/$$ff";	\
 	done
 	( cd ${PREFIX}/lib/mrust/;					\
 	    for ff in *; do						\
 		[ -e "${WRKSRC}/${MR_OUTDIR}$$ff" ] ||			\
 		    ${LN} -s "${PREFIX}/lib/mrust/$$ff"			\
 			"${WRKSRC}/${MR_OUTDIR}";			\
+		    ${TOUCH} -hr "${PREFIX}/lib/mrust/$$ff"		\
+			"${WRKSRC}/${MR_OUTDIR}/$$ff";			\
 	    done; )
 	cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} \
 		${MAKE_PROGRAM} ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS} RUSTCSRC
@@ -71,7 +103,7 @@ do-install:
 	${PKGSRC_SETENV} ${INSTALL_ENV}					\
 	    ${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin;
 	( cd ${WRKSRC}/${MR_OUTDIR} &&					\
-	    ${LN} rustc-build/rustc_binary ${RUSTBIN} &&		\
+	    ${LN} rustc-build/rustc_main ${RUSTBIN} &&			\
 		${PKGSRC_SETENV} ${INSTALL_ENV}                         \
 		    ${INSTALL_PROGRAM} ${RUSTBIN}			\
 			${DESTDIR}${PREFIX}/bin )
diff --git a/mrust-rustc/distinfo b/mrust-rustc/distinfo
index 0af464c8ae..5a67c35393 100644
--- a/mrust-rustc/distinfo
+++ b/mrust-rustc/distinfo
@@ -1,14 +1,8 @@
 $NetBSD$
 
-SHA1 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 3c2e1bff891239cc0431b3e6928112ebb7b36793
-RMD160 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = c99362354c652e037622c84b8076ea3bfc4e1ec8
-SHA512 (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 8af5c92102f9964c8f68ff469f0d1197e9b84fcf07d9efa8805011766ce256ddef794c2d08a3a85c7cd0234c9235ca5fe0b18372a71fa984d36e2e765d379037
-Size (mrustc/0e5ffbf19d4331ec96c2231866a81429b90b2dbe-0e5ffbf19d4331ec96c2231866a81429b90b2dbe.zip) = 1354302 bytes
-SHA1 (mrustc/rustc-1.39.0-src.tar.gz) = 82ef6f3b88b8d5e3bfa2fab67bbacf5d6f6ba6bb
-RMD160 (mrustc/rustc-1.39.0-src.tar.gz) = d5b04b87fc336e3be7d592f70de0363aa66622aa
-SHA512 (mrustc/rustc-1.39.0-src.tar.gz) = 77be74410b9f7a2e9f78f7a9860964e122ab9518553acc2cc80d5abeecf3302e9b3ed1fd29e022cccff1f9ff4a568b4015c0d3ac0a524f06e38e9cb360a3341e
-Size (mrustc/rustc-1.39.0-src.tar.gz) = 152803201 bytes
-SHA1 (patch-Makefile) = 4cec2c6cc36210bf5ca77f2ae6bbfa23396769e7
-SHA1 (patch-minicargo.mk) = a13fa4b05e443871b8d25aa7f008069f5dd2f91d
-SHA1 (patch-rustc-1.39.0-src.patch) = fa225534ccf3881ba8ad1e08c79b0b3a6a7b3a5d
-SHA1 (patch-script-overrides_stable-1.39.0-linux_build__std.txt) = 728fce6fbbd81db342bdc1eb0f6ac57abf45f8b7
+SHA512 (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = ede7bee90a5b14548fb86c91b78d20a0c7847ab6795040399bbb6d6435985470f175ffe26262e3a86ab1c33a7ffa011ba09cddd6857ca8b5d3c1d7d9cfd96b09
+Size (mrustc/998dc164309d7d707e5c1c38dd61c0b95169cbcf-998dc164309d7d707e5c1c38dd61c0b95169cbcf.zip) = 1454068 bytes
+
+SHA512 (mrustc/rustc-1.54.0-src.tar.gz) = f6a1d925e233ef40351193e5507d74b1aed13ce516679558c246e6b6955a6ef393d7e61e6c51a0c5696a7e40a9dcee026bea938b954f5ea5394854cc3ca67f90
+Size (mrustc/rustc-1.54.0-src.tar.gz) = 170480637 bytes
+SHA1 (patch-minicargo.mk) = ced7229e639261a080379a2155a298798f1b2945
diff --git a/mrust-rustc/patches/patch-Makefile b/mrust-rustc/patches/patch-Makefile
deleted file mode 100644
index 68a07ca3a3..0000000000
--- a/mrust-rustc/patches/patch-Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- Makefile.orig	2021-09-12 00:15:52.000000000 +0000
-+++ Makefile
-@@ -213,9 +213,12 @@ $(RUSTC_SRC_TARBALL): $(RUSTC_SRC_DES)
- 	@echo [CURL] $@
- 	@rm -f $@
- 	@curl -sS https://static.rust-lang.org/dist/$@ -o $@
--$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
--	tar -xf $(RUSTC_SRC_TARBALL)
-+##$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
-+$(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src.patch
-+	@###tar -xf $(RUSTC_SRC_TARBALL)
-+	@mv ../$(RUSTCSRC) ./
- 	cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch;
-+	find $(RUSTCSRC) -name '*.[oa]' -print0 | xargs -0 rm
- 	cat $(RUSTC_SRC_DES) > $(RUSTC_SRC_DL)
- endif
- 
diff --git a/mrust-rustc/patches/patch-minicargo.mk b/mrust-rustc/patches/patch-minicargo.mk
index 51856ffe46..4095d8d281 100644
--- a/mrust-rustc/patches/patch-minicargo.mk
+++ b/mrust-rustc/patches/patch-minicargo.mk
@@ -1,12 +1,55 @@
 $NetBSD$
 
---- minicargo.mk.orig	2021-09-12 00:15:52.000000000 +0000
+--- minicargo.mk.orig	2022-08-14 04:09:16.000000000 +0000
 +++ minicargo.mk
-@@ -56,7 +56,6 @@ RUSTC_TARGET ?= x86_64-unknown-linux-gnu
- LLVM_TARGETS ?= X86;ARM;AArch64#;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX
- OVERRIDE_DIR := script-overrides/$(RUSTC_CHANNEL)-$(RUSTC_VERSION)$(OVERRIDE_SUFFIX)/
+@@ -134,8 +134,8 @@ OVERRIDE_DIR := script-overrides/$(RUSTC
+ #  Top-level targets
+ # ---------------------------------------------------------------------
  
--.PHONY: bin/mrustc bin/minicargo
- .PHONY: $(OUTDIR)libstd.rlib $(OUTDIR)libtest.rlib $(OUTDIR)libpanic_unwind.rlib $(OUTDIR)libproc_macro.rlib
- .PHONY: $(OUTDIR)rustc $(OUTDIR)cargo
+-.PHONY: $(OUTDIR)libstd.rlib $(OUTDIR)libtest.rlib $(OUTDIR)libpanic_unwind.rlib $(OUTDIR)libproc_macro.rlib
+-.PHONY: $(OUTDIR)rustc $(OUTDIR)cargo
++###.PHONY: $(OUTDIR)libstd.rlib $(OUTDIR)libtest.rlib $(OUTDIR)libpanic_unwind.rlib $(OUTDIR)libproc_macro.rlib
++###.PHONY: $(OUTDIR)rustc $(OUTDIR)cargo
  
+ .PHONY: all test LIBS
+ .PHONY: RUSTCSRC
+@@ -155,7 +155,7 @@ rust_tests: RUST_TESTS_run-pass
+ # rust_tests-compile-fail
+ 
+ # --- Ensure that mrustc/minicargo are built ---
+-.PHONY: bin/mrustc$(EXESUF) bin/minicargo$(EXESUF) bin/testrunner$(EXESUF)
++###.PHONY: bin/mrustc$(EXESUF) bin/minicargo$(EXESUF) bin/testrunner$(EXESUF)
+ bin/mrustc$(EXESUF):
+ 	$(MAKE) -f Makefile all
+ 	test -e $@
+@@ -176,15 +176,18 @@ $(RUSTC_SRC_TARBALL):
+ 	@echo [CURL] $@
+ 	@rm -f $@
+ 	@curl -sS https://static.rust-lang.org/dist/$@ -o $@
+-$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
+-	tar -xf $(RUSTC_SRC_TARBALL)
++##$(RUSTC_SRC_DL): $(RUSTC_SRC_TARBALL) rustc-$(RUSTC_VERSION)-src.patch
++$(RUSTC_SRC_DL): rustc-$(RUSTC_VERSION)-src.patch
++	@###tar -xf $(RUSTC_SRC_TARBALL)
++	@mv ../$(RUSTCSRC) ./
+ 	cd $(RUSTCSRC) && patch -p0 < ../rustc-$(RUSTC_VERSION)-src.patch;
++	find $(RUSTCSRC) -name '*.[oa]' -print0 | xargs -0 rm
+ 	touch $(RUSTC_SRC_DL)
+ 
+ # Standard library crates
+ # - libstd, libpanic_unwind, libtest and libgetopts
+ # - libproc_macro (mrustc)
+-$(OUTDIR)libstd.rlib: $(MRUSTC) $(MINICARGO) $(RUSTC_SRC_DL)
++$(OUTDIR)libstd.rlib: $(MRUSTC) $(MINICARGO)
+ 	$(MINICARGO) $(RUSTCSRC)$(RUST_LIB_PREFIX)std --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(OUTDIR) $(MINICARGO_FLAGS)
+ 	@test -e $@
+ $(OUTDIR)libpanic_unwind.rlib: $(OUTDIR)libstd.rlib
+@@ -199,7 +202,7 @@ $(OUTDIR)libproc_macro.rlib: $(OUTDIR)li
+ 	@test -e $@
+ 
+ # Dynamically linked version of the standard library
+-$(OUTDIR)test/libtest.so: $(RUSTC_SRC_DL)
++$(OUTDIR)test/libtest.so:
+ 	mkdir -p $(dir $@)
+ 	MINICARGO_DYLIB=1 $(MINICARGO) $(RUSTCSRC)$(RUST_LIB_PREFIX)std          --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(dir $@) $(MINICARGO_FLAGS)
+ 	MINICARGO_DYLIB=1 $(MINICARGO) $(RUSTCSRC)$(RUST_LIB_PREFIX)panic_unwind --vendor-dir $(VENDOR_DIR) --script-overrides $(OVERRIDE_DIR) --output-dir $(dir $@) $(MINICARGO_FLAGS)
diff --git a/mrust-rustc/patches/patch-rustc-1.39.0-src.patch b/mrust-rustc/patches/patch-rustc-1.39.0-src.patch
deleted file mode 100644
index d7ecbe5cfb..0000000000
--- a/mrust-rustc/patches/patch-rustc-1.39.0-src.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-$NetBSD$
-
---- rustc-1.39.0-src.patch.orig	2021-09-12 00:15:52.000000000 +0000
-+++ rustc-1.39.0-src.patch
-@@ -95,3 +95,54 @@ index da9d9d5bfdc0..3d47471f0ef0 100644
- #+//#[cfg(target_arch = "x86_64")]
- #+//static_assert_size!(Const<'_>, 40);
- 
-+##########
-+####
-+# DLB's additions
-+####
-+--- ./src/librustc/hir/mod.rs.orig	2019-11-04 10:45:21.000000000 -0500
-++++ ./src/librustc/hir/mod.rs	2021-09-19 05:57:02.354311624 -0400
-+@@ -1413,7 +1413,7 @@
-+ 
-+ // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
-+ #[cfg(target_arch = "x86_64")]
-+-static_assert_size!(Expr, 72);
-++//DLB commented//static_assert_size!(Expr, 72);
-+ 
-+ impl Expr {
-+     pub fn precedence(&self) -> ExprPrecedence {
-+--- ./src/librustc/ty/sty.rs.orig	2019-11-04 10:45:21.000000000 -0500
-++++ ./src/librustc/ty/sty.rs	2021-09-19 05:53:20.696595361 -0400
-+@@ -2256,7 +2256,7 @@
-+ }
-+ 
-+ #[cfg(target_arch = "x86_64")]
-+-static_assert_size!(Const<'_>, 40);
-++//DLB commented out//static_assert_size!(Const<'_>, 40);
-+ 
-+ impl<'tcx> Const<'tcx> {
-+     #[inline]
-+--- ./src/librustc/mir/interpret/value.rs.orig	2019-11-04 10:45:21.000000000 -0500
-++++ ./src/librustc/mir/interpret/value.rs	2021-09-19 06:01:16.436347256 -0400
-+@@ -107,7 +107,7 @@
-+ }
-+ 
-+ #[cfg(target_arch = "x86_64")]
-+-static_assert_size!(Scalar, 24);
-++//DLB commented//static_assert_size!(Scalar, 24);
-+ 
-+ impl<Tag: fmt::Debug, Id: fmt::Debug> fmt::Debug for Scalar<Tag, Id> {
-+     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-+--- ./src/libsyntax/ast.rs.orig	2019-11-04 10:45:21.000000000 -0500
-++++ ./src/libsyntax/ast.rs	2021-09-19 05:42:10.925002154 -0400
-+@@ -984,7 +984,7 @@
-+ 
-+ // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
-+ #[cfg(target_arch = "x86_64")]
-+-static_assert_size!(Expr, 96);
-++//DLB commented// static_assert_size!(Expr, 96);
-+ 
-+ impl Expr {
-+     /// Returns `true` if this expression would be valid somewhere that expects a value;
-+
-+
-+##########
diff --git a/mrust-rustc/patches/patch-script-overrides_stable-1.39.0-linux_build__std.txt b/mrust-rustc/patches/patch-script-overrides_stable-1.39.0-linux_build__std.txt
deleted file mode 100644
index cf44e8fa2e..0000000000
--- a/mrust-rustc/patches/patch-script-overrides_stable-1.39.0-linux_build__std.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-$NetBSD$
-
---- script-overrides/stable-1.39.0-linux/build_std.txt.orig	2021-09-12 00:15:52.000000000 +0000
-+++ script-overrides/stable-1.39.0-linux/build_std.txt
-@@ -1,4 +1,3 @@
--cargo:rustc-link-lib=dl
- cargo:rustc-link-lib=rt
- cargo:rustc-link-lib=pthread
- 
diff --git a/mrust/Makefile.common b/mrust/Makefile.common
index c46ceab107..9f8347f824 100644
--- a/mrust/Makefile.common
+++ b/mrust/Makefile.common
@@ -16,9 +16,9 @@
 # used by (etc)
 
 GITHUB_PROJECT=	mrustc
-GITHUB_TAG=	0e5ffbf19d4331ec96c2231866a81429b90b2dbe
-DISTNAME=	0e5ffbf19d4331ec96c2231866a81429b90b2dbe
-SNAPSTAMP=	20210912a
+GITHUB_TAG=	998dc164309d7d707e5c1c38dd61c0b95169cbcf
+DISTNAME=	998dc164309d7d707e5c1c38dd61c0b95169cbcf
+SNAPSTAMP=	20220814a
 PKGNAME=	mrust-${SNAPSTAMP}
 CATEGORIES=	lang
 MASTER_SITES=	${MASTER_SITE_GITHUB:=thepowersgang/}
@@ -37,7 +37,7 @@ LICENSE=	mit
 USE_LANGUAGES+=		c++14
 USE_TOOLS+=		gmake
 
-RUSTVER=		1.39.0
+RUSTVER=		1.54.0
 
 RUSTSRC_DIST=		rustc-${RUSTVER}-src.tar.gz
 SITES.${RUSTSRC_DIST}=	https://static.rust-lang.org/dist/
@@ -45,7 +45,7 @@ SITES.${RUSTSRC_DIST}=	https://static.rust-lang.org/dist/
 MR_OUTDIR=		output-${RUSTVER}/
 
 BUILD_MAKE_FLAGS=	PARLEVEL:=${MAKE_JOBS}
-MAKE_ENV+=		MRUSTC_TARGET_VER=1.39
+MAKE_ENV+=		MRUSTC_TARGET_VER=1.54
 MAKE_ENV+=		OUTDIR_SUF=-${RUSTVER}
 MAKE_ENV+=		RUSTC_VERSION=${RUSTVER}
 
diff --git a/mrust/TODO b/mrust/TODO
index 3b9c326327..cef33dea26 100644
--- a/mrust/TODO
+++ b/mrust/TODO
@@ -2,12 +2,6 @@ These aren't in a particular order (as of this writing), except
 maybe the order they occurred to me to add them [-DLB]
 
 
- *  = new upstream snapshot =
-    rework the mrust package set to use a newer upstream snapshot
-    (I believe the mrustc project is now able to compile rust
-    1.54 on linux rather than being limited to 1.39)
-
-
  *  = "optimize" llvm phase =
     if possible, factor out the llvm portion of the build--which
     currently occurs as part of the mrust-rustc subpackage, so
@@ -27,12 +21,6 @@ maybe the order they occurred to me to add them [-DLB]
     troubleshooting process of the rest of the mrust-rustc phases
 
 
- *  = save distfiles/ space on rustc src =
-    somehow, use a shared copy of "rustc-1.39.0-src.tar.gz" with
-    the rest of distfiles/ rather than putting a (possibly
-    duplicate) copy in an mrustc/ subdir
-
-
  *  = block (inadvertent) downloads =
     add configuration so that every subpackage that invokes any
     kind of upstream make commands does so with a
@@ -48,14 +36,48 @@ maybe the order they occurred to me to add them [-DLB]
 
      a) rebuild rustc & crate with "itself": or, more exactly,
         the mrustc built rustc & cargo
-     b) bootstrap the next version (e.g., 1.40) with either
+     b) bootstrap the next version (e.g., 1.55) with either
         mrust-rust & mrust-cargo, or the above self-rebuilt ones
      c) run the x.py rust testsuite
 
 
+ *  = dynamic MAKE_JOBS =
+    some stages of the mrust* packages benefit hugely from
+    setting MAKE_JOBS appropriately for the number of CPUs, while
+    other stages fail catastrophically because of it--especially
+    if there isn't a huge supply of RAM to match it for the
+    biggest artifacts; if there were a way to have make
+    automatically tune MAKE_JOBS up and down on the fly, based on
+    resource pressure vs. availability, it could improve build
+    time significantly (this is not an mrust-specific topic,
+    though; pkgsrc could potentially benefit from it in general)
+
+
+IMPLEMENTED, TESTING:
+
+
+ *  = new upstream snapshot =
+    rework the mrust package set to use a newer upstream snapshot
+    (I believe the mrustc project is now able to compile rust
+    1.54 on linux rather than being limited to 1.39)
+
+
+ *  = save distfiles/ space on rustc src =
+    somehow, use a shared copy of "rustc-1.39.0-src.tar.gz" with
+    the rest of distfiles/ rather than putting a (possibly
+    duplicate) copy in an mrustc/ subdir
+
+
  *  = fix sporadic the "guard page" build failures =
     I've tried, but I haven't been able to figure out the cause
     of this problem
+   [NOTE: "fix" needs review--I don't know whether it has parity
+    with stock functionality, or if it just eliminates the error
+    but lacks at least some of the actual security that guard
+    pages offer in the first place)
+
+
+DONE:
 
 
  *  = try inhibiting minicargo's forced use of "-g" =
@@ -71,15 +93,5 @@ maybe the order they occurred to me to add them [-DLB]
         -g rather than eliminating it, but that's venturing at
         least a bit into mrustc development, rather than just
         mrustc packaging
-
-
- *  = dynamic MAKE_JOBS =
-    some stages of the mrust* packages benefit hugely from
-    setting MAKE_JOBS appropriately for the number of CPUs, while
-    other stages fail catastrophically because of it--especially
-    if there isn't a huge supply of RAM to match it for the
-    biggest artifacts; if there were a way to have make
-    automatically tune MAKE_JOBS up and down on the fly, based on
-    resource pressure vs. availability, it could improve build
-    time significantly (this is not an mrust-specific topic,
-    though; pkgsrc could potentially benefit from it in general)
+   [NOTE: my implementation was obsoleted by a similar upstream
+    implementation]


Home | Main Index | Thread Index | Old Index