Blog 2019/4/30
<- previous | index | next ->
Cross-compiling golang for an AMD Geode
Here's the script I used to cross-compile go for an old, slow i586 box (an AMD Personal Internet Communicator, 366MHz, 128MB RAM).
The resulting tarball will be named go-1.12.4-linux-386-387.tar.gz
.
To install it on the target machine:
cd /opt
cat go-1.12.4-linux-386-387.tar.gz | gunzip | tar x
ln -sf /opt/go-1.12.4/bin/linux_386/go /usr/local/bin/go
ln -sf /opt/go-1.12.4/bin/linux_386/gofmt /usr/local/bin/gofmt
There's probably a more "official" way to do this. But for now, this hack seems to work.
See also Installing Linux on the AMD Personal Internet Communicator .
EDIT: I also built an ARMv5 tarball which I'll use on an old NSLU2 (266MHz, 32MB RAM) and a few Pogoplugs.
EDIT2: I also added a mipsle
build script.
Why?
Because the stock 386 go binary distribution requires SSE support. See golang/go#35789