[Bug go/67976] Cgo + Gccgo not working like Cgo + Golang?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67976 --- Comment #7 from ian at gcc dot gnu.org --- Author: ian Date: Fri Nov 20 23:37:48 2015 New Revision: 230688 URL: https://gcc.gnu.org/viewcvs?rev=230688=gcc=rev Log: PR go/67976 Bring https://codereview.appspot.com/154360045 aka https://go-review.googlesource.com/11658 onto GCC 5 branch. cmd/cgo/out.go: fix go build -compiler gccgo with cgo exported function Fixes issue 8945 by preventing to generate _cgohack_ code when build with gccgo. The _cgohack_ was introduced in https://codereview.appspot.com/3746041 . Modified: branches/gcc-5-branch/libgo/go/cmd/cgo/out.go
[Bug go/67976] Cgo + Gccgo not working like Cgo + Golang?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67976 Ian Lance Taylor changed: What|Removed |Added Status|RESOLVED|ASSIGNED Last reconfirmed||2015-11-20 Resolution|FIXED |--- Ever confirmed|0 |1 --- Comment #6 from Ian Lance Taylor --- Actually, I'll pull the patch into GCC 5 branch too.
[Bug go/67976] Cgo + Gccgo not working like Cgo + Golang?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67976 Ian Lance Taylor changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Ian Lance Taylor --- The patch has been pulled in with the update to Go 1.5, so this should be fixed.
[Bug go/67976] Cgo + Gccgo not working like Cgo + Golang?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67976 Ian Lance Taylor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Version|6.0 |5.3.0 Resolution|--- |FIXED --- Comment #8 from Ian Lance Taylor --- Now really fixed.
[Bug go/67976] Cgo + Gccgo not working like Cgo + Golang?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67976 --- Comment #3 from Dominik Vogt --- When do you expect Go 1.5 to be merged?
[Bug go/67976] Cgo + Gccgo not working like Cgo + Golang?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67976 --- Comment #4 from Dominik Vogt --- The patch behind the link in comment 2 fixes the problem.
[Bug go/67976] Cgo + Gccgo not working like Cgo + Golang?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67976 --- Comment #1 from Dominik Vogt --- When cgo encounters the "C.foo_cgo", it determines that it must be a variable, but finds no C definition, so it generates "extern char foo_cgo[]" (out.go) as the type. This conflicts with the declaration in the comment at the beginning of the file. Replacing /* int foo_cgo(unsigned); */ with /* extern char foo_cgo[]; */ Makes this code compile for me. Is this kind of declaration supported by the cgo version from the golang repository? (If not, what would the symbol C.foo_cgo be good for).
[Bug go/67976] Cgo + Gccgo not working like Cgo + Golang?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67976 --- Comment #2 from Ian Lance Taylor --- This is probably https://golang.org/issue/8945 , which is fixed in the gc repository but not in the gccgo repository. That fix should come in when I merge in the Go 1.5 sources.