Wed Oct 28 11:41:26 2020 UTC ()
Further space-optimize when building natively on earmv7hf; only
build llvm with the ARM CPU target, but when cross-building on X86,
X86 needs to also be built, due to 2-stage build process.


(he)
diff -r1.198 -r1.199 pkgsrc/lang/rust/Makefile

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

--- pkgsrc/lang/rust/Makefile 2020/10/28 11:16:46 1.198
+++ pkgsrc/lang/rust/Makefile 2020/10/28 11:41:26 1.199
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.198 2020/10/28 11:16:46 he Exp $ 1# $NetBSD: Makefile,v 1.199 2020/10/28 11:41:26 he Exp $
2 2
3DISTNAME= rustc-1.46.0-src 3DISTNAME= rustc-1.46.0-src
4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} 4PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
5CATEGORIES= lang 5CATEGORIES= lang
6MASTER_SITES= https://static.rust-lang.org/dist/ 6MASTER_SITES= https://static.rust-lang.org/dist/
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://www.rust-lang.org/ 9HOMEPAGE= https://www.rust-lang.org/
10COMMENT= Safe, concurrent, practical language 10COMMENT= Safe, concurrent, practical language
11LICENSE= mit OR apache-2.0 11LICENSE= mit OR apache-2.0
12 12
13CONFLICTS+= rust-bin-[0-9]* 13CONFLICTS+= rust-bin-[0-9]*
14 14
@@ -66,43 +66,48 @@ MAKE_ENV+= CARGO_BUILD_JOBS=${_MAKE_JOB @@ -66,43 +66,48 @@ MAKE_ENV+= CARGO_BUILD_JOBS=${_MAKE_JOB
66CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS 66CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS
67 67
68UNLIMIT_RESOURCES+= cputime datasize virtualsize 68UNLIMIT_RESOURCES+= cputime datasize virtualsize
69 69
70TEST_TARGET= check 70TEST_TARGET= check
71 71
72# bin/* lib/*, but names vary 72# bin/* lib/*, but names vary
73CHECK_RELRO_SUPPORTED= no 73CHECK_RELRO_SUPPORTED= no
74CHECK_SSP_SUPPORTED= no 74CHECK_SSP_SUPPORTED= no
75 75
76.include "../../mk/bsd.prefs.mk" 76.include "../../mk/bsd.prefs.mk"
77 77
78.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || \ 78.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || \
79 !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) 79 !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || \
 80 !empty(TARGET:Marmv7-unknown-netbsd-eabihf)
80# Bootstrapping on NetBSD/powerpc requires no debug-info from rustc 81# Bootstrapping on NetBSD/powerpc requires no debug-info from rustc
81# (both for amd64->powerpc built and powerpc->powerpc built bootstrap bits) 82# (both for amd64->powerpc built and powerpc->powerpc built bootstrap bits)
 83# Also try to downsize the armv7 build.
82CONFIGURE_ARGS+= --disable-debug 84CONFIGURE_ARGS+= --disable-debug
83CONFIGURE_ARGS+= --disable-debug-assertions 85CONFIGURE_ARGS+= --disable-debug-assertions
84CONFIGURE_ARGS+= --disable-llvm-release-debuginfo 86CONFIGURE_ARGS+= --disable-llvm-release-debuginfo
85CONFIGURE_ARGS+= --debuginfo-level=0 87CONFIGURE_ARGS+= --debuginfo-level=0
86CONFIGURE_ARGS+= --debuginfo-level-rustc=0 88CONFIGURE_ARGS+= --debuginfo-level-rustc=0
87CONFIGURE_ARGS+= --debuginfo-level-std=0 89CONFIGURE_ARGS+= --debuginfo-level-std=0
88CONFIGURE_ARGS+= --debuginfo-level-tools=0 90CONFIGURE_ARGS+= --debuginfo-level-tools=0
89CONFIGURE_ARGS+= --debuginfo-level-tests=0 91CONFIGURE_ARGS+= --debuginfo-level-tests=0
90.endif 92.endif
91 93
92# Only build the ARM target on/for this host, due to resource constraints 94# Only build the ARM target on/for this host, due to resource constraints
93# (X86 needs to go along due to 2-stage build process) 95.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf)
94.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || \ 96CONFIGURE_ARGS+= --set llvm.targets="ARM"
95 !empty(TARGET:Marmv7-unknown-netbsd-eabihf) 97.endif
 98# When cross-building for ARM on X86, X86 needs to go along due
 99# to 2-stage build process
 100.if !empty(TARGET:Marmv7-unknown-netbsd-eabihf)
96CONFIGURE_ARGS+= --set llvm.targets="ARM;X86" 101CONFIGURE_ARGS+= --set llvm.targets="ARM;X86"
97.endif 102.endif
98 103
99.if ${OPSYS} == "NetBSD" 104.if ${OPSYS} == "NetBSD"
100# This block contains information about known trouble on NetBSD and workarounds. 105# This block contains information about known trouble on NetBSD and workarounds.
101 106
102# Parallel builds failed on NetBSD due to dynamic linker locking bugs. 107# Parallel builds failed on NetBSD due to dynamic linker locking bugs.
103# \todo Explain if the build is believed to be sound if not parallel, 108# \todo Explain if the build is believed to be sound if not parallel,
104# or if a non-parallel build is merely more likely to work. 109# or if a non-parallel build is merely more likely to work.
105# 110#
106# See toolchain/54192 at 111# See toolchain/54192 at
107# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54192 112# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54192
108# which was fixed in -current on 2020-04-19: 113# which was fixed in -current on 2020-04-19: