diff options
author | Matt Madison <matt@madison.systems> | 2017-09-14 16:22:28 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-21 09:05:50 +0100 |
commit | 975246ffe6e053820c6929454c3d73fb329c54a1 (patch) | |
tree | e0cb1d59e2621977025fc3ec8179f1d38e496fb9 /meta/classes/go.bbclass | |
parent | 82ba908d86a75401c86b966d1579a9e5e00ff05d (diff) | |
download | poky-975246ffe6e053820c6929454c3d73fb329c54a1.tar.gz |
go: fix linking issues for nativesdk builds
Switch to using an external linker for nativesdk
go, go-runtime, and go package builds, which works
more reliably when building 32-bit SDKs.
(From OE-Core rev: f76779f7ef6636355a5aa5741a736f5234a67fdb)
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/go.bbclass')
-rw-r--r-- | meta/classes/go.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index 33502bf722..863b578e5c 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -37,7 +37,9 @@ GO_RPATH = "${@'-r ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_D | |||
37 | GO_RPATH_class-native = "${@'-r ${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" | 37 | GO_RPATH_class-native = "${@'-r ${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" |
38 | GO_RPATH_LINK_class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" | 38 | GO_RPATH_LINK_class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" |
39 | GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}" | 39 | GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}" |
40 | GO_LDFLAGS ?= '-ldflags="${GO_RPATH} -extldflags '${GO_EXTLDFLAGS}'"' | 40 | GO_LINKMODE ?= "" |
41 | GO_LINKMODE_class-nativesdk = "--linkmode=external" | ||
42 | GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' | ||
41 | export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}" | 43 | export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}" |
42 | export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" | 44 | export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" |
43 | export GOPTESTFLAGS ?= "-test.v" | 45 | export GOPTESTFLAGS ?= "-test.v" |