Ⅰ 如何在cygwin上編譯golang
基本步驟如下:
1、安裝hg
$ wget http://peak.telecommunity.com/dist/ez_setup.py
$ Python ez_setup.py
$ easy_install -U mercurial
2、下載代碼
hg clone https://golang-on-cygwin.googlecode.com/hg/ golang-on-cygwin
3、准備編譯
vi /etc/profile
GOOS=linux
GOARCH=386(目前不支持amd64)
GOROOT=
GOBIN=
注意GOBIN必須存在
另外在$GOROOT/pkg/linu_386必須存在
還有,需要把/src/cmd/gc/mkbuiltin刪除後重新建一個