Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | From 9e3dc44cdfa58d96504d0a789dc82617dd5bef55 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alex Kube <alexander.j.kube@gmail.com> |
| 3 | Date: Wed, 23 Oct 2019 21:01:13 +0430 |
| 4 | Subject: [PATCH 1/9] cmd/go: Allow CC and CXX to have multiple words |
| 5 | |
| 6 | Upstream-Status: Inappropriate [OE specific] |
| 7 | |
| 8 | Adapted to Go 1.13 from patches originally submitted to |
| 9 | the meta/recipes-devtools/go tree by |
| 10 | Matt Madison <matt@madison.systems>. |
| 11 | |
| 12 | Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> |
| 13 | |
| 14 | --- |
| 15 | src/cmd/go/internal/envcmd/env.go | 4 ++-- |
| 16 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 17 | |
| 18 | --- a/src/cmd/go/internal/envcmd/env.go |
| 19 | +++ b/src/cmd/go/internal/envcmd/env.go |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 20 | @@ -103,11 +103,11 @@ func MkEnv() []cfg.EnvVar { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | |
| 22 | cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch) |
| 23 | if env := strings.Fields(cfg.Getenv("CC")); len(env) > 0 { |
| 24 | - cc = env[0] |
| 25 | + cc = strings.Join(env, " ") |
| 26 | } |
| 27 | cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch) |
| 28 | if env := strings.Fields(cfg.Getenv("CXX")); len(env) > 0 { |
| 29 | - cxx = env[0] |
| 30 | + cxx = strings.Join(env, " ") |
| 31 | } |
| 32 | env = append(env, cfg.EnvVar{Name: "AR", Value: envOr("AR", "ar")}) |
| 33 | env = append(env, cfg.EnvVar{Name: "CC", Value: cc}) |