• Ian Lance Taylor's avatar
    cmd/link: add -libgcc option · 8d2f60f8
    Ian Lance Taylor authored
    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: 's avatarRuss Cox <rsc@golang.org>
    Reviewed-by: 's avatarMinux Ma <minux@golang.org>
    8d2f60f8
ar.go 4.85 KB