0001-allow-CC-and-CXX-to-have-multiple-words.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. Upstream-Status: Inappropriate [OE specific]
  6. Adapted to Go 1.13 from patches originally submitted to
  7. the meta/recipes-devtools/go tree by
  8. Matt Madison <matt@madison.systems>.
  9. Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
  10. ---
  11. src/cmd/go/internal/envcmd/env.go | 4 ++--
  12. 1 file changed, 2 insertions(+), 2 deletions(-)
  13. diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
  14. index 17852de..7b5ec5e 100644
  15. --- a/src/cmd/go/internal/envcmd/env.go
  16. +++ b/src/cmd/go/internal/envcmd/env.go
  17. @@ -100,11 +100,11 @@ func MkEnv() []cfg.EnvVar {
  18. cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch)
  19. if env := strings.Fields(cfg.Getenv("CC")); len(env) > 0 {
  20. - cc = env[0]
  21. + cc = strings.Join(env, " ")
  22. }
  23. cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch)
  24. if env := strings.Fields(cfg.Getenv("CXX")); len(env) > 0 {
  25. - cxx = env[0]
  26. + cxx = strings.Join(env, " ")
  27. }
  28. env = append(env, cfg.EnvVar{Name: "AR", Value: envOr("AR", "ar")})
  29. env = append(env, cfg.EnvVar{Name: "CC", Value: cc})
  30. --
  31. 2.17.1 (Apple Git-112)