Initial commit: add license, readme and layer config.
PATCH 1/4 Initial commit: add license, readme and layer config.
--- COPYING.MIT | 17 +++++++++++++++++ README | 23 +++++++++++++++++++++++ conf/layer.conf | 19 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 COPYING.MIT create mode 100644 README create mode 100644 conf/layer.conf
COPYING.MIT new file +17 -0
@@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.
README new file +23 -0
@@ -0,0 +1,23 @@ +"Mixin" layer for adding latest Go toolchain versions into the Yocto Project LTS. + +At the time Dunfell was released in April 2020, Go 1.14 was the latest version +and officially Dunfell supports only that. This thin special-purpose mixin +layer is meant to address this issue by backporting Go recipes from the master +branch of openembedded-core. + +You can see what Go versions are provided by listing recipes-devtools/ content. + +Including the layer automatically picks up the latest Go version; different versions +need to be set explicitly by adding the following line to your distro config +or local.conf: + +GOVERSION = "1.16%" + +Please note: enabling these newer Go versions makes docker from dunfell branch +of meta-virtualization unbuildable as it is too old. If you need a working docker +recipe, you can use the supplementary 'dunfell/docker' layer from this meta-lts-mixin +repository. + + +Maintainers: +Alexander Kanavin <[email protected]>
conf/layer.conf new file +19 -0
@@ -0,0 +1,19 @@ +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend" + +BBFILE_COLLECTIONS += "lts-go-mixin" +BBFILE_PATTERN_lts-go-mixin := "^${LAYERDIR}/" +BBFILE_PRIORITY_lts-go-mixin = "6" + +LAYERSERIES_COMPAT_lts-go-mixin = "dunfell" + +LAYERDEPENDS_lts-go-mixin = " \ + core \ +" + +GOVERSION ?= "1.17%" +PREFERRED_PROVIDER_go-native = "go-binary-native" +
Signature · 1 line
2.20.1
PATCH 2/4 go-1.16: import recipes from openembedded-core
This is a verbatim copy of go 1.16 recipes from oe-core master just before they were updated to 1.17.
(copy from external source:
git: https://git.yoctoproject.org/poky/
archive: 6f092174b338066e5ac767312a914d00310690a1
copy: meta/recipes-devtools/go --> recipes-devtools/go-1.16)
--- recipes-devtools/go-1.16/go-1.16.10.inc | 25 ++ ...ow-CC-and-CXX-to-have-multiple-words.patch | 33 +++ ...ent-based-hash-generation-less-pedan.patch | 219 ++++++++++++++ ...-to-be-overridden-in-the-environment.patch | 47 +++ ...4-ld-add-soname-to-shareable-objects.patch | 45 +++ ...de-CC-when-building-dist-and-go_boot.patch | 39 +++ ...dist-separate-host-and-target-builds.patch | 274 ++++++++++++++++++ ...d-go-make-GOROOT-precious-by-default.patch | 104 +++++++ ...008-use-GOBUILDMODE-to-set-buildmode.patch | 42 +++ ...go-make-sure-CC-and-CXX-are-absolute.patch | 95 ++++++ .../go-1.16/go-binary-native_1.16.10.bb | 46 +++ recipes-devtools/go-1.16/go-common.inc | 42 +++ .../go-1.16/go-cross-canadian.inc | 62 ++++ .../go-1.16/go-cross-canadian_1.16.10.bb | 2 + recipes-devtools/go-1.16/go-cross.inc | 53 ++++ recipes-devtools/go-1.16/go-cross_1.16.10.bb | 2 + recipes-devtools/go-1.16/go-crosssdk.inc | 43 +++ .../go-1.16/go-crosssdk_1.16.10.bb | 2 + recipes-devtools/go-1.16/go-native_1.16.10.bb | 59 ++++ recipes-devtools/go-1.16/go-runtime.inc | 87 ++++++ .../go-1.16/go-runtime_1.16.10.bb | 3 + recipes-devtools/go-1.16/go-target.inc | 45 +++ recipes-devtools/go-1.16/go_1.16.10.bb | 17 ++ 23 files changed, 1386 insertions(+) create mode 100644 recipes-devtools/go-1.16/go-1.16.10.inc create mode 100644 recipes-devtools/go-1.16/go-1.16/0001-allow-CC-and-CXX-to-have-multiple-words.patch create mode 100644 recipes-devtools/go-1.16/go-1.16/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch create mode 100644 recipes-devtools/go-1.16/go-1.16/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch create mode 100644 recipes-devtools/go-1.16/go-1.16/0004-ld-add-soname-to-shareable-objects.patch create mode 100644 recipes-devtools/go-1.16/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch create mode 100644 recipes-devtools/go-1.16/go-1.16/0006-cmd-dist-separate-host-and-target-builds.patch create mode 100644 recipes-devtools/go-1.16/go-1.16/0007-cmd-go-make-GOROOT-precious-by-default.patch create mode 100644 recipes-devtools/go-1.16/go-1.16/0008-use-GOBUILDMODE-to-set-buildmode.patch create mode 100644 recipes-devtools/go-1.16/go-1.16/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch create mode 100644 recipes-devtools/go-1.16/go-binary-native_1.16.10.bb create mode 100644 recipes-devtools/go-1.16/go-common.inc create mode 100644 recipes-devtools/go-1.16/go-cross-canadian.inc create mode 100644 recipes-devtools/go-1.16/go-cross-canadian_1.16.10.bb create mode 100644 recipes-devtools/go-1.16/go-cross.inc create mode 100644 recipes-devtools/go-1.16/go-cross_1.16.10.bb create mode 100644 recipes-devtools/go-1.16/go-crosssdk.inc create mode 100644 recipes-devtools/go-1.16/go-crosssdk_1.16.10.bb create mode 100644 recipes-devtools/go-1.16/go-native_1.16.10.bb create mode 100644 recipes-devtools/go-1.16/go-runtime.inc create mode 100644 recipes-devtools/go-1.16/go-runtime_1.16.10.bb create mode 100644 recipes-devtools/go-1.16/go-target.inc create mode 100644 recipes-devtools/go-1.16/go_1.16.10.bb
recipes-devtools/go-1.16/go-1.16.10.inc new file +25 -0
@@ -0,0 +1,25 @@ +require go-common.inc + +GO_BASEVERSION = "1.16" +PV = "1.16.10" +FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" + +SRC_URI += "\ + file://0001-allow-CC-and-CXX-to-have-multiple-words.patch \ + file://0002-cmd-go-make-content-based-hash-generation-less-pedan.patch \ + file://0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch \ + file://0004-ld-add-soname-to-shareable-objects.patch \ + file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \ + file://0006-cmd-dist-separate-host-and-target-builds.patch \ + file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ + file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ + file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \ +" +SRC_URI[main.sha256sum] = "a905472011585e403d00d2a41de7ced29b8884309d73482a307f689fd0f320b5" + +# Upstream don't believe it is a signifiant real world issue and will only +# fix in 1.17 onwards where we can drop this. +# https://github.com/golang/go/issues/30999#issuecomment-910470358 +CVE_CHECK_WHITELIST += "CVE-2021-29923"
recipes-devtools/go-1.16/go-1.16/0001-allow-CC-and-CXX-to-have-multiple-words.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 9e3dc44cdfa58d96504d0a789dc82617dd5bef55 Mon Sep 17 00:00:00 2001 +From: Alex Kube <[email protected]> +Date: Wed, 23 Oct 2019 21:01:13 +0430 +Subject: [PATCH 1/9] cmd/go: Allow CC and CXX to have multiple words + +Upstream-Status: Inappropriate [OE specific] + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <[email protected]>. + +Signed-off-by: Alexander J Kube <[email protected]> + +--- + src/cmd/go/internal/envcmd/env.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/cmd/go/internal/envcmd/env.go ++++ b/src/cmd/go/internal/envcmd/env.go +@@ -103,11 +103,11 @@ func MkEnv() []cfg.EnvVar { + + cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch) + if env := strings.Fields(cfg.Getenv("CC")); len(env) > 0 { +- cc = env[0] ++ cc = strings.Join(env, " ") + } + cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch) + if env := strings.Fields(cfg.Getenv("CXX")); len(env) > 0 { +- cxx = env[0] ++ cxx = strings.Join(env, " ") + } + env = append(env, cfg.EnvVar{Name: "AR", Value: envOr("AR", "ar")}) + env = append(env, cfg.EnvVar{Name: "CC", Value: cc})
recipes-devtools/go-1.16/go-1.16/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch new file +219 -0
219 lines not on this page · raw message
recipes-devtools/go-1.16/go-1.16/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch new file +47 -0
47 lines not on this page · raw message
recipes-devtools/go-1.16/go-1.16/0004-ld-add-soname-to-shareable-objects.patch new file +45 -0
45 lines not on this page · raw message
recipes-devtools/go-1.16/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch new file +39 -0
@@ -0,0 +1,39 @@ +From f05ef3ded52b98537c10efd0b15cd9612471524d Mon Sep 17 00:00:00 2001 +From: Alex Kube <[email protected]> +Date: Wed, 23 Oct 2019 21:17:16 +0430 +Subject: [PATCH 5/9] make.bash: override CC when building dist and + go_bootstrap + +for handling OE cross-canadian builds. + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <[email protected]>. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Alexander J Kube <[email protected]> +--- + src/make.bash | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/make.bash ++++ b/src/make.bash +@@ -178,7 +178,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; + exit 1 + fi + rm -f cmd/dist/dist +-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist ++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist + + # -e doesn't propagate out of eval, so check success by hand. + eval $(./cmd/dist/dist env -p || echo FAIL=true) +@@ -209,7 +209,7 @@ fi + # Run dist bootstrap to complete make.bash. + # Bootstrap installs a proper cmd/dist, built with the new toolchain. + # Throw ours, built with Go 1.4, away after bootstrap. +-./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@" ++CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@" + rm -f ./cmd/dist/dist + + # DO NOT ADD ANY NEW CODE HERE.
recipes-devtools/go-1.16/go-1.16/0006-cmd-dist-separate-host-and-target-builds.patch new file +274 -0
274 lines not on this page · raw message
recipes-devtools/go-1.16/go-1.16/0007-cmd-go-make-GOROOT-precious-by-default.patch new file +104 -0
104 lines not on this page · raw message
recipes-devtools/go-1.16/go-1.16/0008-use-GOBUILDMODE-to-set-buildmode.patch new file +42 -0
42 lines not on this page · raw message
recipes-devtools/go-1.16/go-1.16/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch new file +95 -0
95 lines not on this page · raw message
recipes-devtools/go-1.16/go-binary-native_1.16.10.bb new file +46 -0
46 lines not on this page · raw message
recipes-devtools/go-1.16/go-common.inc new file +42 -0
42 lines not on this page · raw message
recipes-devtools/go-1.16/go-cross-canadian.inc new file +62 -0
62 lines not on this page · raw message
recipes-devtools/go-1.16/go-cross-canadian_1.16.10.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-cross-canadian.inc +require go-${PV}.inc
recipes-devtools/go-1.16/go-cross.inc new file +53 -0
53 lines not on this page · raw message
recipes-devtools/go-1.16/go-cross_1.16.10.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-cross.inc +require go-${PV}.inc
recipes-devtools/go-1.16/go-crosssdk.inc new file +43 -0
43 lines not on this page · raw message
recipes-devtools/go-1.16/go-crosssdk_1.16.10.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-crosssdk.inc +require go-${PV}.inc
recipes-devtools/go-1.16/go-native_1.16.10.bb new file +59 -0
59 lines not on this page · raw message
recipes-devtools/go-1.16/go-runtime.inc new file +87 -0
87 lines not on this page · raw message
recipes-devtools/go-1.16/go-runtime_1.16.10.bb new file +3 -0
@@ -0,0 +1,3 @@ +require go-${PV}.inc +require go-runtime.inc +
recipes-devtools/go-1.16/go-target.inc new file +45 -0
45 lines not on this page · raw message
recipes-devtools/go-1.16/go_1.16.10.bb new file +17 -0
@@ -0,0 +1,17 @@ +require go-${PV}.inc +require go-target.inc + +inherit linuxloader + +export GOBUILDMODE="" +export GO_LDSO = "${@get_linuxloader(d)}" +export CC_FOR_TARGET = "gcc" +export CXX_FOR_TARGET = "g++" + +# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its +# variants. +python() { + if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv32' in d.getVar('TARGET_ARCH',True): + d.appendVar('INSANE_SKIP:%s' % d.getVar('PN',True), " textrel") +} +
Signature · 1 line
2.20.1
PATCH 3/4 go-1.17: import recipes from openembedded-core
In reply to Alexander Kanavin(copy from external source:
git: https://git.yoctoproject.org/poky/
archive: 20846102156418f187e977ab0bbd557525bbc4e1
copy: meta/recipes-devtools/go --> recipes-devtools/go-1.17)
--- recipes-devtools/go-1.17/go-1.17.4.inc | 23 ++ ...ow-CC-and-CXX-to-have-multiple-words.patch | 33 ++ ...ent-based-hash-generation-less-pedan.patch | 237 +++++++++++++++ ...-to-be-overridden-in-the-environment.patch | 52 ++++ ...4-ld-add-soname-to-shareable-objects.patch | 45 +++ ...de-CC-when-building-dist-and-go_boot.patch | 41 +++ ...dist-separate-host-and-target-builds.patch | 283 ++++++++++++++++++ ...d-go-make-GOROOT-precious-by-default.patch | 104 +++++++ ...008-use-GOBUILDMODE-to-set-buildmode.patch | 42 +++ ...go-make-sure-CC-and-CXX-are-absolute.patch | 94 ++++++ .../go-1.17/go-binary-native_1.17.4.bb | 46 +++ recipes-devtools/go-1.17/go-common.inc | 42 +++ .../go-1.17/go-cross-canadian.inc | 62 ++++ .../go-1.17/go-cross-canadian_1.17.4.bb | 2 + recipes-devtools/go-1.17/go-cross.inc | 53 ++++ recipes-devtools/go-1.17/go-cross_1.17.4.bb | 2 + recipes-devtools/go-1.17/go-crosssdk.inc | 43 +++ .../go-1.17/go-crosssdk_1.17.4.bb | 2 + recipes-devtools/go-1.17/go-native_1.17.4.bb | 59 ++++ recipes-devtools/go-1.17/go-runtime.inc | 87 ++++++ recipes-devtools/go-1.17/go-runtime_1.17.4.bb | 3 + recipes-devtools/go-1.17/go-target.inc | 45 +++ recipes-devtools/go-1.17/go_1.17.4.bb | 17 ++ 23 files changed, 1417 insertions(+) create mode 100644 recipes-devtools/go-1.17/go-1.17.4.inc create mode 100644 recipes-devtools/go-1.17/go-1.17/0001-allow-CC-and-CXX-to-have-multiple-words.patch create mode 100644 recipes-devtools/go-1.17/go-1.17/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch create mode 100644 recipes-devtools/go-1.17/go-1.17/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch create mode 100644 recipes-devtools/go-1.17/go-1.17/0004-ld-add-soname-to-shareable-objects.patch create mode 100644 recipes-devtools/go-1.17/go-1.17/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch create mode 100644 recipes-devtools/go-1.17/go-1.17/0006-cmd-dist-separate-host-and-target-builds.patch create mode 100644 recipes-devtools/go-1.17/go-1.17/0007-cmd-go-make-GOROOT-precious-by-default.patch create mode 100644 recipes-devtools/go-1.17/go-1.17/0008-use-GOBUILDMODE-to-set-buildmode.patch create mode 100644 recipes-devtools/go-1.17/go-1.17/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch create mode 100644 recipes-devtools/go-1.17/go-binary-native_1.17.4.bb create mode 100644 recipes-devtools/go-1.17/go-common.inc create mode 100644 recipes-devtools/go-1.17/go-cross-canadian.inc create mode 100644 recipes-devtools/go-1.17/go-cross-canadian_1.17.4.bb create mode 100644 recipes-devtools/go-1.17/go-cross.inc create mode 100644 recipes-devtools/go-1.17/go-cross_1.17.4.bb create mode 100644 recipes-devtools/go-1.17/go-crosssdk.inc create mode 100644 recipes-devtools/go-1.17/go-crosssdk_1.17.4.bb create mode 100644 recipes-devtools/go-1.17/go-native_1.17.4.bb create mode 100644 recipes-devtools/go-1.17/go-runtime.inc create mode 100644 recipes-devtools/go-1.17/go-runtime_1.17.4.bb create mode 100644 recipes-devtools/go-1.17/go-target.inc create mode 100644 recipes-devtools/go-1.17/go_1.17.4.bb
recipes-devtools/go-1.17/go-1.17.4.inc new file +23 -0
@@ -0,0 +1,23 @@ +require go-common.inc + +FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go-1.17:" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" + +SRC_URI += "\ + file://0001-allow-CC-and-CXX-to-have-multiple-words.patch \ + file://0002-cmd-go-make-content-based-hash-generation-less-pedan.patch \ + file://0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch \ + file://0004-ld-add-soname-to-shareable-objects.patch \ + file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \ + file://0006-cmd-dist-separate-host-and-target-builds.patch \ + file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ + file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ + file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \ +" +SRC_URI[main.sha256sum] = "4bef3699381ef09e075628504187416565d710660fec65b057edf1ceb187fc4b" + +# Upstream don't believe it is a signifiant real world issue and will only +# fix in 1.17 onwards where we can drop this. +# https://github.com/golang/go/issues/30999#issuecomment-910470358 +CVE_CHECK_WHITELIST += "CVE-2021-29923"
recipes-devtools/go-1.17/go-1.17/0001-allow-CC-and-CXX-to-have-multiple-words.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 9e3dc44cdfa58d96504d0a789dc82617dd5bef55 Mon Sep 17 00:00:00 2001 +From: Alex Kube <[email protected]> +Date: Wed, 23 Oct 2019 21:01:13 +0430 +Subject: [PATCH 1/9] cmd/go: Allow CC and CXX to have multiple words + +Upstream-Status: Inappropriate [OE specific] + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <[email protected]>. + +Signed-off-by: Alexander J Kube <[email protected]> + +--- + src/cmd/go/internal/envcmd/env.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/cmd/go/internal/envcmd/env.go ++++ b/src/cmd/go/internal/envcmd/env.go +@@ -103,11 +103,11 @@ func MkEnv() []cfg.EnvVar { + + cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch) + if env := strings.Fields(cfg.Getenv("CC")); len(env) > 0 { +- cc = env[0] ++ cc = strings.Join(env, " ") + } + cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch) + if env := strings.Fields(cfg.Getenv("CXX")); len(env) > 0 { +- cxx = env[0] ++ cxx = strings.Join(env, " ") + } + env = append(env, cfg.EnvVar{Name: "AR", Value: envOr("AR", "ar")}) + env = append(env, cfg.EnvVar{Name: "CC", Value: cc})
recipes-devtools/go-1.17/go-1.17/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch new file +237 -0
237 lines not on this page · raw message
recipes-devtools/go-1.17/go-1.17/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch new file +52 -0
52 lines not on this page · raw message
recipes-devtools/go-1.17/go-1.17/0004-ld-add-soname-to-shareable-objects.patch new file +45 -0
45 lines not on this page · raw message
recipes-devtools/go-1.17/go-1.17/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch new file +41 -0
41 lines not on this page · raw message
recipes-devtools/go-1.17/go-1.17/0006-cmd-dist-separate-host-and-target-builds.patch new file +283 -0
283 lines not on this page · raw message
recipes-devtools/go-1.17/go-1.17/0007-cmd-go-make-GOROOT-precious-by-default.patch new file +104 -0
104 lines not on this page · raw message
recipes-devtools/go-1.17/go-1.17/0008-use-GOBUILDMODE-to-set-buildmode.patch new file +42 -0
42 lines not on this page · raw message
recipes-devtools/go-1.17/go-1.17/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch new file +94 -0
94 lines not on this page · raw message
recipes-devtools/go-1.17/go-binary-native_1.17.4.bb new file +46 -0
46 lines not on this page · raw message
recipes-devtools/go-1.17/go-common.inc new file +42 -0
42 lines not on this page · raw message
recipes-devtools/go-1.17/go-cross-canadian.inc new file +62 -0
62 lines not on this page · raw message
recipes-devtools/go-1.17/go-cross-canadian_1.17.4.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-cross-canadian.inc +require go-${PV}.inc
recipes-devtools/go-1.17/go-cross.inc new file +53 -0
53 lines not on this page · raw message
recipes-devtools/go-1.17/go-cross_1.17.4.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-cross.inc +require go-${PV}.inc
recipes-devtools/go-1.17/go-crosssdk.inc new file +43 -0
43 lines not on this page · raw message
recipes-devtools/go-1.17/go-crosssdk_1.17.4.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-crosssdk.inc +require go-${PV}.inc
recipes-devtools/go-1.17/go-native_1.17.4.bb new file +59 -0
59 lines not on this page · raw message
recipes-devtools/go-1.17/go-runtime.inc new file +87 -0
87 lines not on this page · raw message
recipes-devtools/go-1.17/go-runtime_1.17.4.bb new file +3 -0
@@ -0,0 +1,3 @@ +require go-${PV}.inc +require go-runtime.inc +
recipes-devtools/go-1.17/go-target.inc new file +45 -0
45 lines not on this page · raw message
recipes-devtools/go-1.17/go_1.17.4.bb new file +17 -0
@@ -0,0 +1,17 @@ +require go-${PV}.inc +require go-target.inc + +inherit linuxloader + +export GOBUILDMODE="" +export GO_LDSO = "${@get_linuxloader(d)}" +export CC_FOR_TARGET = "gcc" +export CXX_FOR_TARGET = "g++" + +# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its +# variants. +python() { + if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv32' in d.getVar('TARGET_ARCH',True): + d.appendVar('INSANE_SKIP:%s' % d.getVar('PN',True), " textrel") +} +
Signature · 1 line
2.20.1
PATCH 4/4 go-helloworld: add from openembedded-core master
In reply to Alexander KanavinThis allows a quick smoke test for whether go toolchain produces working executables.
(copy from external source:
git: https://git.yoctoproject.org/poky/
archive: 278cb0fc0725fbfdcafd3b3afcfb7c7c6a4eee14
copy: meta/recipes-extended/go-examples --> recipes-devtools/go-examples/)
--- .../go-examples/go-helloworld_0.1.bb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 recipes-devtools/go-examples/go-helloworld_0.1.bb
recipes-devtools/go-examples/go-helloworld_0.1.bb new file +22 -0
@@ -0,0 +1,22 @@ +DESCRIPTION = "This is a simple example recipe that cross-compiles a Go program." +SECTION = "examples" +HOMEPAGE = "https://golang.org/" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "git://go.googlesource.com/example;branch=master;protocol=https" +SRCREV = "787a929d5a0dfb8bbfcdd2c4a62e0fd89466113f" +UPSTREAM_CHECK_COMMITS = "1" + +GO_IMPORT = "golang.org/x/example" +GO_INSTALL = "${GO_IMPORT}/hello" +GO_WORKDIR = "${GO_INSTALL}" +export GO111MODULE="off" + +inherit go + +# This is just to make clear where this example is +do_install:append() { + mv ${D}${bindir}/hello ${D}${bindir}/${BPN} +}
Signature · 1 line
2.20.1
Quoted 77 lines · Alexander Kanavin
Reviewed-by Martin Kaistra <[email protected]>Signed-off-by Alexander Kanavin <[email protected]>--- COPYING.MIT | 17 +++++++++++++++++ README | 23 +++++++++++++++++++++++ conf/layer.conf | 19 +++++++++++++++++++ 3 files changed, 59 insertions(+)create mode 100644 COPYING.MIT
create mode 100644 README
create mode 100644conf/layer.confCOPYING.MIT new file +17
-0@@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.README new file +23
-0@@ -0,0 +1,23 @@ +"Mixin" layer for adding latest Go toolchain versions into the Yocto Project LTS. + +At the time Dunfell was released in April 2020, Go 1.14 was the latest version +and officially Dunfell supports only that. This thin special-purpose mixin +layer is meant to address this issue by backporting Go recipes from the master +branch of openembedded-core. + +You can see what Go versions are provided by listing recipes-devtools/ content. + +Including the layer automatically picks up the latest Go version; different versions +need to be set explicitly by adding the following line to your distro config +or local.conf: + +GOVERSION = "1.16%" + +Please note: enabling these newer Go versions makes docker from dunfell branch +of meta-virtualization unbuildable as it is too old. If you need a working docker +recipe, you can use the supplementary 'dunfell/docker' layer from this meta-lts-mixin +repository. + + +Maintainers: +Alexander Kanavin <[email protected]>conf/layer.conf new file +8
-0@@ -0,0 +1,19 @@ +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend" + +BBFILE_COLLECTIONS += "lts-go-mixin" +BBFILE_PATTERN_lts-go-mixin := "^${LAYERDIR}/"
conf/layer.conf line 18
Quoted 10 lines
conf/layer.conf new file +10
-0+BBFILE_PRIORITY_lts-go-mixin = "6" + +LAYERSERIES_COMPAT_lts-go-mixin = "dunfell" + +LAYERDEPENDS_lts-go-mixin = " \ + core \ +" + +GOVERSION ?= "1.17%" +PREFERRED_PROVIDER_go-native = "go-binary-native"
Just out of curiosity: I thought the agreement was that neither PREFERRED_PROVIDER_* nor recipe/provider specific settings should be part of a layer.conf PREFERRED_PROVIDER_go-native as a hard assignment might be troublesome in some setups (mainly depending on what order bblayers.conf actually has)
Quoted 12 lines
conf/layer.conf new file +1
-1+ -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#55990): https://lists.yoctoproject.org/g/yocto/message/55990
Mute This Topic: https://lists.yoctoproject.org/mt/88722205/3647476
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 9 lines · Konrad Weihmann
conf/layer.conf line 18
Quoted 2 lines
conf/layer.conf new file +2
-0+GOVERSION ?= "1.17%" +PREFERRED_PROVIDER_go-native = "go-binary-native"Just out of curiosity: I thought the agreement was that neither PREFERRED_PROVIDER_* nor recipe/provider specific settings should be part of a layer.conf
PREFERRED_PROVIDER_go-native as a hard assignment might be troublesome in some setups (mainly depending on what order bblayers.conf actually has)
Yes, but this way it 'just works'. I do not think writing complicated instructions in README for what needs to be in local.conf or distro config is a better alternative. Suggestions welcome.
Alex