mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
26 lines
692 B
Diff
26 lines
692 B
Diff
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
|
|
}
|