summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2017-09-13 14:54:05 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-14 11:35:45 +0100
commit5c068016555c8d5edd4752f9fb880bf156ffebf4 (patch)
treed952e9009cf8e9db5b279e7e414696fe92fff9b7 /meta/recipes-devtools
parent996836ae4bfb11caa0e0baa35013c7fb7b01c5f0 (diff)
downloadpoky-5c068016555c8d5edd4752f9fb880bf156ffebf4.tar.gz
go-runtime: build the Go runtime as a shared library
If the target architecture supports, it build the Go runtime as a shared library in addition to building the static libraries. (From OE-Core rev: f562b5e91c12ab67140de537ea269fe1ac85a764) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/go/go-runtime.inc24
1 files changed, 22 insertions, 2 deletions
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index 3775e86b06..a074238e47 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -24,6 +24,9 @@ do_compile() {
24 mkdir ${GOBIN} 24 mkdir ${GOBIN}
25 cd src 25 cd src
26 GO_FLAGS="" ./make.bash 26 GO_FLAGS="" ./make.bash
27 if [ -n "${GO_DYNLINK}" ]; then
28 GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash
29 fi
27 cd ${B} 30 cd ${B}
28} 31}
29 32
@@ -49,8 +52,25 @@ sysroot_stage_all_append() {
49} 52}
50 53
51ALLOW_EMPTY_${PN} = "1" 54ALLOW_EMPTY_${PN} = "1"
52FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include" 55FILES_${PN} = "${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*${SOLIBSDEV}"
53FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} ${libdir}/go/pkg/${TARGET_GOTUPLE}" 56FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \
57 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.shlibname \
58 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.shlibname \
59 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.shlibname \
60 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.shlibname \
61 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.shlibname \
62 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.shlibname \
63 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.shlibname \
64"
65FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} \
66 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.a \
67 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.a \
68 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.a \
69 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.a \
70 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.a \
71 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.a \
72 ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.a \
73"
54# The testdata directories in the source tree include some binaries for various 74# The testdata directories in the source tree include some binaries for various
55# architectures, scripts, and .a files 75# architectures, scripts, and .a files
56INSANE_SKIP_${PN}-dev = "staticdev ldflags file-rdeps arch" 76INSANE_SKIP_${PN}-dev = "staticdev ldflags file-rdeps arch"