Denys Vlasenko | de3da6b | 2016-08-21 03:39:39 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # How to configure & build a static wolfssl library |
| 4 | # suitable for static build of ssl_helper. |
| 5 | |
| 6 | export CC="i686-gcc" |
| 7 | export CFLAGS="\ |
| 8 | -Os \ |
| 9 | -static \ |
| 10 | -fomit-frame-pointer \ |
| 11 | -falign-functions=1 -falign-labels=1 -falign-loops=1 -falign-jumps=1 \ |
| 12 | -ffunction-sections -fdata-sections \ |
| 13 | " |
| 14 | |
| 15 | { |
| 16 | |
| 17 | ./configure \ |
| 18 | --host="i686" \ |
| 19 | --enable-static \ |
| 20 | --enable-singlethreaded \ |
| 21 | --disable-shared \ |
| 22 | \ |
| 23 | C_EXTRA_FLAGS="-DWOLFSSL_STATIC_RSA" \ |
| 24 | || exit $? |
| 25 | |
| 26 | # The second group of options was added when "vanilla" config did not work. |
| 27 | # A good tool to debug problems is to try wolfssl's client tool, e.g.: |
| 28 | # examples/client/client -h www.google.com -p 443 -d -x |
| 29 | # |
| 30 | # configure has many other options, see ./configure --help |
| 31 | # --enable-ecc \ |
| 32 | # --enable-sni \ |
| 33 | # |
| 34 | # Also consult "wolfSSL - Embedded SSL Library Product Support Forums" |
| 35 | # for recent report of users having problems connecting. |
| 36 | |
| 37 | make |
| 38 | |
| 39 | } 2>&1 | tee "$0.log" |