diff mbox series

libgo patch committed: Don't drop last flag from _cgo_flags entry in archive

Message ID CAOyqgcWW4yAqdFBkMOcaC9PjkDQgrNepUqnhB_rM-8B2ze7qhw@mail.gmail.com
State New
Headers show
Series libgo patch committed: Don't drop last flag from _cgo_flags entry in archive | expand

Commit Message

Ian Lance Taylor Feb. 5, 2018, 1:38 a.m. UTC
This libgo patch fixes cmd/go: the quoting code that read _cgo_flags,
currently only in the gccgo version of cmd/go, was losing the last
flag read from the file.  This fixes https://golang.org/issue/23666.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian
diff mbox series

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 257357)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-981e6621bcd48670d0b58e51e9eeffe549725378
+9057b8f71e6078f140938fe60be9aaa7d59a3a2b
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/cmd/go/internal/work/gccgo.go
===================================================================
--- libgo/go/cmd/go/internal/work/gccgo.go	(revision 257357)
+++ libgo/go/cmd/go/internal/work/gccgo.go	(working copy)
@@ -258,6 +258,9 @@  func (tools gccgoToolchain) link(b *Buil
 					nl = append(nl, b)
 					start = false
 				}
+				if len(nl) > 0 {
+					cgoldflags = append(cgoldflags, string(nl))
+				}
 			}
 		}
 		return nil