]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: disable clang's integrated assembler
authorDave Cheney <dave@cheney.net>
Mon, 20 Oct 2014 23:28:39 +0000 (23:28 +0000)
committerDave Cheney <dave@cheney.net>
Mon, 20 Oct 2014 23:28:39 +0000 (23:28 +0000)
commitcf9558c8ab9a09cffeea1020e62411338c790b2f
tree8edeb6077e37055193e3173e6f8e3a2a9a598c61
parente5383c68544236bbf41628ef8a3460676e0aec2a
cmd/cgo: disable clang's integrated assembler

Fixes #8348.

Clang's internal assembler (introduced by default in clang 3.4) understands the .arch directive, but doesn't change the default value of -march. This causes the build to fail when we use BLX (armv5 and above) when clang is compiled for the default armv4t architecture (which appears to be the default on all the distros I've used).

This is probably a clang bug, so work around it for the time being by disabling the integrated assembler when compiling the cgo assembly shim.

This CL also includes a small change to ldelf.c which was required as clang 3.4 and above generate more weird symtab entries.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/156430044
src/cmd/cgo/gcc.go
src/cmd/ld/ldelf.c