git: 8cf45548259c - main - Mk/Uses/go.mk: Use WRKDIR as GOTMPDIR

From: Dmitri Goutnik <dmgk_at_FreeBSD.org>
Date: Wed, 14 Dec 2022 11:21:24 UTC
The branch main has been updated by dmgk:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8cf45548259cbf8d41bfd67ae7a4e0c196829df5

commit 8cf45548259cbf8d41bfd67ae7a4e0c196829df5
Author:     Boris Lytochkin <lytboris@gmail.com>
AuthorDate: 2022-12-14 11:14:05 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-12-14 11:20:33 +0000

    Mk/Uses/go.mk: Use WRKDIR as GOTMPDIR
    
    TMPDIR could be noexec or have low quota, use WRKDIR for Go build artefacts.
    
    Reviewed by:            dmgk
    Differential revision:  https://reviews.freebsd.org/D37567
---
 Mk/Uses/go.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk
index bbbf3b20938e..8bd1a510a94c 100644
--- a/Mk/Uses/go.mk
+++ b/Mk/Uses/go.mk
@@ -124,7 +124,8 @@ GO_ENV+=	CGO_ENABLED=${CGO_ENABLED} \
 		CGO_CFLAGS="${CGO_CFLAGS}" \
 		CGO_LDFLAGS="${CGO_LDFLAGS}" \
 		GOAMD64=${GOAMD64} \
-		GOARM=${GOARM}
+		GOARM=${GOARM} \
+		GOTMPDIR="${WRKDIR}"
 
 .  if ${go_ARGS:Mmodules}
 GO_BUILDFLAGS+=	-mod=vendor