diff options
author | Matt Madison <matt@madison.systems> | 2018-03-04 13:09:25 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-06 06:43:10 -0800 |
commit | 7a4ca89b557648d9aae30b405f6be09b4a383abe (patch) | |
tree | fb131b91c54b054ad525566d2da014abaa7c8f9f /meta/recipes-devtools/go/go-native.inc | |
parent | 26227695b350056225e9d309defdcd66573b79bb (diff) | |
download | poky-7a4ca89b557648d9aae30b405f6be09b4a383abe.tar.gz |
go: update go 1.9 -> go 1.10
* Patches and recipes reworked for go 1.10's significant
changes to its bootstrap and build steps.
* Update go1.4 source tarball used for go-native
bootstrapping to the version recommended
in the current go documentation
* Remove test data from installed sources to eliminate
some packaging QA warnings
* Set GOCACHE to 'off' to disable 1.10's build caching
in the go recipes and bbclass
* Update go_do_compile to compile both static and
dynamic objects dynamic linking is in use, since
go1.10's build tool is pickier about this
(From OE-Core rev: 4fd749ca6450a4870be1c1e13802f084b6eb0db6)
Signed-off-by: Matt Madison <matt@madison.systems>
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/go-native.inc')
-rw-r--r-- | meta/recipes-devtools/go/go-native.inc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc index 95db1c2b7c..35561768df 100644 --- a/meta/recipes-devtools/go/go-native.inc +++ b/meta/recipes-devtools/go/go-native.inc | |||
@@ -4,34 +4,34 @@ nonstaging_libdir := "${libdir}" | |||
4 | 4 | ||
5 | inherit native | 5 | inherit native |
6 | 6 | ||
7 | SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4" | 7 | SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4" |
8 | SRC_URI[bootstrap.md5sum] = "dfb604511115dd402a77a553a5923a04" | 8 | SRC_URI[bootstrap.md5sum] = "dbf727a4b0e365bf88d97cbfde590016" |
9 | SRC_URI[bootstrap.sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959" | 9 | SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52" |
10 | 10 | ||
11 | export GOOS = "${BUILD_GOOS}" | 11 | export GOOS = "${BUILD_GOOS}" |
12 | export GOARCH = "${BUILD_GOARCH}" | 12 | export GOARCH = "${BUILD_GOARCH}" |
13 | export GOTMPDIR ?= "${WORKDIR}/go-tmp" | ||
14 | GOTMPDIR[vardepvalue] = "" | ||
13 | CC = "${@d.getVar('BUILD_CC').strip()}" | 15 | CC = "${@d.getVar('BUILD_CC').strip()}" |
14 | 16 | ||
15 | export CGO_ENABLED = "1" | 17 | export CGO_ENABLED = "1" |
18 | GOMAKEARGS ?= "--no-banner" | ||
16 | 19 | ||
17 | do_configure() { | 20 | do_configure() { |
18 | cd ${WORKDIR}/go1.4/go/src | 21 | cd ${WORKDIR}/go1.4/go/src |
19 | CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash | 22 | CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash |
20 | } | 23 | } |
21 | 24 | ||
22 | do_compile() { | 25 | do_compile() { |
23 | export GOBIN="${B}/bin" | ||
24 | export GOROOT_FINAL="${nonstaging_libdir}/go" | 26 | export GOROOT_FINAL="${nonstaging_libdir}/go" |
25 | export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go" | 27 | export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go" |
26 | rm -rf ${GOBIN} | ||
27 | mkdir ${GOBIN} | ||
28 | |||
29 | export TMPDIR=${WORKDIR}/build-tmp | ||
30 | mkdir -p ${WORKDIR}/build-tmp | ||
31 | 28 | ||
32 | cd src | 29 | cd src |
33 | ./make.bash --host-only | 30 | ./make.bash ${GOMAKEARGS} |
31 | cd ${B} | ||
34 | } | 32 | } |
33 | do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin" | ||
34 | do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin" | ||
35 | 35 | ||
36 | make_wrapper() { | 36 | make_wrapper() { |
37 | rm -f ${D}${bindir}/$2$3 | 37 | rm -f ${D}${bindir}/$2$3 |
@@ -51,7 +51,7 @@ do_install() { | |||
51 | (cd ${S}/src; for d in *; do \ | 51 | (cd ${S}/src; for d in *; do \ |
52 | [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ | 52 | [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ |
53 | done) | 53 | done) |
54 | rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata | 54 | find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \; |
55 | install -d ${D}${bindir} ${D}${libdir}/go/bin | 55 | install -d ${D}${bindir} ${D}${libdir}/go/bin |
56 | for f in ${B}/bin/* | 56 | for f in ${B}/bin/* |
57 | do | 57 | do |