diff options
| author | Zongchun Yu <zongchun.yu@nxp.com> | 2016-04-05 17:54:28 +0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-04-19 15:51:10 -0400 |
| commit | 12c601cd2df52ad123b337647eeb990f46422a25 (patch) | |
| tree | 9fd33cda1e85643fe6baa408ccb67bd0b4c166b4 /recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch | |
| parent | 841dc6f3a2a77bda2a1cd2bb7bcd6f3e709699db (diff) | |
| download | meta-virtualization-12c601cd2df52ad123b337647eeb990f46422a25.tar.gz | |
go-cross: uprev to 1.5.2
* Add go-native as build bootstrap for go-cross.
* Upgrade go-cross to v1.5.2
Signed-off-by: Zongchun Yu <zongchun.yu@nxp.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch')
| -rw-r--r-- | recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch b/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch new file mode 100644 index 00000000..85770a93 --- /dev/null +++ b/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | Index: go/src/cmd/go/build.go | ||
| 2 | =================================================================== | ||
| 3 | --- go.orig/src/cmd/go/build.go 2015-07-29 14:48:40.323185807 -0700 | ||
| 4 | +++ go/src/cmd/go/build.go 2015-07-30 07:37:40.529818586 -0700 | ||
| 5 | @@ -2805,12 +2805,24 @@ | ||
| 6 | return b.ccompilerCmd("CC", defaultCC, objdir) | ||
| 7 | } | ||
| 8 | |||
| 9 | +// gccCmd returns a gcc command line prefix | ||
| 10 | +// defaultCC is defined in zdefaultcc.go, written by cmd/dist. | ||
| 11 | +func (b *builder) gccCmdForReal() []string { | ||
| 12 | + return envList("CC", defaultCC) | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | // gxxCmd returns a g++ command line prefix | ||
| 16 | // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. | ||
| 17 | func (b *builder) gxxCmd(objdir string) []string { | ||
| 18 | return b.ccompilerCmd("CXX", defaultCXX, objdir) | ||
| 19 | } | ||
| 20 | |||
| 21 | +// gxxCmd returns a g++ command line prefix | ||
| 22 | +// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. | ||
| 23 | +func (b *builder) gxxCmdForReal() []string { | ||
| 24 | + return envList("CXX", defaultCXX) | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | // ccompilerCmd returns a command line prefix for the given environment | ||
| 28 | // variable and using the default command when the variable is empty. | ||
| 29 | func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string { | ||
| 30 | Index: go/src/cmd/go/env.go | ||
| 31 | =================================================================== | ||
| 32 | --- go.orig/src/cmd/go/env.go 2015-07-29 14:48:40.323185807 -0700 | ||
| 33 | +++ go/src/cmd/go/env.go 2015-07-30 07:40:54.461655721 -0700 | ||
| 34 | @@ -52,10 +52,9 @@ | ||
| 35 | |||
| 36 | if goos != "plan9" { | ||
| 37 | cmd := b.gccCmd(".") | ||
| 38 | - env = append(env, envVar{"CC", cmd[0]}) | ||
| 39 | + env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")}) | ||
| 40 | env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) | ||
| 41 | - cmd = b.gxxCmd(".") | ||
| 42 | - env = append(env, envVar{"CXX", cmd[0]}) | ||
| 43 | + env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")}) | ||
| 44 | } | ||
| 45 | |||
| 46 | if buildContext.CgoEnabled { | ||
