-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo: support for gccgo #2313
Labels
Comments
Labels changed: added cgo, gccgo. Owner changed to @lvdlvd. |
Owner changed to builder@golang.org. |
Still missing the supprt for exports. I don't know how to do it. I think it requires cgo to have the knowledge of what symbols the Go functions will get, and use void goCallback() __asm__("the_symbol_of_the_go_callback"); in C generated code. But last time I tried i got an undefined symbol. |
It should work if you use the right symbol name. See http://tip.golang.org/doc/install/gccgo#Function_names . Don't ask about method names, but presumably you aren't going to try to call them anyhow. |
Issue #3183 has been merged into this issue. |
Now it misses: * support for global variables (issue #3183) * calling of inline functions (issue #3027) * export of methods * export of unexported functions (probably not going to happen?) |
I've also filed issue #3332 with a few more problems. |
We've got basic functionality. Dropping the remaining items out of Go 1. Labels changed: added priority-later, removed priority-go1, go1-must. Owner changed to @ianlancetaylor. |
I was trying to find a workaround for the inlined functions: http://stackoverflow.com/questions/1474030/how-can-i-tell-gcc-not-to-inline-a-function I tried this the function pointer suggestion, but I got: call of non-function C.foo_ptr Might be nice if that could work. I think it will help when wrapping the JVM API too. |
All the tests in misc/cgo pass with gccgo, so I'm going to close this. If you have specific issues using cgo with gccgo, please open a new issue. Please do not reopen this general issue. Please do not add a comment about a specific problem to this issue. Open a new issue with specific details about the problem you've encountered. Thanks. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: