diff options
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/go/go-1.8.inc | 4 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-common.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-native.inc | 48 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go-native_1.8.bb | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/go/go.inc | 4 |
5 files changed, 32 insertions, 27 deletions
diff --git a/meta/recipes-devtools/go/go-1.8.inc b/meta/recipes-devtools/go/go-1.8.inc index 3690f310bd..bfb26de01d 100644 --- a/meta/recipes-devtools/go/go-1.8.inc +++ b/meta/recipes-devtools/go/go-1.8.inc | |||
@@ -15,5 +15,5 @@ SRC_URI += "\ | |||
15 | file://split-host-and-target-build.patch \ | 15 | file://split-host-and-target-build.patch \ |
16 | file://gotooldir.patch \ | 16 | file://gotooldir.patch \ |
17 | " | 17 | " |
18 | SRC_URI[md5sum] = "64e9380e07bba907e26a00cf5fcbe77e" | 18 | SRC_URI[main.md5sum] = "64e9380e07bba907e26a00cf5fcbe77e" |
19 | SRC_URI[sha256sum] = "5f5dea2447e7dcfdc50fa6b94c512e58bfba5673c039259fd843f68829d99fa6" | 19 | SRC_URI[main.sha256sum] = "5f5dea2447e7dcfdc50fa6b94c512e58bfba5673c039259fd843f68829d99fa6" |
diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc index f74b8b7650..ce1eb86812 100644 --- a/meta/recipes-devtools/go/go-common.inc +++ b/meta/recipes-devtools/go/go-common.inc | |||
@@ -14,7 +14,7 @@ LICENSE = "BSD-3-Clause" | |||
14 | 14 | ||
15 | inherit goarch | 15 | inherit goarch |
16 | 16 | ||
17 | SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz" | 17 | SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz;name=main" |
18 | S = "${WORKDIR}/go" | 18 | S = "${WORKDIR}/go" |
19 | B = "${S}" | 19 | B = "${S}" |
20 | 20 | ||
diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc index c21f8fda78..9eb2b3211f 100644 --- a/meta/recipes-devtools/go/go-native.inc +++ b/meta/recipes-devtools/go/go-native.inc | |||
@@ -1,16 +1,28 @@ | |||
1 | # Use immediate assingment here to get the original (/usr/lib) | ||
2 | # instead of the one rewritten by native.bbclass. | ||
3 | nonstaging_libdir := "${libdir}" | ||
4 | |||
1 | inherit native | 5 | inherit native |
2 | 6 | ||
3 | BOOTSTRAP ?= "" | 7 | SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4" |
8 | SRC_URI[bootstrap.md5sum] = "dfb604511115dd402a77a553a5923a04" | ||
9 | SRC_URI[bootstrap.sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959" | ||
10 | |||
4 | export GOOS = "${BUILD_GOOS}" | 11 | export GOOS = "${BUILD_GOOS}" |
5 | export GOARCH = "${BUILD_GOARCH}" | 12 | export GOARCH = "${BUILD_GOARCH}" |
6 | export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go${BOOTSTRAP}" | 13 | CC = "${@d.getVar('BUILD_CC', True).strip()}" |
7 | export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go1.4" | 14 | |
8 | export CGO_ENABLED = "1" | 15 | export CGO_ENABLED = "1" |
9 | 16 | ||
10 | do_configure[noexec] = "1" | 17 | do_configure() { |
18 | cd ${WORKDIR}/go1.4/go/src | ||
19 | CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash | ||
20 | } | ||
11 | 21 | ||
12 | do_compile() { | 22 | do_compile() { |
13 | export GOBIN="${B}/bin" | 23 | export GOBIN="${B}/bin" |
24 | export GOROOT_FINAL="${nonstaging_libdir}/go" | ||
25 | export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go" | ||
14 | rm -rf ${GOBIN} | 26 | rm -rf ${GOBIN} |
15 | mkdir ${GOBIN} | 27 | mkdir ${GOBIN} |
16 | 28 | ||
@@ -18,7 +30,7 @@ do_compile() { | |||
18 | mkdir -p ${WORKDIR}/build-tmp | 30 | mkdir -p ${WORKDIR}/build-tmp |
19 | 31 | ||
20 | cd src | 32 | cd src |
21 | CGO_ENABLED=0 ./make.bash --host-only | 33 | ./make.bash --host-only |
22 | } | 34 | } |
23 | 35 | ||
24 | make_wrapper() { | 36 | make_wrapper() { |
@@ -26,31 +38,25 @@ make_wrapper() { | |||
26 | cat <<END >${D}${bindir}/$2$3 | 38 | cat <<END >${D}${bindir}/$2$3 |
27 | #!/bin/bash | 39 | #!/bin/bash |
28 | here=\`dirname \$0\` | 40 | here=\`dirname \$0\` |
29 | export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go$3\`}" | 41 | export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" |
30 | \$here/../lib/go$3/bin/$1 "\$@" | 42 | \$here/../lib/go/bin/$1 "\$@" |
31 | END | 43 | END |
32 | chmod +x ${D}${bindir}/$2$3 | 44 | chmod +x ${D}${bindir}/$2 |
33 | } | 45 | } |
34 | 46 | ||
35 | do_install() { | 47 | do_install() { |
36 | install -d ${D}${libdir}/go${BOOTSTRAP} | 48 | install -d ${D}${libdir}/go |
37 | cp -a ${B}/pkg ${D}${libdir}/go${BOOTSTRAP}/ | 49 | cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/ |
38 | install -d ${D}${libdir}/go${BOOTSTRAP}/src | 50 | install -d ${D}${libdir}/go/src |
39 | (cd ${S}/src; for d in *; do \ | 51 | (cd ${S}/src; for d in *; do \ |
40 | [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go${BOOTSTRAP}/src/; \ | 52 | [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ |
41 | done) | 53 | done) |
42 | 54 | ||
43 | install -d ${D}${bindir} ${D}${libdir}/go${BOOTSTRAP}/bin | 55 | install -d ${D}${bindir} ${D}${libdir}/go/bin |
44 | for f in ${B}/bin/* | 56 | for f in ${B}/bin/* |
45 | do | 57 | do |
46 | base=`basename $f` | 58 | base=`basename $f` |
47 | install -m755 $f ${D}${libdir}/go${BOOTSTRAP}/bin | 59 | install -m755 $f ${D}${libdir}/go/bin |
48 | make_wrapper $base $base ${BOOTSTRAP} | 60 | make_wrapper $base $base |
49 | done | 61 | done |
50 | } | 62 | } |
51 | |||
52 | do_package[noexec] = "1" | ||
53 | do_packagedata[noexec] = "1" | ||
54 | do_package_write_ipk[noexec] = "1" | ||
55 | do_package_write_deb[noexec] = "1" | ||
56 | do_package_write_rpm[noexec] = "1" | ||
diff --git a/meta/recipes-devtools/go/go-native_1.8.bb b/meta/recipes-devtools/go/go-native_1.8.bb index 182fca27a0..bbf3c0dd73 100644 --- a/meta/recipes-devtools/go/go-native_1.8.bb +++ b/meta/recipes-devtools/go/go-native_1.8.bb | |||
@@ -1,3 +1,2 @@ | |||
1 | require ${PN}.inc | 1 | require ${PN}.inc |
2 | require go-${PV}.inc | 2 | require go-${PV}.inc |
3 | DEPENDS += "go-bootstrap-native" | ||
diff --git a/meta/recipes-devtools/go/go.inc b/meta/recipes-devtools/go/go.inc index 52abbebd7e..9efbd275bd 100644 --- a/meta/recipes-devtools/go/go.inc +++ b/meta/recipes-devtools/go/go.inc | |||
@@ -1,5 +1,5 @@ | |||
1 | inherit goarch | 1 | inherit goarch |
2 | DEPENDS += "go-bootstrap-native" | 2 | DEPENDS += "go-native" |
3 | 3 | ||
4 | # libgcc is required for the target specific libraries to build | 4 | # libgcc is required for the target specific libraries to build |
5 | # properly, but apparently not for go-cross and, more importantly, | 5 | # properly, but apparently not for go-cross and, more importantly, |
@@ -17,7 +17,7 @@ export GOHOSTARCH = "${BUILD_GOARCH}" | |||
17 | export GOOS = "${TARGET_GOOS}" | 17 | export GOOS = "${TARGET_GOOS}" |
18 | export GOARCH = "${TARGET_GOARCH}" | 18 | export GOARCH = "${TARGET_GOARCH}" |
19 | export GOARM = "${TARGET_GOARM}" | 19 | export GOARM = "${TARGET_GOARM}" |
20 | export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go1.4" | 20 | export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" |
21 | export GOROOT_FINAL = "${libdir}/go" | 21 | export GOROOT_FINAL = "${libdir}/go" |
22 | export CGO_ENABLED = "1" | 22 | export CGO_ENABLED = "1" |
23 | export CC_FOR_TARGET = "${CC}" | 23 | export CC_FOR_TARGET = "${CC}" |