cmd/link: add -libgcc option
An internal link may need the C compiler support library, libgcc.a. Add a -libgcc option to set the name of the compiler support library. If -libgcc is not used, run the compiler to find it. Permit -libgcc=none to skip using libgcc at all and hope for the best. Change cmd/dist to not copy libgcc into the distribution. Add tests to ensure that all the standard packages that use cgo can be linked in internal mode without using libgcc. This ensures that somebody with a Go installation without a C compiler can build programs. Change-Id: I8ba35fb87ab0dd20e5cc0166b5f4145b04ce52a4 Reviewed-on: https://go-review.googlesource.com/16993Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
Showing
Please
register
or
sign in
to comment