| 1 | #!/bin/bash |
| 2 | # Builds openssl from source so we can statically link to it |
| 3 | |
| 4 | # this is to avoid the error we get with the system installation: |
| 5 | # /usr/bin/ld: <library>: version node not found for symbol SSLeay@@OPENSSL_1.0.1 |
| 6 | # /usr/bin/ld: failed to set dynamic section sizes: Bad value |
| 7 | set -e |
| 8 | |
| 9 | git clone -b OpenSSL_1_1_1v \ |
| 10 | --single-branch \ |
| 11 | https://github.com/openssl/openssl.git |
| 12 | |
| 13 | pushd openssl |
| 14 | |
| 15 | if [[ $1 == x86_64* ]]; then |
| 16 | ARCH=linux-x86_64 |
| 17 | else |
| 18 | # gnu target |
| 19 | ARCH=linux-aarch64 |
| 20 | fi |
| 21 | |
| 22 | ./Configure no-shared $ARCH |
| 23 | |
| 24 | make |
| 25 | |
| 26 | make install |