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/recipes-devtools/go | |
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/recipes-devtools/go')
-rw-r--r-- | meta/recipes-devtools/go/go-runtime.inc | 5 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-target.inc | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc index a074238e47..934d1aaeb9 100644 --- a/meta/recipes-devtools/go/go-runtime.inc +++ b/meta/recipes-devtools/go/go-runtime.inc | |||
@@ -45,6 +45,11 @@ do_install() { | |||
45 | done | 45 | done |
46 | } | 46 | } |
47 | 47 | ||
48 | # Remove test binaries that cannot be relocated | ||
49 | do_install_append_class-nativesdk() { | ||
50 | rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata | ||
51 | } | ||
52 | |||
48 | # These testdata directories aren't needed for builds and contain binaries | 53 | # These testdata directories aren't needed for builds and contain binaries |
49 | # that can cause errors in sysroot_strip(), so just remove them. | 54 | # that can cause errors in sysroot_strip(), so just remove them. |
50 | sysroot_stage_all_append() { | 55 | sysroot_stage_all_append() { |
diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc index 0d80bf0d97..b88d0166e5 100644 --- a/meta/recipes-devtools/go/go-target.inc +++ b/meta/recipes-devtools/go/go-target.inc | |||
@@ -14,6 +14,9 @@ export CC_FOR_TARGET = "${CC}" | |||
14 | export CXX_FOR_TARGET = "${CXX}" | 14 | export CXX_FOR_TARGET = "${CXX}" |
15 | export GO_TARGET_INSTALL = "cmd" | 15 | export GO_TARGET_INSTALL = "cmd" |
16 | export GO_FLAGS = "-a" | 16 | export GO_FLAGS = "-a" |
17 | GO_LDFLAGS = "" | ||
18 | GO_LDFLAGS_class-nativesdk = "-linkmode external" | ||
19 | export GO_LDFLAGS | ||
17 | 20 | ||
18 | do_configure[noexec] = "1" | 21 | do_configure[noexec] = "1" |
19 | 22 | ||