diff options
-rw-r--r-- | meta/classes/go.bbclass | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-common.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-runtime.inc | 7 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-target.inc | 10 |
4 files changed, 18 insertions, 3 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index 5c1fdd7d5f..9c4c92bffd 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -67,7 +67,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" B = "${WORKDIR}/build" export GOPATH = "${B}" -export GOTMPDIR ?= "${WORKDIR}/go-tmp" +export GOTMPDIR ?= "${WORKDIR}/build-tmp" GOTMPDIR[vardepvalue] = "" python go_do_unpack() { diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc index 5bbf35b787..83f8db7b39 100644 --- a/meta/recipes-devtools/go/go-common.inc +++ b/meta/recipes-devtools/go/go-common.inc @@ -23,7 +23,7 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1" SSTATE_SCAN_CMD = "true" export GOROOT_OVERRIDE = "1" -export GOTMPDIR ?= "${WORKDIR}/go-tmp" +export GOTMPDIR ?= "${WORKDIR}/build-tmp" GOTMPDIR[vardepvalue] = "" export CGO_ENABLED = "1" diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc index 617e6b5414..a08d44dd3a 100644 --- a/meta/recipes-devtools/go/go-runtime.inc +++ b/meta/recipes-devtools/go/go-runtime.inc @@ -2,10 +2,15 @@ DEPENDS = "virtual/${TUNE_PKGARCH}-go go-native" DEPENDS:class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk" PROVIDES = "virtual/${TARGET_PREFIX}go-runtime" +DEBUG_PREFIX_MAP = "\ + -fdebug-prefix-map=${STAGING_DIR_HOST}= \ + -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \ +" + export CGO_CFLAGS = "${CFLAGS}" export CGO_CPPFLAGS = "${CPPFLAGS}" export CGO_CXXFLAGS = "${CXXFLAGS}" -export CGO_LDFLAGS = "${LDFLAGS}" +export CGO_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${SECURITY_LDFLAGS}" export GOCACHE = "${B}/.cache" GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}" diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc index 47b4411d54..51f1b79cc3 100644 --- a/meta/recipes-devtools/go/go-target.inc +++ b/meta/recipes-devtools/go/go-target.inc @@ -1,6 +1,16 @@ DEPENDS = "virtual/${TUNE_PKGARCH}-go go-native" DEPENDS:class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native" +DEBUG_PREFIX_MAP = "\ + -fdebug-prefix-map=${STAGING_DIR_HOST}= \ + -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \ +" + +export CGO_CFLAGS = "${CFLAGS}" +export CGO_CPPFLAGS = "${CPPFLAGS}" +export CGO_CXXFLAGS = "${CXXFLAGS}" +export CGO_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${SECURITY_LDFLAGS}" + export GOCACHE = "${B}/.cache" GO_LDFLAGS = "" GO_LDFLAGS:class-nativesdk = "-linkmode external" |