mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
go: move common settings to go-common.inc
Eliminate some redundancy in the recipes by moving some commonly-used variable settings to the common include file. Also removed a duplicate inherit from go-target.inc that was already in go-common.inc. (From OE-Core rev: e72d2a7b7ee7913095a35ae92c3ca364de00c8a7) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
58472bc7d0
commit
020915eb9b
@@ -23,6 +23,10 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
SSTATE_SCAN_CMD = "true"
|
||||
|
||||
export GOROOT_OVERRIDE = "1"
|
||||
export GOTMPDIR ?= "${WORKDIR}/go-tmp"
|
||||
GOTMPDIR[vardepvalue] = ""
|
||||
export GOCACHE = "off"
|
||||
export CGO_ENABLED = "1"
|
||||
|
||||
do_compile_prepend() {
|
||||
BUILD_CC=${BUILD_CC}
|
||||
|
||||
@@ -10,10 +10,6 @@ export GOHOSTARCH = "${BUILD_GOARCH}"
|
||||
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
|
||||
export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
|
||||
export GOROOT_FINAL = "${libdir}/go"
|
||||
export CGO_ENABLED = "1"
|
||||
export GOCACHE = "off"
|
||||
export GOTMPDIR ?= "${WORKDIR}/go-tmp"
|
||||
GOTMPDIR[vardepvalue] = ""
|
||||
export CGO_CFLAGS = "${CFLAGS}"
|
||||
export CGO_LDFLAGS = "${LDFLAGS}"
|
||||
export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${HOST_CC_ARCH} ${LDFLAGS}"'
|
||||
|
||||
@@ -15,9 +15,6 @@ export GOMIPS = "${TARGET_GOMIPS}"
|
||||
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
|
||||
export GOROOT_FINAL = "${libdir}/go"
|
||||
export GOCACHE = "off"
|
||||
export GOTMPDIR ?= "${WORKDIR}/go-tmp"
|
||||
GOTMPDIR[vardepvalue] = ""
|
||||
export CGO_ENABLED = "1"
|
||||
CC = "${@d.getVar('BUILD_CC').strip()}"
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
@@ -10,10 +10,6 @@ export GOOS = "${TARGET_GOOS}"
|
||||
export GOARCH = "${TARGET_GOARCH}"
|
||||
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
|
||||
export GOROOT_FINAL = "${libdir}/go"
|
||||
export CGO_ENABLED = "1"
|
||||
export GOCACHE = "off"
|
||||
export GOTMPDIR ?= "${WORKDIR}/go-tmp"
|
||||
GOTMPDIR[vardepvalue] = ""
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
|
||||
@@ -10,11 +10,8 @@ SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96
|
||||
|
||||
export GOOS = "${BUILD_GOOS}"
|
||||
export GOARCH = "${BUILD_GOARCH}"
|
||||
export GOTMPDIR ?= "${WORKDIR}/go-tmp"
|
||||
GOTMPDIR[vardepvalue] = ""
|
||||
CC = "${@d.getVar('BUILD_CC').strip()}"
|
||||
|
||||
export CGO_ENABLED = "1"
|
||||
GOMAKEARGS ?= "--no-banner"
|
||||
|
||||
do_configure() {
|
||||
|
||||
@@ -11,14 +11,11 @@ export GO386 = "${TARGET_GO386}"
|
||||
export GOMIPS = "${TARGET_GOMIPS}"
|
||||
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
|
||||
export GOROOT_FINAL = "${libdir}/go"
|
||||
export CGO_ENABLED = "1"
|
||||
export CGO_CFLAGS = "${CFLAGS}"
|
||||
export CGO_CPPFLAGS = "${CPPFLAGS}"
|
||||
export CGO_CXXFLAGS = "${CXXFLAGS}"
|
||||
export CGO_LDFLAGS = "${LDFLAGS}"
|
||||
export GOCACHE = "off"
|
||||
export GOTMPDIR ?= "${WORKDIR}/go-tmp"
|
||||
GOTMPDIR[vardepvalue] = ""
|
||||
|
||||
GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
|
||||
GO_LINKMODE ?= ""
|
||||
GO_LINKMODE_class-nativesdk = "--linkmode=external"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
inherit goarch
|
||||
DEPENDS = "virtual/${TARGET_PREFIX}go go-native"
|
||||
DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
|
||||
|
||||
@@ -11,10 +10,6 @@ export GO386 = "${TARGET_GO386}"
|
||||
export GOMIPS = "${TARGET_GOMIPS}"
|
||||
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
|
||||
export GOROOT_FINAL = "${libdir}/go"
|
||||
export CGO_ENABLED = "1"
|
||||
export GOCACHE = "off"
|
||||
export GOTMPDIR ?= "${WORKDIR}/go-tmp"
|
||||
GOTMPDIR[vardepvalue] = ""
|
||||
GO_LDFLAGS = ""
|
||||
GO_LDFLAGS_class-nativesdk = "-linkmode external"
|
||||
export GO_LDFLAGS
|
||||
|
||||
Reference in New Issue
Block a user