Commit bb21149a authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

go bootstrap should be build inside of the VM to avoid incompatibilities with the host

parent 9e2e55a6
......@@ -5,7 +5,30 @@ temporary:
chmod 600 swap
mkswap swap
swapon swap
mkdir tmp
mount --bind tmp /tmp
mkdir -p /tmp/gocache
tar xf go1.4-bootstrap-20171003.tar.gz
patch -Np1 -d go < go1.4-aarch64.patch
cd go/src && ./make.bash
mv go go1.4
tar xf go1.16.5.src.tar.gz
if [ "$(HOSTTYPE)" = "aarch64" ]; then \
cd go/src && GOROOT_BOOTSTRAP=$(CURDIR)/go1.4 GOCACHE=/tmp/gocache GOOS=linux GOARCH=arm64 GOPATH=$(CURDIR)/go ./bootstrap.bash ; \
rm -rf $(CURDIR)/go-linux-arm64-bootstrap ; \
elif [ "$(HOSTTYPE)" = "x86_64" ]; then \
ln -s /lib /lib64 ; \
cd go/src && GOROOT_BOOTSTRAP=$(CURDIR)/go1.4 GOCACHE=/tmp/gocache GOOS=linux GOARCH=amd64 GOPATH=$(CURDIR)/go CGO_CFLAGS=-mno-adx ./bootstrap.bash ; \
rm -rf /lib64 ; \
rm -rf $(CURDIR)/go-linux-amd64-bootstrap ; \
else \
cd go/src && GOROOT_BOOTSTRAP=$(CURDIR)/go1.4 GOCACHE=/tmp/gocache GOOS=linux GOARCH=arm GOPATH=$(CURDIR)/go ./bootstrap.bash ; \
rm -rf $(CURDIR)/go-linux-arm-bootstrap ; \
fi
rm -rf go1.4
rm -rf go
tar xf go1.16.5.src.tar.gz
if [ "$(HOSTTYPE)" = "aarch64" ]; then \
tar xf go-linux-arm64-bootstrap.tbz ; \
......@@ -22,6 +45,9 @@ temporary:
cd go/src && GOROOT_BOOTSTRAP=$(current_dir)go-linux-arm-bootstrap GOCACHE=/tmp/gocache ./all.bash ; \
rm -rf $(current_dir)go-linux-arm-bootstrap ; \
fi
rm -rf /tmp/gocache
umount /tmp
rm -rf tmp
swapoff swap
rm -rf swap
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment