author | Morten Linderud
<foxboron@archlinux.org> 2020-12-03 22:00:20 UTC |
committer | Morten Linderud
<foxboron@archlinux.org> 2020-12-03 22:00:20 UTC |
parent | bd94b727205655d72b421c5e1fe154ed08c9548c |
fix-ldflags.patch | +0 | -26 |
diff --git a/fix-ldflags.patch b/fix-ldflags.patch deleted file mode 100644 index 499fa44..0000000 --- a/fix-ldflags.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go -index 2c40a4b..157ac4c 100644 ---- a/src/cmd/go/internal/work/exec.go -+++ b/src/cmd/go/internal/work/exec.go -@@ -2883,6 +2883,21 @@ - idx = bytes.Index(src, []byte(cgoLdflag)) - } - } -+ -+ // We expect to find the contents of cgoLDFLAGS in flags. -+ if len(cgoLDFLAGS) > 0 { -+ outer: -+ for i := range flags { -+ for j, f := range cgoLDFLAGS { -+ if f != flags[i+j] { -+ continue outer -+ } -+ } -+ flags = append(flags[:i], flags[i+len(cgoLDFLAGS):]...) -+ break -+ } -+ } -+ - if err := checkLinkerFlags("LDFLAGS", "go:cgo_ldflag", flags); err != nil { - return nil, nil, err - }