summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/go')
-rw-r--r--meta/recipes-devtools/go/go-runtime.inc19
1 files changed, 15 insertions, 4 deletions
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index 934d1aaeb9..f181dc7a29 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -15,7 +15,13 @@ export CC_FOR_TARGET="${CC}"
15export CXX_FOR_TARGET="${CXX}" 15export CXX_FOR_TARGET="${CXX}"
16export GOROOT_OVERRIDE = "1" 16export GOROOT_OVERRIDE = "1"
17 17
18do_configure[noexec] = "1" 18do_configure() {
19 :
20}
21
22do_configure_libc-musl() {
23 rm -f ${S}/src/runtime/race/*.syso
24}
19 25
20do_compile() { 26do_compile() {
21 export GOBIN="${B}/bin" 27 export GOBIN="${B}/bin"
@@ -23,9 +29,13 @@ do_compile() {
23 rm -rf ${GOBIN} ${B}/pkg 29 rm -rf ${GOBIN} ${B}/pkg
24 mkdir ${GOBIN} 30 mkdir ${GOBIN}
25 cd src 31 cd src
26 GO_FLAGS="" ./make.bash 32 ./make.bash --host-only
33 cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
34 rm -rf ${B}/pkg/${TARGET_GOTUPLE}
35 ./make.bash --target-only
27 if [ -n "${GO_DYNLINK}" ]; then 36 if [ -n "${GO_DYNLINK}" ]; then
28 GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash 37 cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
38 GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
29 fi 39 fi
30 cd ${B} 40 cd ${B}
31} 41}
@@ -41,8 +51,9 @@ do_install() {
41 rm -rf ${D}${libdir}/go/pkg/obj 51 rm -rf ${D}${libdir}/go/pkg/obj
42 rm -rf ${D}${libdir}/go/pkg/bootstrap 52 rm -rf ${D}${libdir}/go/pkg/bootstrap
43 find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do 53 find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do
44 [ "$srcdir" = "./cmd" ] || cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/ 54 cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
45 done 55 done
56 rm -f ${D}${libdir}/go/src/cmd/dist/dist
46} 57}
47 58
48# Remove test binaries that cannot be relocated 59# Remove test binaries that cannot be relocated