1 ################################################################################
5 ################################################################################
7 GO_BOOTSTRAP_VERSION
= 1.4.3
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
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
= \
26 GOROOT_FINAL
="$(HOST_GO_BOOTSTRAP_ROOT)" \
29 CC
=$(HOSTCC_NOCCACHE
) \
32 define HOST_GO_BOOTSTRAP_BUILD_CMDS
33 cd
$(@D
)/src
&& $(HOST_GO_BOOTSTRAP_MAKE_ENV
) .
/make.bash
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
)/
48 $(eval
$(host-generic-package
))