Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
cmd/link: incorrect header flags for arm hard-float/soft-float #7094
Comments
gopherbot
commented
Jan 10, 2014
|
Comment 1 by james.page@canonical.com: Link to example failed build: https://launchpadlibrarian.net/144994901/buildlog_ubuntu-saucy-armhf.golang_2%3A1.1.1-3_FAILEDTOBUILD.txt.gz |
gopherbot
commented
Jan 10, 2014
|
Comment 2 by james.page@canonical.com: Patch to fixup headers (from Adam Conrad) Attachments:
|
the issue is easy, but the fix is not. We can't rely on host configuration to set the binary headers ABI flags (as the patch in #2 did). How can we get to know which ABI flag to use for each binary? We probably should discover that by looking at intermediate cgo outputs. another easy solution will be to disable internal linker entirely for cgo on Linux/ARM. Labels changed: added release-go1.3, repo-main. Status changed to Accepted. |
gopherbot
added
accepted
labels
May 9, 2014
rsc
added this to the Unplanned milestone
Apr 10, 2015
rsc
removed
release-none
labels
Apr 10, 2015
rsc
changed the title from
cmd/ld: incorrect header flags for arm hard-float/soft-float
to
cmd/link: incorrect header flags for arm hard-float/soft-float
Jun 8, 2015
|
Looking at the cgo intermediate outputs sounds sensible but doesn't actually work in practice because gcc does not set the correct flags. Looking for eabihf in the output of $CC -dumpmachine is the cleanest "correct" fix I can think of. For distro package builds, I think always using the external linker for cgo would be fine (although for Ubuntu specifically we could just set the flag to armhf unconditionally as we only build for that these days...) |
|
Can someone assign this to me please? |
davecheney
assigned
mwhudson
Sep 10, 2015
|
I think we still want to preserve the ability to link trivial
cgo programs using internal linking.
By trivial, I mean Go programs that only uses net, or
os/user, but don't by themselves use cgo.
|
|
You mean a system which has a binary go install but no C compiler? Makes sense -- maybe the value of $CC -dumpmachine should be recorded by cgo rather than inspected by the linker? |
added a commit
to mwhudson/go
that referenced
this issue
Sep 23, 2015
gopherbot
commented
Sep 23, 2015
|
CL https://golang.org/cl/14860 mentions this issue. |
gopherbot commentedJan 10, 2014
by james.page@canonical.com: