-
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/go: TestCgoConsistentResults fails on s390x with gcc 6 #16780
Comments
The difference in the files is because the build path is ending up in the symbol table of the _all.o files:
(confirmed by diffing xxd output that this is the only difference). Probably a gcc issue? Paging @ianlancetaylor |
That was supposed to have been fixed by the change to cmd/link in https://golang.org/cl/19363. I don't know why there would be anything s390x specific here. Can you show the diff with readelf -s --wide? (Always use --wide with readelf, I consider the fact that --wide is not the default to be a bug in readelf.) |
Heh, I have readelf aliased to readelf --wide locally, which means I tend to forget it on remote machines...
I agree it's deeply odd that this only happens on s390x (and only with gcc 6). It could be a problem in the set up of the gcc-6 package in Ubuntu I guess. |
So the CL @ianlancetaylor referenced has a hint to what is going on here:
What has changed between gcc-5 and gcc-6 (and apparently only on s390x) is that gcc no longer adds a file symbol when compiling a file:
I don't know if this counts as a gcc bug or something we should be trying to work around or what. I'll ask doko I guess. |
It's because the function |
This has now been fixed in gcc tip, nothing to do in Go, so closing. |
Please answer these questions before submitting your issue. Thanks!
go version
)?go version devel +17eee31 Wed Aug 17 23:28:20 2016 +0000 linux/s390x
but it happens with 1.7 too (see https://launchpadlibrarian.net/279519590/buildlog_ubuntu-yakkety-s390x.golang-1.7_1.7-2ubuntu1_BUILDING.txt.gz)
go env
)?Ubuntu 16.10, s390x
go test cmd/go -run TestCgoConsistentResults
ok cmd/go 2.538s
It passes if I set CC=gcc-5.
The text was updated successfully, but these errors were encountered: