From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20110714202130.GR1985@fangle.proxima.alt.za> References: <3c1b4360505c0dbed53b2ebdd2586270@terzarima.net> <20110712151306.GE1985@fangle.proxima.alt.za> <20110713183158.GL1985@fangle.proxima.alt.za> <20110713184525.GM1985@fangle.proxima.alt.za> <20110714202130.GR1985@fangle.proxima.alt.za> Date: Thu, 14 Jul 2011 22:37:10 -0400 Message-ID: From: Fazlul Shahriar To: lucio@proxima.alt.za, Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] Plan 9 Go (Was: GNU/Linux/Plan 9 disto) Topicbox-Message-UUID: 01623d02-ead7-11e9-9d60-3106f5b1d025 On Thu, Jul 14, 2011 at 4:21 PM, Lucio De Re 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'