diff --git a/bolt-contracts/script/pubkey_to_g1_wrapper.sh b/bolt-contracts/script/pubkey_to_g1_wrapper.sh index 62e53846f..260304707 100755 --- a/bolt-contracts/script/pubkey_to_g1_wrapper.sh +++ b/bolt-contracts/script/pubkey_to_g1_wrapper.sh @@ -1,6 +1,15 @@ #!/bin/bash -# Only works on Linux +# Notes on cross-compiling the binaries: +# +# Linux for arm64: +# - sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu +# - GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 go build -o pubkey_to_g1-linux-arm64 +# +# MacOS for amd64: +# - GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -o pubkey_to_g1-darwin-amd64 + + arch=$(uname -i 2>/dev/null) || arch=$(uname -p) if [[ $OSTYPE == linux* ]]; then if [[ $arch == x86_64 ]]; then