aboutsummaryrefslogtreecommitdiffstats
path: root/build/bls-arm64.sh
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2018-12-28 13:15:06 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:55 +0800
commit9ca2a528ef0f3819b4921a33a3a2110d291707e0 (patch)
tree5520bb35b6de0ee1844f52f53a55c7b716955f49 /build/bls-arm64.sh
parentfe239cd01509d340d3450e0275f60f0536ec5455 (diff)
downloadgo-tangerine-9ca2a528ef0f3819b4921a33a3a2110d291707e0.tar
go-tangerine-9ca2a528ef0f3819b4921a33a3a2110d291707e0.tar.gz
go-tangerine-9ca2a528ef0f3819b4921a33a3a2110d291707e0.tar.bz2
go-tangerine-9ca2a528ef0f3819b4921a33a3a2110d291707e0.tar.lz
go-tangerine-9ca2a528ef0f3819b4921a33a3a2110d291707e0.tar.xz
go-tangerine-9ca2a528ef0f3819b4921a33a3a2110d291707e0.tar.zst
go-tangerine-9ca2a528ef0f3819b4921a33a3a2110d291707e0.zip
app: use gcp storage instead of azure for builds (#81)
* vendor: add dependencies for using GCP storage * app: use gcp storage instead of azure for builds
Diffstat (limited to 'build/bls-arm64.sh')
-rwxr-xr-xbuild/bls-arm64.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/build/bls-arm64.sh b/build/bls-arm64.sh
new file mode 100755
index 000000000..e2046dee0
--- /dev/null
+++ b/build/bls-arm64.sh
@@ -0,0 +1,43 @@
+#!/bin/bash -f
+
+cd vendor/github.com/dexon-foundation/
+
+sudo apt-get update
+
+sudo apt-get -yq --no-install-suggests --no-install-recommends --allow-downgrades --allow-remove-essential --allow-change-held-packages install gcc-aarch64-linux-gnu libc6-dev-arm64-cross g++-aarch64-linux-gnu
+
+rm -rf dep
+mkdir dep; cd dep
+
+echo 'travis_fold:start:aarch64-libgmp'
+echo 'Cross compiling libgmp for aarch64'
+mkdir libgmp; cd libgmp
+wget https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
+tar -xjf gmp-6.1.2.tar.bz2
+cd gmp-6.1.2
+./configure --host=aarch64-linux-gnu --prefix=/usr/aarch64-linux-gnu --enable-cxx
+sudo make -j8
+sudo make install
+cd ../..
+echo 'travis_fold:end:aarch64-libgmp'
+
+echo 'travis_fold:start:aarch64-openssl'
+echo 'Cross compiling OpenSSL for aarch64'
+mkdir openssl; cd openssl
+wget https://www.openssl.org/source/openssl-1.1.1a.tar.gz
+tar -xzf openssl-1.1.1a.tar.gz
+cd openssl-1.1.1a
+./Configure linux-aarch64 --prefix=/usr/aarch64-linux-gnu
+sudo make CC=aarch64-linux-gnu-gcc -j8
+sudo make install
+cd ../..
+echo 'travis_fold:end:aarch64-openssl'
+
+cd ../
+
+echo 'travis_fold:start:aarch64-bls'
+echo 'Cross compiling bls for aarch64'
+cd bls
+make -C ../mcl clean
+GMP_PREFIX=/usr/aarch64-linux-gnu/lib OPENSSL_PREFIX=/usr/aarch64-linux-gnu/lib ARCH=aarch64 CXX=aarch64-linux-gnu-g++ make clean all
+echo 'travis_fold:end:aarch64-bls'