go: Add recipes for 1.12 release and make it default
PATCH v3 1/2 go: Add recipes for 1.12 release and make it default
- Refresh patches
- Enable GOCACHE required as of Go 1.12
---
v2: Refresh patches to make devtool happy, improve commit msg
v3: Remove GOCACHE from go.bbclass
meta/classes/go.bbclass | 1 - meta/conf/distro/include/tcmode-default.inc | 2 +- meta/recipes-devtools/go/go-1.12.inc | 23 ++ ...ow-CC-and-CXX-to-have-multiple-words.patch | 31 ++ ...ent-based-hash-generation-less-pedan.patch | 218 ++++++++++++++ ...-to-be-overridden-in-the-environment.patch | 48 +++ ...4-ld-add-soname-to-shareable-objects.patch | 45 +++ ...de-CC-when-building-dist-and-go_boot.patch | 37 +++ ...dist-separate-host-and-target-builds.patch | 282 ++++++++++++++++++ ...d-go-make-GOROOT-precious-by-default.patch | 106 +++++++ ...008-use-GOBUILDMODE-to-set-buildmode.patch | 37 +++ ...place-glibc-dynamic-linker-with-musl.patch | 112 +++++++ meta/recipes-devtools/go/go-common.inc | 1 - .../go/go-cross-canadian_1.12.bb | 2 + meta/recipes-devtools/go/go-cross.inc | 1 - meta/recipes-devtools/go/go-cross_1.12.bb | 2 + meta/recipes-devtools/go/go-crosssdk_1.12.bb | 2 + meta/recipes-devtools/go/go-native_1.12.bb | 2 + meta/recipes-devtools/go/go-runtime_1.12.bb | 2 + meta/recipes-devtools/go/go_1.12.bb | 14 + 20 files changed, 964 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-devtools/go/go-1.12.inc create mode 100644 meta/recipes-devtools/go/go-1.12/0001-allow-CC-and-CXX-to-have-multiple-words.patch create mode 100644 meta/recipes-devtools/go/go-1.12/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch create mode 100644 meta/recipes-devtools/go/go-1.12/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch create mode 100644 meta/recipes-devtools/go/go-1.12/0004-ld-add-soname-to-shareable-objects.patch create mode 100644 meta/recipes-devtools/go/go-1.12/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch create mode 100644 meta/recipes-devtools/go/go-1.12/0006-cmd-dist-separate-host-and-target-builds.patch create mode 100644 meta/recipes-devtools/go/go-1.12/0007-cmd-go-make-GOROOT-precious-by-default.patch create mode 100644 meta/recipes-devtools/go/go-1.12/0008-use-GOBUILDMODE-to-set-buildmode.patch create mode 100644 meta/recipes-devtools/go/go-1.12/0009-ld-replace-glibc-dynamic-linker-with-musl.patch create mode 100644 meta/recipes-devtools/go/go-cross-canadian_1.12.bb create mode 100644 meta/recipes-devtools/go/go-cross_1.12.bb create mode 100644 meta/recipes-devtools/go/go-crosssdk_1.12.bb create mode 100644 meta/recipes-devtools/go/go-native_1.12.bb create mode 100644 meta/recipes-devtools/go/go-runtime_1.12.bb create mode 100644 meta/recipes-devtools/go/go_1.12.bb
meta/classes/go.bbclass +0 -1
@@ -45,7 +45,6 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" B = "${WORKDIR}/build" export GOPATH = "${B}" -export GOCACHE = "off" export GOTMPDIR ?= "${WORKDIR}/go-tmp" GOTMPDIR[vardepvalue] = ""
meta/conf/distro/include/tcmode-default.inc +1 -1
@@ -25,7 +25,7 @@ GDBVERSION ?= "8.2%" GLIBCVERSION ?= "2.29%" LINUXLIBCVERSION ?= "5.0%" QEMUVERSION ?= "3.1%" -GOVERSION ?= "1.11%" +GOVERSION ?= "1.12%" PREFERRED_VERSION_gcc ?= "${GCCVERSION}" PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
meta/recipes-devtools/go/go-1.12.inc new file +23 -0
@@ -0,0 +1,23 @@ +require go-common.inc + +GO_BASEVERSION = "1.12" +GO_MINOR = "" +PV .= "${GO_MINOR}" +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 \ +" +SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch" + +SRC_URI[main.md5sum] = "b3332feba8a945a193b47a52d9981bb9" +SRC_URI[main.sha256sum] = "09c43d3336743866f2985f566db0520b36f4992aea2b4b2fd9f52f17049e88f2"
meta/recipes-devtools/go/go-1.12/0001-allow-CC-and-CXX-to-have-multiple-words.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 7cc519aa5f84cf8fc7ac8c10fc69aa8040330ea0 Mon Sep 17 00:00:00 2001 +From: Matt Madison <[email protected]> +Date: Mon, 19 Feb 2018 08:49:33 -0800 +Subject: [PATCH] allow CC and CXX to have multiple words + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Matt Madison <[email protected]> + +--- + src/cmd/go/internal/envcmd/env.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go +index afadbad..cedbfbf 100644 +--- a/src/cmd/go/internal/envcmd/env.go ++++ b/src/cmd/go/internal/envcmd/env.go +@@ -85,11 +85,11 @@ func MkEnv() []cfg.EnvVar { + + cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch) + if env := strings.Fields(os.Getenv("CC")); len(env) > 0 { +- cc = env[0] ++ cc = strings.Join(env, " ") + } + cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch) + if env := strings.Fields(os.Getenv("CXX")); len(env) > 0 { +- cxx = env[0] ++ cxx = strings.Join(env, " ") + } + env = append(env, cfg.EnvVar{Name: "CC", Value: cc}) + env = append(env, cfg.EnvVar{Name: "CXX", Value: cxx})
meta/recipes-devtools/go/go-1.12/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch new file +218 -0
218 lines not on this page · raw message
meta/recipes-devtools/go/go-1.12/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch new file +48 -0
48 lines not on this page · raw message
meta/recipes-devtools/go/go-1.12/0004-ld-add-soname-to-shareable-objects.patch new file +45 -0
45 lines not on this page · raw message
meta/recipes-devtools/go/go-1.12/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 1bf15aa8fb773604b2524cfdab493fa4d8fa9285 Mon Sep 17 00:00:00 2001 +From: Matt Madison <[email protected]> +Date: Sat, 17 Feb 2018 06:32:45 -0800 +Subject: [PATCH] make.bash: override CC when building dist and go_bootstrap + +for handling OE cross-canadian builds. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Matt Madison <[email protected]> + +--- + src/make.bash | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/make.bash b/src/make.bash +index 78882d9..25943d0 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -163,7 +163,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then + exit 1 + fi + rm -f cmd/dist/dist +-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist ++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$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) +@@ -194,7 +194,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.
meta/recipes-devtools/go/go-1.12/0006-cmd-dist-separate-host-and-target-builds.patch new file +282 -0
282 lines not on this page · raw message
meta/recipes-devtools/go/go-1.12/0007-cmd-go-make-GOROOT-precious-by-default.patch new file +106 -0
106 lines not on this page · raw message
meta/recipes-devtools/go/go-1.12/0008-use-GOBUILDMODE-to-set-buildmode.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 0e0c247f0caec23528889ff09d98348cba9028f1 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Fri, 26 Oct 2018 15:02:32 +0800 +Subject: [PATCH] use GOBUILDMODE to set buildmode + +While building go itself, the go build system does not support +to set `-buildmode=pie' from environment. + +Add GOBUILDMODE to support it which make PIE executables the default +build mode, as PIE executables are required as of Yocto + +Refers: https://groups.google.com/forum/#!topic/golang-dev/gRCe5URKewI +Upstream-Status: Denied [upstream choose antoher solution: `17a256b +cmd/go: -buildmode=pie for android/arm'] + +Signed-off-by: Hongxu Jia <[email protected]> +--- + src/cmd/go/internal/work/build.go | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +Index: go/src/cmd/go/internal/work/build.go +=================================================================== +--- go.orig/src/cmd/go/internal/work/build.go ++++ go/src/cmd/go/internal/work/build.go +@@ -223,7 +223,11 @@ func AddBuildFlags(cmd *base.Command) { + + cmd.Flag.Var(&load.BuildAsmflags, "asmflags", "") + cmd.Flag.Var(buildCompiler{}, "compiler", "") +- cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "") ++ if bm := os.Getenv("GOBUILDMODE"); bm != "" { ++ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", bm, "") ++ } else { ++ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "") ++ } + cmd.Flag.Var(&load.BuildGcflags, "gcflags", "") + cmd.Flag.Var(&load.BuildGccgoflags, "gccgoflags", "") + cmd.Flag.StringVar(&cfg.BuildMod, "mod", "", "")
meta/recipes-devtools/go/go-1.12/0009-ld-replace-glibc-dynamic-linker-with-musl.patch new file +112 -0
112 lines not on this page · raw message
meta/recipes-devtools/go/go-common.inc +0 -1
@@ -25,7 +25,6 @@ SSTATE_SCAN_CMD = "true" export GOROOT_OVERRIDE = "1" export GOTMPDIR ?= "${WORKDIR}/go-tmp" GOTMPDIR[vardepvalue] = "" -export GOCACHE = "off" export CGO_ENABLED = "1" do_compile_prepend() {
meta/recipes-devtools/go/go-cross-canadian_1.12.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-cross-canadian.inc +require go-${PV}.inc
meta/recipes-devtools/go/go-cross.inc +0 -1
@@ -14,7 +14,6 @@ export GO386 = "${TARGET_GO386}" export GOMIPS = "${TARGET_GOMIPS}" export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" export GOROOT_FINAL = "${libdir}/go" -export GOCACHE = "off" CC = "${@d.getVar('BUILD_CC').strip()}" do_configure[noexec] = "1"
meta/recipes-devtools/go/go-cross_1.12.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-cross.inc +require go-${PV}.inc
meta/recipes-devtools/go/go-crosssdk_1.12.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-crosssdk.inc +require go-${PV}.inc
meta/recipes-devtools/go/go-native_1.12.bb new file +2 -0
@@ -0,0 +1,2 @@ +require ${PN}.inc +require go-${PV}.inc
meta/recipes-devtools/go/go-runtime_1.12.bb new file +2 -0
@@ -0,0 +1,2 @@ +require go-${PV}.inc +require go-runtime.inc
meta/recipes-devtools/go/go_1.12.bb new file +14 -0
@@ -0,0 +1,14 @@ +require go-${PV}.inc +require go-target.inc + +export GOBUILDMODE="" + +# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips +# doesn't support -buildmode=pie, so skip the QA checking for mips and its +# variants. +python() { + if 'mips' in d.getVar('TARGET_ARCH'): + d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel") + else: + d.setVar('GOBUILDMODE', 'pie') +}
Signature · 1 line
2.21.0
PATCH v3 2/2 go-1.9: Drop the recipes
We now have 1.11 and 1.12
---
v2: Rebased ( no changes )
v3: Remove remaining 1.9 recipe files
meta/recipes-devtools/go/go-1.9.inc | 27 ----- .../0001-make.bash-quote-CC_FOR_TARGET.patch | 32 ----- ...d-CXX-environment-variable-construct.patch | 67 ----------- ...tter-separate-host-and-target-builds.patch | 92 --------------- ...OOLDIR-to-be-overridden-in-the-envir.patch | 68 ----------- ...d-go-make-GOROOT-precious-by-default.patch | 41 ------- ...TOOLDIR_BOOTSTRAP-environment-variab.patch | 36 ------ ...7-ld-add-soname-to-shareable-objects.patch | 46 -------- ...HOSTxx-indirection-for-cross-canadia.patch | 33 ------ ...-pie-forces-external-linking-mode-on.patch | 47 -------- ...de-CC-when-building-dist-and-go_boot.patch | 43 ------- ...011-use-GOBUILDMODE-to-set-buildmode.patch | 40 ------- .../go/go-1.9/set-external-linker.patch | 111 ------------------ .../go/go-cross-canadian_1.9.bb | 12 -- meta/recipes-devtools/go/go-cross_1.9.bb | 10 -- meta/recipes-devtools/go/go-crosssdk_1.9.bb | 11 -- meta/recipes-devtools/go/go-native_1.9.bb | 4 - meta/recipes-devtools/go/go-runtime_1.9.bb | 23 ---- meta/recipes-devtools/go/go_1.9.bb | 28 ----- 19 files changed, 771 deletions(-) delete mode 100644 meta/recipes-devtools/go/go-1.9.inc delete mode 100644 meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/0011-use-GOBUILDMODE-to-set-buildmode.patch delete mode 100644 meta/recipes-devtools/go/go-1.9/set-external-linker.patch delete mode 100644 meta/recipes-devtools/go/go-cross-canadian_1.9.bb delete mode 100644 meta/recipes-devtools/go/go-cross_1.9.bb delete mode 100644 meta/recipes-devtools/go/go-crosssdk_1.9.bb delete mode 100644 meta/recipes-devtools/go/go-native_1.9.bb delete mode 100644 meta/recipes-devtools/go/go-runtime_1.9.bb delete mode 100644 meta/recipes-devtools/go/go_1.9.bb
meta/recipes-devtools/go/go-1.9.inc deleted +0 -27
@@ -1,27 +0,0 @@ -require go-common.inc - -GO_BASEVERSION = "1.9" -GO_MINOR = ".7" -PV .= "${GO_MINOR}" - -FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" - -SRC_URI += "\ - file://0001-make.bash-quote-CC_FOR_TARGET.patch \ - file://0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch \ - file://0003-make.bash-better-separate-host-and-target-builds.patch \ - file://0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch \ - file://0005-cmd-go-make-GOROOT-precious-by-default.patch \ - file://0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch \ - file://0007-ld-add-soname-to-shareable-objects.patch \ - file://0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch \ - file://0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch \ - file://0010-make.bash-override-CC-when-building-dist-and-go_boot.patch \ - file://0011-use-GOBUILDMODE-to-set-buildmode.patch \ -" -SRC_URI_append_libc-musl = " file://set-external-linker.patch" - -SRC_URI[main.md5sum] = "3c2cf876ed6612a022574a565206c6ea" -SRC_URI[main.sha256sum] = "582814fa45e8ecb0859a208e517b48aa0ad951e3b36c7fff203d834e0ef27722"
meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From d24734ad44006791fd48fc45ea34fe608ff672fb Mon Sep 17 00:00:00 2001 -From: Matt Madison <[email protected]> -Date: Wed, 13 Sep 2017 08:04:23 -0700 -Subject: [PATCH 1/7] make.bash: quote CC_FOR_TARGET - -For OE cross-builds, $CC_FOR_TARGET has more than -one word and needs to be quoted. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <[email protected]> -Signed-off-by: Matt Madison <[email protected]> ---- - src/make.bash | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/make.bash b/src/make.bash -index 71e7531..dcf3256 100755 ---- a/src/make.bash -+++ b/src/make.bash -@@ -175,7 +175,7 @@ echo "##### Building packages and commands for $GOOS/$GOARCH." - - old_bin_files=$(cd $GOROOT/bin && echo *) - --CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd -+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd - - # Check that there are no new files in $GOROOT/bin other than go and gofmt - # and $GOOS_$GOARCH (a directory used when cross-compiling). --- -2.7.4 -
meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch deleted +0 -67
67 lines not on this page · raw message
meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch deleted +0 -92
92 lines not on this page · raw message
meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch deleted +0 -68
68 lines not on this page · raw message
meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch deleted +0 -41
41 lines not on this page · raw message
meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch deleted +0 -36
@@ -1,36 +0,0 @@ -From aae74d1045ca03306ba4159206ee3bac72bcdfbb Mon Sep 17 00:00:00 2001 -From: Matt Madison <[email protected]> -Date: Wed, 13 Sep 2017 08:23:23 -0700 -Subject: [PATCH 6/7] make.bash: add GOTOOLDIR_BOOTSTRAP environment variable - -For cross-canadian builds, we need to use the native -GOTOOLDIR during the bootstrap phase, so provide a way -to pass that setting into the build script. - -Upstream-Status: Pending - -Signed-off-by: Matt Madison <[email protected]> ---- - src/make.bash | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/make.bash b/src/make.bash -index 9553623..2e6fb05 100755 ---- a/src/make.bash -+++ b/src/make.bash -@@ -172,10 +172,11 @@ if [ "$do_host_build" = "yes" ]; then - mv cmd/dist/dist "$GOTOOLDIR"/dist - echo - -+ GOTOOLDIR_BOOTSTRAP="${GOTOOLDIR_BOOTSTRAP:-$GOTOOLDIR}" - echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." - # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, - # use the host compiler, CC, from `cmd/dist/dist env` instead. -- CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \ -+ CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOTOOLDIR="$GOTOOLDIR_BOOTSTRAP" \ - "$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd - echo - fi --- -2.7.4 -
meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch deleted +0 -46
46 lines not on this page · raw message
meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From 03e6c339d4fb712fbb8c4ca6ef2fc7100dcdb3d7 Mon Sep 17 00:00:00 2001 -From: Matt Madison <[email protected]> -Date: Thu, 14 Sep 2017 05:38:10 -0700 -Subject: [PATCH 8/8] make.bash: add GOHOSTxx indirection for cross-canadian - builds - -Add environment variables for specifying the host OS/arch -that we are building the compiler for, so it can differ from -the build host OS/arch. - -Upstream-Status: Pending - -Signed-off-by: Matt Madison <[email protected]> ---- - src/make.bash | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/make.bash b/src/make.bash -index 2e6fb05..0bdadc6 100755 ---- a/src/make.bash -+++ b/src/make.bash -@@ -173,6 +173,8 @@ if [ "$do_host_build" = "yes" ]; then - echo - - GOTOOLDIR_BOOTSTRAP="${GOTOOLDIR_BOOTSTRAP:-$GOTOOLDIR}" -+ GOHOSTOS="${GOHOSTOS_CROSS:-$GOHOSTOS}" -+ GOHOSTARCH="${GOHOSTARCH_CROSS:-$GOHOSTARCH}" - echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." - # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, - # use the host compiler, CC, from `cmd/dist/dist env` instead. --- -2.7.4 -
meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch deleted +0 -47
47 lines not on this page · raw message
meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch deleted +0 -43
43 lines not on this page · raw message
meta/recipes-devtools/go/go-1.9/0011-use-GOBUILDMODE-to-set-buildmode.patch deleted +0 -40
@@ -1,40 +0,0 @@ -From b928fafab1d9425aae9341806bd2f6178ba1da1f Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <[email protected]> -Date: Fri, 26 Oct 2018 16:32:50 +0800 -Subject: [PATCH] use GOBUILDMODE to set buildmode - -While building go itself, the go build system does not support -to set `-buildmode=pie' from environment. - -Add GOBUILDMODE to support it which make PIE executables the default -build mode, as PIE executables are required as of Yocto - -Refers: https://groups.google.com/forum/#!topic/golang-dev/gRCe5URKewI -Upstream-Status: Denied [upstream choose antoher solution: `17a256b -cmd/go: -buildmode=pie for android/arm'] - -Signed-off-by: Hongxu Jia <[email protected]> ---- - src/cmd/go/internal/work/build.go | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go -index b276de5..1683e7e 100644 ---- a/src/cmd/go/internal/work/build.go -+++ b/src/cmd/go/internal/work/build.go -@@ -211,7 +211,11 @@ func AddBuildFlags(cmd *base.Command) { - - cmd.Flag.Var((*base.StringsFlag)(&buildAsmflags), "asmflags", "") - cmd.Flag.Var(buildCompiler{}, "compiler", "") -- cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "") -+ if bm := os.Getenv("GOBUILDMODE"); bm != "" { -+ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", bm, "") -+ } else { -+ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "") -+ } - cmd.Flag.Var((*base.StringsFlag)(&buildGcflags), "gcflags", "") - cmd.Flag.Var((*base.StringsFlag)(&buildGccgoflags), "gccgoflags", "") - cmd.Flag.StringVar(&cfg.BuildContext.InstallSuffix, "installsuffix", "", "") --- -2.7.4 -
meta/recipes-devtools/go/go-1.9/set-external-linker.patch deleted +0 -111
111 lines not on this page · raw message
meta/recipes-devtools/go/go-cross-canadian_1.9.bb deleted +0 -12
@@ -1,12 +0,0 @@ -require go-cross-canadian.inc -require go-${PV}.inc - -export GOHOSTOS_CROSS = "${HOST_GOOS}" -export GOHOSTARCH_CROSS = "${HOST_GOARCH}" -export CC_FOR_TARGET = "${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}" -export CXX_FOR_TARGET = "${HOST_PREFIX}g++ --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}" - -do_compile_prepend() { - export GOBIN="${B}/bin" - export TMPDIR="$GOTMPDIR" -}
meta/recipes-devtools/go/go-cross_1.9.bb deleted +0 -10
@@ -1,10 +0,0 @@ -require go-cross.inc -require go-${PV}.inc - -export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" -export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" - -do_compile_prepend() { - export GOBIN="${B}/bin" - export TMPDIR="$GOTMPDIR" -}
meta/recipes-devtools/go/go-crosssdk_1.9.bb deleted +0 -11
@@ -1,11 +0,0 @@ -require go-crosssdk.inc -require go-${PV}.inc - -export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" -export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" -export GO_INSTALL = "cmd" - -do_compile_prepend() { - export GOBIN="${B}/bin" - export TMPDIR="$GOTMPDIR" -}
meta/recipes-devtools/go/go-native_1.9.bb deleted +0 -4
@@ -1,4 +0,0 @@ -require ${PN}.inc -require go-${PV}.inc - -GOMAKEARGS = "--host-only --no-banner"
meta/recipes-devtools/go/go-runtime_1.9.bb deleted +0 -23
@@ -1,23 +0,0 @@ -require go-${PV}.inc -require go-runtime.inc - -export GO_TARGET_INSTALL = "std" -export CC_FOR_TARGET = "${CC}" -export CXX_FOR_TARGET = "${CXX}" - -do_compile() { - export GOBIN="${B}/bin" - export TMPDIR="$GOTMPDIR" - export CC=$BUILD_CC - - cd src - CGO_CFLAGS="${BUILD_CFLAGS}" CGO_LDFLAGS="${BUILD_LDFLAGS}" ./make.bash --host-only - cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B} - rm -rf ${B}/pkg/${TARGET_GOTUPLE} - ./make.bash --target-only - if [ -n "${GO_DYNLINK}" ]; then - cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE} - GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only - fi - cd ${B} -}
meta/recipes-devtools/go/go_1.9.bb deleted +0 -28
@@ -1,28 +0,0 @@ -require go-${PV}.inc -require go-target.inc - -export GO_TARGET_INSTALL = "cmd" -export GO_FLAGS = "-a" -export CC_FOR_TARGET = "${CC}" -export CXX_FOR_TARGET = "${CXX}" -export GOBUILDMODE="" - -do_compile() { - export GOBIN="${B}/bin" - export TMPDIR="$GOTMPDIR" - export CC=$BUILD_CC - - cd src - ./make.bash - cd ${B} -} - -# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips -# doesn't support -buildmode=pie, so skip the QA checking for mips and its -# variants. -python() { - if 'mips' in d.getVar('TARGET_ARCH'): - d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel") - else: - d.setVar('GOBUILDMODE', 'pie') -}
Signature · 1 line
2.21.0