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: go build fails with linker error when using clang v4.0.1 #21042
Comments
@OneOfOne I assume you are using the latest go1.4 bootstrap archive, i.e. go1.4-bootstrap-20170531.tar.gz. |
@ALTree I'm using the https://gist.github.com/OneOfOne/a9116d4c85c32141282fcf9a2973fbd2 edit: Note that this is a separate issue, I still can't build go with clang even with go1.8 as bootstrap. |
Ok so the clang issue is the Can you file another issue for the other problem? The fact that compiling go1.4 bootstrap fails with
on your system, even with GCC. Please include system info and the gcc version in the report. |
Wait, does this also affect go1.8? i.e. you can't build go1.8 from source with clang? EDIT: ah yes I get it now. Sorry for the misunderstanding. |
@ALTree I hadn't tried until you mentioned it, no I can't build 1.8 from source either. |
Does clang support a |
@ianlancetaylor looks like it does, but it's called |
Well, that sucks. This is not an area where we need gratuitous differences. |
CL https://golang.org/cl/49710 mentions this issue. |
CL https://golang.org/cl/49711 mentions this issue. |
Does https://golang.org/cl/49711 fix the problem? You may need 49710 too--49711 applies to Go 1.4, 49710 applies to tip. |
I can confirm it fixes the problem. |
This is a backport of https://golang.org/cl/49710 to the Go 1.4 branch. Original CL description: GCC says -no-pie, clang says -nopie. Updates #21042 Change-Id: I67b755ccb0149324098b79e07ee4bbc49429c44c Reviewed-on: https://go-review.googlesource.com/49711 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This avoids an error from clang when using -nopie during compilation, and permits us to check that the entire build succeeds. Updates #21042 Change-Id: I2e6c7d5c97a85c223ed3288622bbb58ce33b8774 Reviewed-on: https://go-review.googlesource.com/50874 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This avoids an error from clang when using -nopie during compilation, and permits us to check that the entire build succeeds. Updates #21042 Change-Id: I2e6c7d5c97a85c223ed3288622bbb58ce33b8774 Reviewed-on: https://go-review.googlesource.com/50874 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Change https://golang.org/cl/50874 mentions this issue: |
This is a backport of https://golang.org/cl/49710 to the Go 1.4 branch. Original CL description: GCC says -no-pie, clang says -nopie. Updates golang#21042 Change-Id: I67b755ccb0149324098b79e07ee4bbc49429c44c Reviewed-on: https://go-review.googlesource.com/49711 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This is a backport of https://golang.org/cl/49710 to the Go 1.4 branch. Original CL description: GCC says -no-pie, clang says -nopie. Updates golang#21042 Change-Id: I67b755ccb0149324098b79e07ee4bbc49429c44c Reviewed-on: https://go-review.googlesource.com/49711 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This is a backport of https://golang.org/cl/49710 to the Go 1.4 branch. Original CL description: GCC says -no-pie, clang says -nopie. Updates golang#21042 Change-Id: I67b755ccb0149324098b79e07ee4bbc49429c44c Reviewed-on: https://go-review.googlesource.com/49711 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This is a backport of https://golang.org/cl/49710 to the Go 1.4 branch. Original CL description: GCC says -no-pie, clang says -nopie. Updates golang#21042 Change-Id: I67b755ccb0149324098b79e07ee4bbc49429c44c Reviewed-on: https://go-review.googlesource.com/49711 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?Arch Linux 64bit
What did you do?
$ env GOROOT_BOOTSTRAP=/usr/src/go1.4 CC=clang GOGC=off bash make.bash
Note that using
CC=gcc
works fine.What did you expect to see?
Successful compile of the go toolset
What did you see instead?
The text was updated successfully, but these errors were encountered: