-
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: linux-{386,amd64}-clang and linux-arm builders failing #26197
Comments
The problem with clang is that passing |
And in fact there is code in cmd/link to handle exactly this case, but it only applies to -extldflags, not to CGO_LDFLAGS. |
Change https://golang.org/cl/122135 mentions this issue: |
Change https://golang.org/cl/122155 mentions this issue: |
We already remove -rdynamic if -static appears in -extldflags. Extend that to apply to CGO_LDFLAGS and #cgo LDFLAGS as well. Updates #26197 Change-Id: Ibb62d1b20726916a12fd889acb05c1c559a5ace2 Reviewed-on: https://go-review.googlesource.com/122135 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Any plan on support static pie executable? |
@zhangyoufu I don't think that has anything to do with this issue, which is about some failing tests. Please ask on a forum; see https://golang.org/wiki/Questions . Thanks. |
Change https://golang.org/cl/122196 mentions this issue: |
I get this build failure on arm architectures: ``` /usr/local/go/pkg/tool/linux_arm/link: running gcc failed: exit status 1 /usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/libpthread.a(pthread_create.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/libpthread.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status ``` which looks a lot like golang/go#26197 Signed-off-by: Robert Günzler <robertg@balena.io>
Appears to have been triggered by CL 89655.
linux-386-clang: https://build.golang.org/log/0bef8033f7380e36756d6ce63cdec841108010de
linux-amd64-clang: https://build.golang.org/log/c233d2a2dd1486978f0030a3aec3a656340c5aa5
linux-arm: https://build.golang.org/log/d34739a782a08aed7a8ca08f130d35a7ec2767cb
The text was updated successfully, but these errors were encountered: