| @@ -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 | |
3 | DISTNAME= rustc-1.46.0-src | | 3 | DISTNAME= rustc-1.46.0-src |
4 | PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} | | 4 | PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} |
5 | CATEGORIES= lang | | 5 | CATEGORIES= lang |
6 | MASTER_SITES= https://static.rust-lang.org/dist/ | | 6 | MASTER_SITES= https://static.rust-lang.org/dist/ |
7 | | | 7 | |
8 | MAINTAINER= pkgsrc-users@NetBSD.org | | 8 | MAINTAINER= pkgsrc-users@NetBSD.org |
9 | HOMEPAGE= https://www.rust-lang.org/ | | 9 | HOMEPAGE= https://www.rust-lang.org/ |
10 | COMMENT= Safe, concurrent, practical language | | 10 | COMMENT= Safe, concurrent, practical language |
11 | LICENSE= mit OR apache-2.0 | | 11 | LICENSE= mit OR apache-2.0 |
12 | | | 12 | |
13 | CONFLICTS+= rust-bin-[0-9]* | | 13 | CONFLICTS+= 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 |
66 | CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS | | 66 | CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS |
67 | | | 67 | |
68 | UNLIMIT_RESOURCES+= cputime datasize virtualsize | | 68 | UNLIMIT_RESOURCES+= cputime datasize virtualsize |
69 | | | 69 | |
70 | TEST_TARGET= check | | 70 | TEST_TARGET= check |
71 | | | 71 | |
72 | # bin/* lib/*, but names vary | | 72 | # bin/* lib/*, but names vary |
73 | CHECK_RELRO_SUPPORTED= no | | 73 | CHECK_RELRO_SUPPORTED= no |
74 | CHECK_SSP_SUPPORTED= no | | 74 | CHECK_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. |
82 | CONFIGURE_ARGS+= --disable-debug | | 84 | CONFIGURE_ARGS+= --disable-debug |
83 | CONFIGURE_ARGS+= --disable-debug-assertions | | 85 | CONFIGURE_ARGS+= --disable-debug-assertions |
84 | CONFIGURE_ARGS+= --disable-llvm-release-debuginfo | | 86 | CONFIGURE_ARGS+= --disable-llvm-release-debuginfo |
85 | CONFIGURE_ARGS+= --debuginfo-level=0 | | 87 | CONFIGURE_ARGS+= --debuginfo-level=0 |
86 | CONFIGURE_ARGS+= --debuginfo-level-rustc=0 | | 88 | CONFIGURE_ARGS+= --debuginfo-level-rustc=0 |
87 | CONFIGURE_ARGS+= --debuginfo-level-std=0 | | 89 | CONFIGURE_ARGS+= --debuginfo-level-std=0 |
88 | CONFIGURE_ARGS+= --debuginfo-level-tools=0 | | 90 | CONFIGURE_ARGS+= --debuginfo-level-tools=0 |
89 | CONFIGURE_ARGS+= --debuginfo-level-tests=0 | | 91 | CONFIGURE_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) || \ | | 96 | CONFIGURE_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) |
96 | CONFIGURE_ARGS+= --set llvm.targets="ARM;X86" | | 101 | CONFIGURE_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: |