Skip to content

Instantly share code, notes, and snippets.

@trisk
Created December 3, 2014 22:00
Show Gist options
  • Save trisk/ef5235c5004081f154af to your computer and use it in GitHub Desktop.
Save trisk/ef5235c5004081f154af to your computer and use it in GitHub Desktop.
################################################################################
#
# go
#
################################################################################
HOST_GO_VERSION = f44017549ff9
HOST_GO_SITE = https://code.google.com/p/go
HOST_GO_SITE_METHOD = hg
HOST_GO_LICENSE = BSD
HOST_GO_LICENSE_FILES = LICENSE
GOROOT = $(HOST_DIR)/usr/lib/go
GOOS = linux
ifeq ($(BR2_arm),y)
GOARCH = arm
endif
ifeq ($(BR2_i386),y)
GOARCH = 386
endif
ifeq ($(BR2_x86_64),y)
GOARCH = amd64
endif
define HOST_GO_BUILD_CMDS
cd $(@D)/src; \
GOROOT="$(@D)" \
GOROOT_FINAL="$(GOROOT)" \
GOOS="$(GOOS)" GOARCH="$(GOARCH)" \
CC="$(HOSTCC)" \
CC_FOR_TARGET="$(TARGET_CC)" \
CXX_FOR_TARGET="$(TARGET_CXX)" \
CGO_ENABLED=1 \
bash -x ./make.bash
endef
define HOST_GO_INSTALL_CMDS
mkdir -p $(GOROOT)
cp -r bin include lib pkg $(GOROOT)
endef
$(eval $(host-generic-package))
@trisk
Copy link
Author

trisk commented Dec 3, 2014

I see this message with cgo enabled:

go build runtime/cgo: no buildable Go source files in /ws/mistifyio/mistify-os-buildroot/build/mistify/build/host-go-f44017549ff9/src/pkg/runtime/cgo

It comes from the Import function in src/pkg/go/build/build.go. This appears to cause the build to return 1 for failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment