From 74adf8db7f49e85eefda00a0ebcf1ad698b81948 Mon Sep 17 00:00:00 2001 From: Sam Clark <3758302+goatgoose@users.noreply.github.com> Date: Mon, 31 Jul 2023 16:46:19 -0400 Subject: [PATCH] fixes --- docs/BUILD.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/BUILD.md b/docs/BUILD.md index e845d1ed2ef..b4fdef2f655 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -1,4 +1,4 @@ -# s2n-tls Build Instructions +# Building s2n-tls ## Obtaining s2n-tls @@ -8,9 +8,9 @@ git clone https://github.com/aws/s2n-tls.git cd s2n-tls ``` -## Building s2n-tls +## Building -The following commands can be used to build s2n-tls with minimal configuration options: +s2n-tls can be built as follows:
Ubuntu @@ -80,7 +80,7 @@ s2n-tls can be configured with the following CMake options. Each option can be s - [**`CMAKE_BUILD_TYPE`**](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html): Sets the build type. Some of the possible build types are as follows: - `Release`: Produce an optimized s2n-tls library artifact with no debug info. This option should be used when building s2n-tls for use in production. - `Debug`: Produce an unoptimized library artifact with debug info. This option can be used when developing for or with s2n-tls. The debug symbols produced with this build can be used with GDB and other utilities to help with debugging. -- [**`CMAKE_INSTALL_PREFIX`**](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html): Specifies where the s2n-tls library and binary artifacts are placed when installing s2n-tls via `ninja -C build install`. +- [**`CMAKE_INSTALL_PREFIX`**](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html): Specifies where the s2n-tls library and binary artifacts are placed when installing s2n-tls. - [**`CMAKE_PREFIX_PATH`**](https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html): Specifies install locations used by CMake to search for library dependencies. This option can be used to link s2n-tls to a specific libcrypto. See the [Using a specific libcrypto](#using-a-specific-libcrypto) section for more information on building with different libcryptos. - [**`BUILD_SHARED_LIBS`**](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html): Specifies whether a static or shared s2n-tls library artifact will be produced during the build. Defaults to `OFF`, building a static library. If set to `ON`, a shared library will be produced instead. @@ -90,7 +90,7 @@ See the [s2n-tls usage guide](USAGE-GUIDE.md#consuming-s2n-tls-via-cmake) for in ## Building with a specific libcrypto -s2n-tls has a dependency on a libcrypto library. The libcrypto contains cryptographic operations used to negotiate TLS and encrypt/decrypt data. s2n-tls must be linked to a libcrypto library when building. The following libcrypto libraries are currently supported: +s2n-tls has a dependency on a libcrypto library. A supported libcrypto must be linked to s2n-tls when building. The following libcrypto libraries are currently supported: - [AWS-LC](https://github.com/aws/aws-lc) - [OpenSSL](https://github.com/openssl/openssl) (versions 1.0.2 - 3.0) - ChaChaPoly is not supported before Openssl-1.1.1. @@ -122,7 +122,7 @@ cd aws-lc # build and install aws-lc cmake -GNinja -B build -DCMAKE_INSTALL_PREFIX=./aws-lc-install -ninja -C build +ninja -C build -j $(nproc) ninja -C build run_tests ninja -C build install ``` @@ -141,7 +141,7 @@ cd aws-lc # build and install aws-lc cmake -GNinja -B build -DCMAKE_INSTALL_PREFIX=./aws-lc-install -ninja -C build +ninja -C build -j $(sysctl -n hw.ncpu) ninja -C build run_tests ninja -C build install ``` @@ -167,7 +167,7 @@ ninja -C build install ```
-The aws-lc install location specified by `CMAKE_INSTALL_PREFIX` should be set when building s2n-tls with the `CMAKE_PREFIX_PATH`. This will ensure that s2n-tls finds aws-lc when building. +The aws-lc install location specified by `CMAKE_INSTALL_PREFIX` should be set when building s2n-tls with the `CMAKE_PREFIX_PATH` option. This will ensure that s2n-tls finds aws-lc when building. For more information on building AWS-LC, see the [Building AWS-LC documentation](https://github.com/aws/aws-lc/blob/main/BUILDING.md) @@ -232,7 +232,7 @@ s2n-tls also reads this for unit tests. Try setting this environment variable be ## Cross Compiling for 32 Bit Platforms -There is an example toolchain for 32 bit cross-compiling in [`cmake/toolchains/32-bit.toolchain`](https://github.com/aws/s2n-tls/blob/main/cmake/toolchains/32-bit.toolchain). +There is an example toolchain for 32 bit cross-compiling in [`cmake/toolchains/32-bit.toolchain`](../cmake/toolchains/32-bit.toolchain). First, you will need access to a 32 bit version of libcrypto. Many linux distributions are [multi-arch](https://help.ubuntu.com/community/MultiArch) compatible which allows you to download 32 bit packages on a 64 bit platform. This can be done with the following: