PR go/68255
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Nov 2015 20:31:11 +0000 (20:31 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Nov 2015 20:31:11 +0000 (20:31 +0000)
commit9620dd8255513a3ae6eb2a939a5c3027822d95e5
tree702cc02dccad395c560d2e5bcd6975a8b6be0711
parent6a69252f95194efaa8e30fad7bab9aadbaed7eeb
PR go/68255
    cmd/go: always use --whole-archive for gccgo packages

    This is a backport of https://golang.org/cl/16775.

    This is, in effect, what the gc toolchain does.  It fixes cases where Go
    code refers to a C global variable; without this, if the global variable
    was the only thing visible in the C code, the generated cgo file might
    not get pulled in from the archive, leaving the Go variable
    uninitialized.

    This was reported against gccgo as https://gcc.gnu.org/PR68255 .

    Reviewed-on: https://go-review.googlesource.com/16778

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230120 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
libgo/go/cmd/go/build.go