aboutsummaryrefslogtreecommitdiffstats
path: root/packer
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-07-09 19:59:48 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-07-09 20:00:50 +0200
commit27db8f808860f7cfdec35a37bc17ae795ef59f69 (patch)
treeda7cafadfc02f5606eddaf31220cdf5827c3f7a7 /packer
parent6bda5cd4e1a95a6040356c41c947075c7319cde5 (diff)
Crossbuild std go libraries for MacOS and Windows
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>
Diffstat (limited to 'packer')
-rw-r--r--packer/provision/agl_dependencies.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/packer/provision/agl_dependencies.sh b/packer/provision/agl_dependencies.sh
index 148e65ee..cac5d31f 100644
--- a/packer/provision/agl_dependencies.sh
+++ b/packer/provision/agl_dependencies.sh
@@ -6,7 +6,7 @@ set -x
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
@@ -120,4 +120,8 @@ EOF"
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