Sat Jun 13 14:18:42 2020 UTC ()
lang/rust: Extend comments about linker fixes

Reference the commits that fixed the (a?) problem and the pullup to
9.  Note that no pullup to 8 has occured, and add a \todo to explain
the plan.

Thanks to Martin for pointers and explanation.


(gdt)
diff -r1.175 -r1.176 pkgsrc/lang/rust/Makefile

cvs diff -r1.175 -r1.176 pkgsrc/lang/rust/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/rust/Makefile 2020/06/13 13:15:44 1.175
+++ pkgsrc/lang/rust/Makefile 2020/06/13 14:18:41 1.176
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.175 2020/06/13 13:15:44 gdt Exp $ 1# $NetBSD: Makefile,v 1.176 2020/06/13 14:18:41 gdt Exp $
2 2
3DISTNAME= rustc-1.43.1-src 3DISTNAME= rustc-1.43.1-src
4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} 4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
5PKGREVISION= 1 5PKGREVISION= 1
6CATEGORIES= lang 6CATEGORIES= lang
7MASTER_SITES= http://static.rust-lang.org/dist/ 7MASTER_SITES= http://static.rust-lang.org/dist/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.rust-lang.org/ 10HOMEPAGE= https://www.rust-lang.org/
11COMMENT= Safe, concurrent, practical language 11COMMENT= Safe, concurrent, practical language
12LICENSE= mit OR apache-2.0 12LICENSE= mit OR apache-2.0
13 13
14USE_GCC_RUNTIME= yes 14USE_GCC_RUNTIME= yes
@@ -127,34 +127,43 @@ CONFIGURE_ARGS+= --debuginfo-level-rustc @@ -127,34 +127,43 @@ CONFIGURE_ARGS+= --debuginfo-level-rustc
127CONFIGURE_ARGS+= --debuginfo-level-std=0 127CONFIGURE_ARGS+= --debuginfo-level-std=0
128CONFIGURE_ARGS+= --debuginfo-level-tools=0 128CONFIGURE_ARGS+= --debuginfo-level-tools=0
129CONFIGURE_ARGS+= --debuginfo-level-tests=0 129CONFIGURE_ARGS+= --debuginfo-level-tests=0
130.endif 130.endif
131 131
132# Only build the ARM target on/for this host, due to resource constraints 132# Only build the ARM target on/for this host, due to resource constraints
133# (X86 needs to go along due to 2-stage build process) 133# (X86 needs to go along due to 2-stage build process)
134.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || \ 134.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || \
135 !empty(TARGET:Marmv7-unknown-netbsd-eabihf) 135 !empty(TARGET:Marmv7-unknown-netbsd-eabihf)
136CONFIGURE_ARGS+= --set llvm.targets="ARM;X86" 136CONFIGURE_ARGS+= --set llvm.targets="ARM;X86"
137.endif 137.endif
138 138
139.if ${OPSYS} == "NetBSD" 139.if ${OPSYS} == "NetBSD"
140# On older versions of NetBSD, parallel builds cause problems. 140# Parallel builds failed on NetBSD due to dynamic linker locking bugs.
141# \todo Explain if the build is believed to be sound if not parallel, 141# \todo Explain if the build is believed to be sound if not parallel,
142# or if a non-parallel build is merely more likely to work. 142# or if a non-parallel build is merely more likely to work.
 143#
143# See toolchain/54192 at 144# See toolchain/54192 at
144# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54192 145# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54192
145# \todo Explain if this has been pulled up to 8 and 9, and  146# which was fixed in -current on 2020-04-19:
 147# http://mail-index.netbsd.org/source-changes/2020/04/16/msg116256.html
 148# http://mail-index.netbsd.org/source-changes/2020/04/19/msg116337.html
 149# These were pulled up to netbsd-9 on 2020-05-13:
 150# http://releng.netbsd.org/cgi-bin/req-9.cgi?show=907
 151# This has not been pulled up to netbsd-8
 152# \todo Explain if it's not applicable, shouldn't be pulled up, should be
 153# but hasn't, is too hard, etc.
146 154
147# If we aren't on 9-current, and are on 8.x or 9.x, avoid parallel. 155# If we aren't on 9-current, and are on 8.x or 9.x, avoid parallel.
 156# \todo Consider avoiding setting this on netbsd-9 past the fix.
148.if empty(MACHINE_PLATFORM:MNetBSD-9.99.*) && !empty(MACHINE_PLATFORM:MNetBSD-[1-9].*) 157.if empty(MACHINE_PLATFORM:MNetBSD-9.99.*) && !empty(MACHINE_PLATFORM:MNetBSD-[1-9].*)
149MAKE_JOBS_SAFE= no 158MAKE_JOBS_SAFE= no
150.endif 159.endif
151.endif 160.endif
152 161
153# 162#
154# Under NetBSD, do not use DT_RUNPATH 163# Under NetBSD, do not use DT_RUNPATH
155# 164#
156BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags 165BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags
157 166
158.PHONY: pre-build-fix 167.PHONY: pre-build-fix
159# 168#
160# Rust unfortunately requires itself to build. On platforms which aren't 169# Rust unfortunately requires itself to build. On platforms which aren't