From 79654fc6a1b0767a478b115fba93a2ee914c95a7 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Mon, 2 May 2016 13:53:27 -0400 Subject: go: add go-cross 1.6 Introduce the 1.6 go release, and port patches to apply to this version. Existing versions (1.5) are not removed, so this is not a forced update. Signed-off-by: Bruce Ashfield --- .../go-cross/go-1.6/fix-cc-handling.patch | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch (limited to 'recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch') diff --git a/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch b/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch new file mode 100644 index 00000000..85770a93 --- /dev/null +++ b/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch @@ -0,0 +1,46 @@ +Index: go/src/cmd/go/build.go +=================================================================== +--- go.orig/src/cmd/go/build.go 2015-07-29 14:48:40.323185807 -0700 ++++ go/src/cmd/go/build.go 2015-07-30 07:37:40.529818586 -0700 +@@ -2805,12 +2805,24 @@ + return b.ccompilerCmd("CC", defaultCC, objdir) + } + ++// gccCmd returns a gcc command line prefix ++// defaultCC is defined in zdefaultcc.go, written by cmd/dist. ++func (b *builder) gccCmdForReal() []string { ++ return envList("CC", defaultCC) ++} ++ + // gxxCmd returns a g++ command line prefix + // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. + func (b *builder) gxxCmd(objdir string) []string { + return b.ccompilerCmd("CXX", defaultCXX, objdir) + } + ++// gxxCmd returns a g++ command line prefix ++// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. ++func (b *builder) gxxCmdForReal() []string { ++ return envList("CXX", defaultCXX) ++} ++ + // ccompilerCmd returns a command line prefix for the given environment + // variable and using the default command when the variable is empty. + func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string { +Index: go/src/cmd/go/env.go +=================================================================== +--- go.orig/src/cmd/go/env.go 2015-07-29 14:48:40.323185807 -0700 ++++ go/src/cmd/go/env.go 2015-07-30 07:40:54.461655721 -0700 +@@ -52,10 +52,9 @@ + + if goos != "plan9" { + cmd := b.gccCmd(".") +- env = append(env, envVar{"CC", cmd[0]}) ++ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")}) + env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) +- cmd = b.gxxCmd(".") +- env = append(env, envVar{"CXX", cmd[0]}) ++ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")}) + } + + if buildContext.CgoEnabled { -- cgit v1.2.3-54-g00ecf