golang: Reorganize GoPackage/Environment and Makefile variables

* Move more environment variables into GoPackage/Environment
* Split GoPackage/Environment into target and build sections
* Do not set GOROOT_FINAL for Go packages (setting it should only affect
  the Go compiler and not Go packages)
* Set CGO_LDFLAGS to $(TARGET_LDFLAGS)
* Move GO_TARGET_* variables from golang-values.mk, and GO_VERSION_*
  variables from golang-version.mk, into golang/Makefile

This also updates runc, containerd, and docker-ce to reflect the changes
in GoPackage/Environment.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To
2020-02-04 21:48:08 +08:00
parent 3bc3298426
commit 89d3f0ab54
7 changed files with 37 additions and 63 deletions
+2 -8
View File
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=docker-ce
PKG_VERSION:=19.03.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=components/cli/LICENSE components/engine/LICENSE
@@ -78,13 +78,7 @@ endif
define Build/Compile
( \
export GOPATH=$(GO_PKG_BUILD_DIR) \
GOCACHE=$(GO_PKG_CACHE_DIR) \
GOTMPDIR=$(GO_PKG_TMP_DIR) \
GOROOT_FINAL=$(GO_TARGET_ROOT) \
CC=$(TARGET_CC) \
CXX=$(TARGET_CXX) \
$(call GoPackage/Environment) \
export $(call GoPackage/Environment) \
GITCOMMIT=$(PKG_SOURCE_VERSION) \
DOCKER_GITCOMMIT=$(PKG_SOURCE_VERSION) \
DOCKER_BUILDTAGS='$(BUILDTAGS)' \