configs/imx6qsabresd: Add ext4 rootfs option
[buildroot-gz.git] / package / go-bootstrap / go-bootstrap.mk
blob29f2b0333598f8eb714e86912bd5a3eae30a0900
1 ################################################################################
3 # go-bootstrap
5 ################################################################################
7 GO_BOOTSTRAP_VERSION = 1.4.2
8 GO_BOOTSTRAP_SITE = https://storage.googleapis.com/golang
9 GO_BOOTSTRAP_SOURCE = go$(GO_BOOTSTRAP_VERSION).src.tar.gz
11 GO_BOOTSTRAP_LICENSE = BSD-3c
12 GO_BOOTSTRAP_LICENSE_FILES = LICENSE
14 # To build programs that need cgo support the toolchain needs to be
15 # available, so the toolchain is not needed to build host-go-bootstrap
16 # itself, but needed by other packages that depend on
17 # host-go-bootstrap.
18 HOST_GO_BOOTSTRAP_DEPENDENCIES = toolchain
20 HOST_GO_BOOTSTRAP_ROOT = $(HOST_DIR)/usr/lib/go-$(GO_BOOTSTRAP_VERSION)
22 # The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE
23 # here. See https://github.com/golang/go/issues/11685.
24 HOST_GO_BOOTSTRAP_MAKE_ENV = \
25 GOOS=linux \
26 GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \
27 GOROOT="$(@D)" \
28 GOBIN="$(@D)/bin" \
29 CC=$(HOSTCC_NOCCACHE) \
30 CGO_ENABLED=0
32 define HOST_GO_BOOTSTRAP_BUILD_CMDS
33 cd $(@D)/src && $(HOST_GO_BOOTSTRAP_MAKE_ENV) ./make.bash
34 endef
36 define HOST_GO_BOOTSTRAP_INSTALL_CMDS
37 $(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_BOOTSTRAP_ROOT)/bin/go
38 $(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_BOOTSTRAP_ROOT)/bin/gofmt
40 cp -a $(@D)/lib $(HOST_GO_BOOTSTRAP_ROOT)/
41 cp -a $(@D)/pkg $(HOST_GO_BOOTSTRAP_ROOT)/
43 # There is a known issue which requires the go sources to be installed
44 # https://golang.org/issue/2775
45 cp -a $(@D)/src $(HOST_GO_BOOTSTRAP_ROOT)/
46 endef
48 $(eval $(host-generic-package))