зеркало из https://github.com/golang/build.git
cmd/release: set CGO_{C,LD}FLAGS if GOARM is set
So it really builds an ARMv6 binary when GOARM=6. Tried "release -rev go1.8rc2 -tools release-branch.go1.8 -version go1.8rc2 -target linux-armv6l -watch" and the generated binary works on my Raspberry Pi 1. Fixes golang/go#18748. Change-Id: I11113f98703049dc9990fe8c8abf505dcfd980f2 Reviewed-on: https://go-review.googlesource.com/35501 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Родитель
409147cbbc
Коммит
297480d104
|
@ -348,6 +348,8 @@ func (b *Build) make() error {
|
|||
|
||||
if b.Goarm > 0 {
|
||||
env = append(env, fmt.Sprintf("GOARM=%d", b.Goarm))
|
||||
env = append(env, fmt.Sprintf("CGO_CFLAGS=-march=armv%d", b.Goarm))
|
||||
env = append(env, fmt.Sprintf("CGO_LDFLAGS=-march=armv%d", b.Goarm))
|
||||
}
|
||||
|
||||
// Execute build
|
||||
|
|
Загрузка…
Ссылка в новой задаче