[oe-commits] [openembedded-core] 04/12: go-runtime: build the Go runtime as a shared library
git at git.openembedded.org
git at git.openembedded.org
Wed Sep 13 21:21:13 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit f562b5e91c12ab67140de537ea269fe1ac85a764
Author: Matt Madison <matt at madison.systems>
AuthorDate: Wed Sep 13 14:54:05 2017 -0300
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.
Signed-off-by: Matt Madison <matt at madison.systems>
Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-devtools/go/go-runtime.inc | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index 3775e86..a074238 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -24,6 +24,9 @@ do_compile() {
mkdir ${GOBIN}
cd src
GO_FLAGS="" ./make.bash
+ if [ -n "${GO_DYNLINK}" ]; then
+ GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash
+ fi
cd ${B}
}
@@ -49,8 +52,25 @@ sysroot_stage_all_append() {
}
ALLOW_EMPTY_${PN} = "1"
-FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include"
-FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} ${libdir}/go/pkg/${TARGET_GOTUPLE}"
+FILES_${PN} = "${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*${SOLIBSDEV}"
+FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.shlibname \
+"
+FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.a \
+"
# The testdata directories in the source tree include some binaries for various
# architectures, scripts, and .a files
INSANE_SKIP_${PN}-dev = "staticdev ldflags file-rdeps arch"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list