mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 14:30:02 -04:00
try to use wolfssl
This commit is contained in:
parent
bb31ef120f
commit
7550e3c1ff
7 changed files with 44 additions and 38 deletions
|
@ -4,13 +4,13 @@
|
|||
|
||||
mkdir -p build
|
||||
|
||||
OPENSSL_PREFIX=$(realpath build/openssl-wasm)
|
||||
WOLFSSL_PREFIX=$(realpath build/wolfssl-wasm)
|
||||
CJSON_PREFIX=$(realpath build/cjson-wasm)
|
||||
CURL_PREFIX=$(realpath build/curl-wasm)
|
||||
ZLIB_PREFIX=$(realpath build/zlib-wasm)
|
||||
BROTLI_PREFIX=$(realpath build/brotli-wasm)
|
||||
|
||||
if [ ! -d $OPENSSL_PREFIX ]; then
|
||||
if [ ! -d $WOLFSSL_PREFIX ]; then
|
||||
tools/openssl.sh
|
||||
fi
|
||||
if [ ! -d $CJSON_PREFIX ]; then
|
||||
|
@ -26,7 +26,7 @@ if [ ! -d $CURL_PREFIX ]; then
|
|||
tools/curl.sh
|
||||
fi
|
||||
|
||||
cp -r $OPENSSL_PREFIX/* $CURL_PREFIX
|
||||
cp -r $WOLFSSL_PREFIX/* $CURL_PREFIX
|
||||
cp -r $CJSON_PREFIX/* $CURL_PREFIX
|
||||
cp -r $ZLIB_PREFIX/* $CURL_PREFIX
|
||||
cp -r $BROTLI_PREFIX/* $CURL_PREFIX
|
|
@ -7,7 +7,7 @@ set -e
|
|||
|
||||
CORE_COUNT=$(nproc --all)
|
||||
PREFIX=$(realpath build/curl-wasm)
|
||||
OPENSSL_PREFIX=$(realpath build/openssl-wasm)
|
||||
WOLFSSL_PREFIX=$(realpath build/wolfssl-wasm)
|
||||
ZLIB_PREFIX=$(realpath build/zlib-wasm)
|
||||
BROTLI_PREFIX=$(realpath build/brotli-wasm)
|
||||
|
||||
|
@ -17,14 +17,13 @@ git clone -b master --depth=1 https://github.com/curl/curl
|
|||
cd curl
|
||||
|
||||
autoreconf -fi
|
||||
emconfigure ./configure --host i686-linux --disable-shared --disable-threaded-resolver --without-libpsl --disable-netrc --disable-ipv6 --disable-tftp --disable-ntlm-wb --with-ssl=$OPENSSL_PREFIX --with-zlib=$ZLIB_PREFIX --with-brotli=$BROTLI_PREFIX
|
||||
emmake make -j$CORE_COUNT CFLAGS="-pthread" LIBS="-lbrotlicommon"
|
||||
emconfigure ./configure --host i686-linux --disable-shared --disable-threaded-resolver --without-libpsl --disable-netrc --disable-ipv6 --disable-tftp --disable-ntlm-wb --with-wolfssl=$WOLFSSL_PREFIX --with-zlib=$ZLIB_PREFIX --with-brotli=$BROTLI_PREFIX
|
||||
emmake make -j$CORE_COUNT CFLAGS="-Os -pthread" LIBS="-lbrotlicommon"
|
||||
|
||||
rm -rf $PREFIX
|
||||
mkdir -p $PREFIX/include
|
||||
mkdir -p $PREFIX/lib
|
||||
cp -r include/curl $PREFIX/include
|
||||
cp lib/.libs/libcurl.a $PREFIX/lib
|
||||
cp -r $OPENSSL_PREFIX/* $PREFIX
|
||||
|
||||
cd ../../
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
#compile openssl for use with emscripten
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
CORE_COUNT=$(nproc --all)
|
||||
PREFIX=$(realpath build/openssl-wasm)
|
||||
mkdir -p $PREFIX
|
||||
|
||||
cd build
|
||||
rm -rf openssl
|
||||
git clone -b master --depth=1 https://github.com/openssl/openssl
|
||||
cd openssl
|
||||
|
||||
emconfigure ./Configure linux-x32 --prefix=$PREFIX -no-asm -static -no-afalgeng -no-dso -DOPENSSL_SYS_NETWARE -DSIG_DFL=0 -DSIG_IGN=0 -DHAVE_FORK=0 -DOPENSSL_NO_AFALGENG=1 -DOPENSSL_NO_SPEED=1 -DOPENSSL_NO_DYNAMIC_ENGINE -DDLOPEN_FLAG=0
|
||||
sed -i 's|^CROSS_COMPILE.*$|CROSS_COMPILE=|g' Makefile
|
||||
emmake make -j$CORE_COUNT build_generated libssl.a libcrypto.a
|
||||
|
||||
rm -rf $PREFIX/include/*
|
||||
rm -rf $PREFIX/lib/*
|
||||
mkdir -p $PREFIX/include
|
||||
mkdir -p $PREFIX/lib
|
||||
cp -r include/openssl $PREFIX/include
|
||||
cp libcrypto.a libssl.a $PREFIX/lib
|
||||
|
||||
cd ../../
|
28
client/tools/wolfssl.sh
Executable file
28
client/tools/wolfssl.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
#compile wolfssl for use with emscripten
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
CORE_COUNT=$(nproc --all)
|
||||
PREFIX=$(realpath build/wolfssl-wasm)
|
||||
rm -rf $PREFIX
|
||||
mkdir -p $PREFIX
|
||||
|
||||
cd build
|
||||
rm -rf wolfssl
|
||||
git clone -b master --depth=1 https://github.com/wolfSSL/wolfssl wolfssl
|
||||
cd wolfssl
|
||||
|
||||
autoreconf -fi
|
||||
CFLAGS="-Os -DSP_WORD_SIZE=32" emconfigure ./configure --prefix=$PREFIX --enable-curl --enable-distro --enable-static --disable-shared --host=i686-linux --disable-examples
|
||||
emmake make -j$CORE_COUNT
|
||||
make install
|
||||
|
||||
rm -rf $PREFIX/bin
|
||||
rm -rf $PREFIX/share
|
||||
#rm -rf $PREFIX/lib/pkgconfig
|
||||
#rm -rf $PREFIX/lib/*.la
|
||||
|
||||
cd ../../
|
Loading…
Add table
Add a link
Reference in a new issue