Build curl with boringssl

build boringssl

$HOME/src is where I put the code in this example. You can pick wherever you
like.

  1. $ cd $HOME/src
  2. $ git clone https://boringssl.googlesource.com/boringssl
  3. $ cd boringssl
  4. $ mkdir build
  5. $ cd build
  6. $ cmake ..
  7. $ make

set up the build tree to get detected by curl’s configure

In the boringssl source tree root, make sure there’s a lib and an include
dir. The lib dir should contain the two libs (I made them symlinks into the
build dir). The include dir is already present by default. Make and populate
lib like this (commands issued in the source tree root, not in the build/
subdirectory).

  1. $ mkdir lib
  2. $ cd lib
  3. $ ln -s ../build/ssl/libssl.a
  4. $ ln -s ../build/crypoto/libcrypto.a

configure curl

LIBS=-lpthread ./configure --with-ssl=$HOME/src/boringssl (where I point out
the root of the boringssl tree)

Verify that at the end of the configuration, it says it detected
BoringSSL to be used.

build curl

Run make in the curl source tree.

Now you can install curl normally with make install etc.