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/go: linker uses gcc even when environment variable $CC is defined to clang #5150
Labels
Milestone
Comments
I'm on 10.8.3 too. The failure is related to gcc 4.8.0, go won't work properly using gcc 4.8.0, but the point is that I've defined $CC as /opt/bin/clang, so it looks like that at some point the linker bypasses the CC environment variable. The first entry of "gcc" in my PATH points to /opt/bin/gcc, which is gcc 4.8.0. If I put /usr/bin/gcc (the one distributed by Apple) before it, all.bash passes. The version of gcc should not matter when I define the compiler to be clang. Ideally, I should be able to uninstall gcc and still comile Go with cgo support (I know that's not possible at the moment). Anyway, I don't believe this should be a Go 1.1 issue - unless you want Go 1.1 to support gcc 4.8.0 for cgo builds, but that's another issue, this one is about clang support on cgo. |
It does look like -rdynamic is not supported on the vanilla GCC for Darwin. The point of the -rdynamic option is to tell the linker to make all symbols visible to the dynamic linker. I don't know if such an option is meaningful or required on Darwin. Could you please see if everything works with https://golang.org/cl/8120043 ? Thanks. Owner changed to @ianlancetaylor. Status changed to Started. |
This issue was closed by revision 47ec6e2. 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: