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
-6
View File
@@ -9,8 +9,6 @@ ifeq ($(origin GO_INCLUDE_DIR),undefined)
GO_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
endif
include $(GO_INCLUDE_DIR)/golang-version.mk
# Unset environment variables
# There are more magic variables to track down, but ain't nobody got time for that
@@ -209,10 +207,6 @@ endif
GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mips64||mips64el||mipsel||powerpc64||x86_64)
GO_TARGET_PREFIX:=/usr
GO_TARGET_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR)
GO_TARGET_ROOT:=$(GO_TARGET_PREFIX)/lib/go-$(GO_TARGET_VERSION_ID)
# ASLR/PIE