mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
7
package/go-bootstrap/Config.in.host
Normal file
7
package/go-bootstrap/Config.in.host
Normal file
@@ -0,0 +1,7 @@
|
||||
config BR2_PACKAGE_HOST_GO_BOOTSTRAP_ARCH_SUPPORTS
|
||||
bool
|
||||
# See src/cmd/dist/unix.c for the list of support
|
||||
# architectures
|
||||
default y if BR2_HOSTARCH = "x86"
|
||||
default y if BR2_HOSTARCH = "x86_64"
|
||||
default y if BR2_HOSTARCH = "arm"
|
||||
2
package/go-bootstrap/go-bootstrap.hash
Normal file
2
package/go-bootstrap/go-bootstrap.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed:
|
||||
sha256 9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959 go1.4.3.src.tar.gz
|
||||
48
package/go-bootstrap/go-bootstrap.mk
Normal file
48
package/go-bootstrap/go-bootstrap.mk
Normal file
@@ -0,0 +1,48 @@
|
||||
################################################################################
|
||||
#
|
||||
# go-bootstrap
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GO_BOOTSTRAP_VERSION = 1.4.3
|
||||
GO_BOOTSTRAP_SITE = https://storage.googleapis.com/golang
|
||||
GO_BOOTSTRAP_SOURCE = go$(GO_BOOTSTRAP_VERSION).src.tar.gz
|
||||
|
||||
GO_BOOTSTRAP_LICENSE = BSD-3-Clause
|
||||
GO_BOOTSTRAP_LICENSE_FILES = LICENSE
|
||||
|
||||
# To build programs that need cgo support the toolchain needs to be
|
||||
# available, so the toolchain is not needed to build host-go-bootstrap
|
||||
# itself, but needed by other packages that depend on
|
||||
# host-go-bootstrap.
|
||||
HOST_GO_BOOTSTRAP_DEPENDENCIES = toolchain
|
||||
|
||||
HOST_GO_BOOTSTRAP_ROOT = $(HOST_DIR)/lib/go-$(GO_BOOTSTRAP_VERSION)
|
||||
|
||||
# The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE
|
||||
# here. See https://github.com/golang/go/issues/11685.
|
||||
HOST_GO_BOOTSTRAP_MAKE_ENV = \
|
||||
GOOS=linux \
|
||||
GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \
|
||||
GOROOT="$(@D)" \
|
||||
GOBIN="$(@D)/bin" \
|
||||
CC=$(HOSTCC_NOCCACHE) \
|
||||
CGO_ENABLED=0
|
||||
|
||||
define HOST_GO_BOOTSTRAP_BUILD_CMDS
|
||||
cd $(@D)/src && $(HOST_GO_BOOTSTRAP_MAKE_ENV) ./make.bash
|
||||
endef
|
||||
|
||||
define HOST_GO_BOOTSTRAP_INSTALL_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_BOOTSTRAP_ROOT)/bin/go
|
||||
$(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_BOOTSTRAP_ROOT)/bin/gofmt
|
||||
|
||||
cp -a $(@D)/lib $(HOST_GO_BOOTSTRAP_ROOT)/
|
||||
cp -a $(@D)/pkg $(HOST_GO_BOOTSTRAP_ROOT)/
|
||||
|
||||
# There is a known issue which requires the go sources to be installed
|
||||
# https://golang.org/issue/2775
|
||||
cp -a $(@D)/src $(HOST_GO_BOOTSTRAP_ROOT)/
|
||||
endef
|
||||
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user