1
0
mirror of https://github.com/golang/go synced 2024-11-23 14:10:05 -07:00
go/misc/cgo/test/gcc68255
Ian Lance Taylor 2fdff9586b cmd/go: always use --whole-archive for gccgo packages
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 .

Change-Id: I3e769dd174f64050ebbff268fbbf5e6fab1e2a1b
Reviewed-on: https://go-review.googlesource.com/16775
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-10 20:22:13 +00:00
..
a.go cmd/go: always use --whole-archive for gccgo packages 2015-11-10 20:22:13 +00:00
c.c cmd/go: always use --whole-archive for gccgo packages 2015-11-10 20:22:13 +00:00
c.h cmd/go: always use --whole-archive for gccgo packages 2015-11-10 20:22:13 +00:00