summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/go/go-1.18.inc1
-rw-r--r--meta/recipes-devtools/go/go-1.18/0008-use-GOBUILDMODE-to-set-buildmode.patch42
-rw-r--r--meta/recipes-devtools/go/go_1.18.bb1
3 files changed, 0 insertions, 44 deletions
diff --git a/meta/recipes-devtools/go/go-1.18.inc b/meta/recipes-devtools/go/go-1.18.inc
index 99ce70b346..54e241af10 100644
--- a/meta/recipes-devtools/go/go-1.18.inc
+++ b/meta/recipes-devtools/go/go-1.18.inc
@@ -11,7 +11,6 @@ SRC_URI += "\
11 file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \ 11 file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \
12 file://0006-cmd-dist-separate-host-and-target-builds.patch \ 12 file://0006-cmd-dist-separate-host-and-target-builds.patch \
13 file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ 13 file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
14 file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
15 file://0001-exec.go-do-not-write-linker-flags-into-buildids.patch \ 14 file://0001-exec.go-do-not-write-linker-flags-into-buildids.patch \
16 file://0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \ 15 file://0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \
17" 16"
diff --git a/meta/recipes-devtools/go/go-1.18/0008-use-GOBUILDMODE-to-set-buildmode.patch b/meta/recipes-devtools/go/go-1.18/0008-use-GOBUILDMODE-to-set-buildmode.patch
deleted file mode 100644
index 0ede623af9..0000000000
--- a/meta/recipes-devtools/go/go-1.18/0008-use-GOBUILDMODE-to-set-buildmode.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From 971b5626339ce0c4d57f9721c9a81af566c5a044 Mon Sep 17 00:00:00 2001
2From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:19:26 +0430
4Subject: [PATCH 8/9] cmd/go: Use GOBUILDMODE to set buildmode
5
6Upstream-Status: Denied [upstream choose antoher solution: `17a256b
7cmd/go: -buildmode=pie for android/arm']
8
9While building go itself, the go build system does not support
10to set `-buildmode=pie' from environment.
11
12Add GOBUILDMODE to support it which make PIE executables the default
13build mode, as PIE executables are required as of Yocto
14
15Refers: https://groups.google.com/forum/#!topic/golang-dev/gRCe5URKewI
16
17Adapted to Go 1.13 from patches originally submitted to
18the meta/recipes-devtools/go tree by
19Hongxu Jia <hongxu.jia@windriver.com>
20
21Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
22---
23 src/cmd/go/internal/work/build.go | 8 +++++++-
24 1 file changed, 7 insertions(+), 1 deletion(-)
25
26--- a/src/cmd/go/internal/work/build.go
27+++ b/src/cmd/go/internal/work/build.go
28@@ -283,7 +283,13 @@ func AddBuildFlags(cmd *base.Command, ma
29
30 cmd.Flag.Var(&load.BuildAsmflags, "asmflags", "")
31 cmd.Flag.Var(buildCompiler{}, "compiler", "")
32- cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "")
33+
34+ if bm := os.Getenv("GOBUILDMODE"); bm != "" {
35+ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", bm, "")
36+ } else {
37+ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "")
38+ }
39+
40 cmd.Flag.Var(&load.BuildGcflags, "gcflags", "")
41 cmd.Flag.Var(&load.BuildGccgoflags, "gccgoflags", "")
42 if mask&OmitModFlag == 0 {
diff --git a/meta/recipes-devtools/go/go_1.18.bb b/meta/recipes-devtools/go/go_1.18.bb
index 34dc89bb0c..a492d7e64a 100644
--- a/meta/recipes-devtools/go/go_1.18.bb
+++ b/meta/recipes-devtools/go/go_1.18.bb
@@ -3,7 +3,6 @@ require go-target.inc
3 3
4inherit linuxloader 4inherit linuxloader
5 5
6export GOBUILDMODE=""
7export GO_LDSO = "${@get_linuxloader(d)}" 6export GO_LDSO = "${@get_linuxloader(d)}"
8export CC_FOR_TARGET = "gcc" 7export CC_FOR_TARGET = "gcc"
9export CXX_FOR_TARGET = "g++" 8export CXX_FOR_TARGET = "g++"