occlum/demos/https_server/download_and_build_mongoose.sh
LI Qing 1304f5388d Improve Occlum GCC toolchain with new wrappers for binaries
This commit makes the toolchain easier to use in two folds:
1. When compiling C/C++ source files, no need to add "-fPIC -pie" flags manually;
2. When running executables generated by the Occlum toolchain on Linux, no
need to set the `LD_LIBRARY_PATH` manually.
2019-11-29 11:20:00 +00:00

29 lines
713 B
Bash
Executable File

#!/bin/bash
set -e
# 1. Download and install OpenSSL 1.1.1
mkdir -p deps/openssl
pushd deps/openssl
git clone https://github.com/openssl/openssl .
git checkout tags/OpenSSL_1_1_1 -b OpenSSL_1_1_1
CC=occlum-gcc ./config \
--prefix=/usr/local/occlum/x86_64-linux-musl \
--openssldir=/usr/local/occlum/ssl \
--with-rand-seed=rdcpu \
no-zlib no-async no-tests
make -j
sudo make install
popd
# 2. Download Mongoose 6.15
mkdir -p mongoose_src
pushd mongoose_src
git clone https://github.com/cesanta/mongoose .
git checkout tags/6.15 -b 6.15
popd
# 3. Build the https server example in mongoose
pushd mongoose_src/examples/simplest_web_server_ssl
CC=occlum-gcc CFLAGS_EXTRA="-Wno-format-truncation" make
popd