Red de conocimiento informático - Material del sitio web - Cómo compilar golang en cygwin

Cómo compilar golang en cygwin

Los pasos básicos son los siguientes:

1. Instale hg

$ wget munity.com/dist/ez_setup.py

$ Python ez_setup.py

$ easy_install -U mercurial

2. Descargar código

hg clone /hg/ golang-on-cygwin

3.

vi /etc/profile

GOOS=linux

GOARCH=386 (amd64 no es compatible actualmente)

GOROOT=

GOBIN=

Tenga en cuenta que GOBIN debe existir

Además, también debe existir en $GOROOT/pkg/linu_386

Además, necesitas eliminar /src/cmd/gc/mkbuiltin y reconstruirlo

.