diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2021-09-06 17:16:38 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2021-09-06 19:28:28 +0000 |
commit | b1670e2c3d42a2aeacff843ef0ccea21c0929d03 (patch) | |
tree | ec01615cd0e0f43e4defe8feaf95d24a9983444e | |
parent | b7fe3caf7f6c269458d86cdf77cc59568b6d5041 (diff) | |
download | ports-b1670e2c3d42a2aeacff843ef0ccea21c0929d03.tar.gz ports-b1670e2c3d42a2aeacff843ef0ccea21c0929d03.zip |
lang/rust*: Mk/Uses/cargo.mk: Move TMPDIR to WRKDIR
rustc stashes intermediary files in TMPDIR (default /tmp) which
might cause issues for users that for some reason space limit their
/tmp. WRKDIR should have plenty of space.
Other ports that use rustc might be affected too, but set it only
in USES=cargo and lang/rust* ports for now.
PR: 258126
With hat: rust
-rw-r--r-- | Mk/Uses/cargo.mk | 8 | ||||
-rw-r--r-- | lang/rust-bootstrap/Makefile | 5 | ||||
-rw-r--r-- | lang/rust/Makefile | 6 |
3 files changed, 19 insertions, 0 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index ad8c8d8d20ce..a0a88701e62e 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -125,6 +125,14 @@ CARGO_TEST?= yes CARGO_USE_GITHUB?= no CARGO_USE_GITLAB?= no +# rustc stashes intermediary files in TMPDIR (default /tmp) which +# might cause issues for users that for some reason space limit +# their /tmp. WRKDIR should have plenty of space. +# Allow users and ports to still overwrite it. +.if ${TMPDIR:U/tmp} == /tmp +TMPDIR= ${WRKDIR} +.endif + # Manage crate features. .if !empty(CARGO_FEATURES:M--no-default-features) CARGO_BUILD_ARGS+= --no-default-features diff --git a/lang/rust-bootstrap/Makefile b/lang/rust-bootstrap/Makefile index 38bbe511f1f9..cd8a411b165b 100644 --- a/lang/rust-bootstrap/Makefile +++ b/lang/rust-bootstrap/Makefile @@ -57,6 +57,11 @@ CC= clang90 CXX= clang++90 .endif PATCHDIR= ${.CURDIR}/../rust/files +# rustc stashes intermediary files in TMPDIR (default /tmp) which +# might cause issues for users that for some reason space limit +# their /tmp. WRKDIR should have plenty of space. +# ?= to allow users to still overwrite it in make.conf. +TMPDIR?= ${WRKDIR} # Resulting packages are not specific to amd64 NO_ARCH= yes diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 26185e9697df..25ba0b104626 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -44,6 +44,12 @@ TEST_ENV= ${MAKE_ENV} \ CONFLICTS_INSTALL?= rust-nightly +# rustc stashes intermediary files in TMPDIR (default /tmp) which +# might cause issues for users that for some reason space limit +# their /tmp. WRKDIR should have plenty of space. +# ?= to allow users to still overwrite it in make.conf. +TMPDIR?= ${WRKDIR} + OPTIONS_DEFINE= DOCS GDB SOURCES WASM OPTIONS_DEFAULT= SOURCES WASM OPTIONS_EXCLUDE_armv6= DOCS |