On Thu, Jul 14, 2011 at 4:21 PM, Lucio De Re <lu...@proxima.alt.za> wrote:
> It is possible to cross-compile Go on Linux for Plan 9, the details are
> a bit vague and I, for one, would not mind somebody rehashing them here
> or providing a pointer to them.

I have a script shown below that I source. Then, running ./make.bash
in $GOROOT/src will build and install everything. You can also build
tests using the host system's gotest (run with -c flag). I'm disabling
hg because codereview might attempt to run Plan 9's gofmt, etc, which
won't work and mess up your CL. More details about the environment
variables are here: http://golang.org/doc/install.html#environment

export GOROOT=/s/9vx/go
export GOOS=plan9
export GOARCH=386
export GOHOSTOS=linux
export GOHOSTARCH=386
export GOBIN=$GOROOT/bin
export 
PATH=$GOROOT/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/games:$PLAN9/bin
export PS1="goplan9; "
alias goplan9=:
alias gotest=$HOME/go/bin/gotest
alias gofmt=$HOME/go/bin/gofmt
alias hg='echo this is a cross-compile env'

Reply via email to