Created
November 28, 2021 16:49
-
-
Save alienzhou/6fa93bf30241f09612ca0e7ed2115f6e to your computer and use it in GitHub Desktop.
Creates OpenSSL as WASM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
OPENSSL="openssl-1.1.1d" | |
if [ -d ${OPENSSL} ]; then | |
rm -rf ${OPENSSL} | |
fi | |
if [ ! -f ${OPENSSL}.tar.gz ]; then | |
curl -O https://www.openssl.org/source/${OPENSSL}.tar.gz | |
fi | |
tar xf ${OPENSSL}.tar.gz | |
cd ${OPENSSL} || exit 1 | |
emconfigure ./Configure \ | |
linux-generic64 \ | |
no-asm \ | |
no-threads \ | |
no-engine \ | |
no-hw \ | |
no-weak-ssl-ciphers \ | |
no-dtls \ | |
no-shared \ | |
no-dso \ | |
--prefix=$EMSCRIPTEN/system | |
sed -i 's|^CROSS_COMPILE.*$|CROSS_COMPILE=|g' Makefile | |
sed -i '/^CFLAGS/ s/$/ -D__STDC_NO_ATOMICS__=1/' Makefile | |
sed -i '/^CXXFLAGS/ s/$/ -D__STDC_NO_ATOMICS__=1/' Makefile | |
emmake make -j 1 build_generated libssl.a libcrypto.a | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment