@ -12,22 +12,91 @@ endif
i n c l u d e $( GO_INCLUDE_DIR ) / g o l a n g - v e r s i o n . m k
# Unset environment variables
# There are more magic variables to track down, but ain't nobody got time for that
# From https://golang.org/cmd/go/#hdr-Environment_variables
# General-purpose environment variables:
u n export \
GCCGO \
GOARCH \
GOBIN \
GOCACHE \
GODEBUG \
GOFLAGS \
GOOS \
GOPATH \
GOROOT \
GOTMPDIR
# Unmodified:
# GOPRIVATE
# GOPROXY
# GONOPROXY
# GOSUMDB
# GONOSUMDB
# Environment variables for use with cgo:
u n export \
GOARCH GOBIN GOCACHE GOFLAGS GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
GOGC GODEBUG GOMAXPROCS GOTRACEBACK \
CGO_ENABLED \
CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \
CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \
CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \
CGO_CXXFLAGS CGO_CXXFLAGS_ALLOW CGO_CXXFLAGS_DISALLOW \
CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \
CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \
GOARM GO386 GOMIPS GOMIPS64 \
GO111MODULE \
GOROOT_FINAL GO_EXTLINK_ENABLED GIT_ALLOW_PROTOCOL \
CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \
BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC
# there are more magic environment variables to track down, but ain't nobody got time for that
# deliberately left untouched: GOPROXY GONOPROXY GOSUMDB GONOSUMDB GOPRIVATE
CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \
CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW
# Architecture-specific environment variables:
u n export \
GOARM \
GO386 \
GOMIPS \
GOMIPS64
# Special-purpose environment variables:
u n export \
GOROOT_FINAL \
GO_EXTLINK_ENABLED \
GIT_ALLOW_PROTOCOL
# From https://golang.org/cmd/go/#hdr-Module_support
u n export \
GO111MODULE
# From https://golang.org/pkg/runtime/#hdr-Environment_Variables
u n export \
GOGC \
GOMAXPROCS \
GORACE \
GOTRACEBACK
# From https://golang.org/cmd/cgo/#hdr-Using_cgo_with_the_go_command
u n export \
CC_FOR_TARGET \
CXX_FOR_TARGET
# From https://golang.org/doc/install/source#environment
u n export \
GOHOSTARCH
# From https://golang.org/src/make.bash
u n export \
GO_GCFLAGS \
GO_LDFLAGS \
GO_DISTFLAGS \
GOBUILDTIMELOGFILE \
GOROOT_BOOTSTRAP
# From https://golang.org/src/cmd/dist/build.go
u n export \
BOOT_GO_GCFLAGS
# From https://golang.org/src/cmd/dist/buildtool.go
u n export \
GOBOOTSTRAP_TOOLEXEC
# From https://golang.org/src/cmd/internal/objabi/util.go
u n export \
GOEXPERIMENT
go_arch = $( subst \
aarch64,arm64,$( subst \