Standard go librairies must be compiled at least once to be able to
build go code for other OSes.
Note that you must be root in order to write resulting static
libraries into /usr/lib/go-X.Y/pkg/windows_amd64 and
/usr/lib/go-X.Y/pkg/darwin_amd64
Change-Id: Icdf09f627ad2c5c1bbf1b42fb8c92f9d9e65469d
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
sudo su -c "echo 'deb http://ftp.debian.org/debian jessie-backports main' >> /etc/apt/sources.list"
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 8B48AD6246925553
-# go
+# go
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com F6BC817356A3D45E
cat /etc/apt/sources.list
sudo apt-get update
sudo apt-get install golang-go
+# Crossbuild standard go libraries for MacOS and Windows
+sudo GOOS=darwin GOARCH=amd64 go install -v -a std
+sudo GOOS=windows GOARCH=amd64 go install -v -a std
+
exit 0