-
Notifications
You must be signed in to change notification settings - Fork 18k
gollvm: #cgo LDFLAGS repeated thrice #60287
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
Comments
Change https://go.dev/cl/496195 mentions this issue: |
When you put a That said, if there is only a I think that something along the lines of https://go.dev/cl/497117 would be a better approach. |
Change https://go.dev/cl/497117 mentions this issue: |
@ianlancetaylor Giving that you're already working on a more proper fix, do you suggest me to abandon https://go.dev/cl/496195 ? |
Yes, I don't think we want the approach in 496195. Thanks. If you want to test 497117 that would be helpful. Thanks. |
Yep, I tested it on my case, and as expected, it works flawlessly. (sorry, closed by mistake; then reopened) |
@ianlancetaylor it seems https://go-review.googlesource.com/c/go/+/497117 is in review limbo... Not sure I can help in any way to push it through? |
@andreybokhanko I think it mainly needs a test. It hasn't seemed too urgent since there isn't going to be another GCC release for months. |
BTW, it's easy enough to write a test using LLVM's lit testing machinery:
Though I guess due to presence of gccgo, this is not really suitable, right? |
Change https://go.dev/cl/511675 mentions this issue: |
They are already collected via cmd/cgo. The gccgo_link_c test is tweaked to do real linking as with this change the cgo ldflags are not fully reflected in go build -n output, since they now only come from the built archive. This is a backport of https://go.dev/cl/497117 from the main repo. For golang/go#60287 Change-Id: Ie0bf76b588724265d75dd9a96984dd6cc207f84e Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/511675 Reviewed-by: Than McIntosh <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
They are already collected via cmd/cgo. The gccgo_link_c test is tweaked to do real linking as with this change the cgo ldflags are not fully reflected in go build -n output, since they now only come from the built archive. This is a backport of https://go.dev/cl/497117 from the main repo. For golang/go#60287 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/511675
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
goapp.go building successfully.
What did you see instead?
Errors caused by #cgo LDFLAGS (/home/abokhanko/test/issue604/cpart.o) being repeated thrice in the linker's command line:
The text was updated successfully, but these errors were encountered: