summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-03-31 16:45:08 +0000
committernia <nia@pkgsrc.org>2021-03-31 16:45:08 +0000
commitdf2414181c44001a0df4f47b48504e519979eeab (patch)
treecb1e16c58fd7d658a01be34993850a13f0365a1c /lang
parent3deabb976328b0e9d89f1f11e1b643be28034ab4 (diff)
downloadpkgsrc-df2414181c44001a0df4f47b48504e519979eeab.tar.gz
rust: Only enable rust-cargo-static when building bootstraps.
The final compiler will be dynamically linked with OpenSSL and curl, but this is undesirable in the case of bootstraps where it might be built against a version incompatible with version the user has. Discussed with he@.
Diffstat (limited to 'lang')
-rw-r--r--lang/rust/Makefile3
-rw-r--r--lang/rust/options.mk8
2 files changed, 8 insertions, 3 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 5b13a6bfe01..17a17fad444 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.221 2021/03/30 09:50:14 nia Exp $
+# $NetBSD: Makefile,v 1.222 2021/03/31 16:45:08 nia Exp $
DISTNAME= rustc-1.49.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= https://static.rust-lang.org/dist/
diff --git a/lang/rust/options.mk b/lang/rust/options.mk
index ebc4f9c8c02..8de639361d5 100644
--- a/lang/rust/options.mk
+++ b/lang/rust/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.12 2021/03/30 09:50:14 nia Exp $
+# $NetBSD: options.mk,v 1.13 2021/03/31 16:45:08 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.rust
PKG_SUPPORTED_OPTIONS+= rust-cargo-static
@@ -14,7 +14,11 @@ PKG_SUGGESTED_OPTIONS+= rust-llvm
. endif
.endif
-.if ${OPSYS} == "NetBSD"
+.include "cross.mk"
+
+# Bundle OpenSSL and curl into the cargo binary when producing
+# bootstraps.
+.if ${OPSYS} == "NetBSD" && !empty(TARGET)
PKG_SUGGESTED_OPTIONS+= rust-cargo-static
.endif