Installing BoringSSL
- Download the BoringSSL source code.
1 2 3 4 5
cd /home git config --global http.sslVerify false git clone https://github.com/google/boringssl.git cd boringssl git checkout 6a7184066f6bf0e1d18b5ec38879dac28806aa07
- Set the environment variables.
- Open the /etc/profile file.
1vim /etc/profile - Press i to enter the insert mode and add the following content to the file:
export BORINGSSL_HOME=/home/boringssl
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the new environment variables take effect.
1source /etc/profile
- Open the /etc/profile file.
- If the system architecture is AArch64, perform this step.
1 2
mkdir build64 cd build64
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_ASM_FLAGS=-Wa,--noexecstack \ -GNinja ..

1ninja

If an error is reported when you run CMake:

run the following command:
yum -y install libunwind*
If you need to build a 32-bit version, refer to this section.
1 2
mkdir build32 cd build32
1 2 3 4 5
cmake -DCMAKE_TOOLCHAIN_FILE=../util/32-bit-toolchain.cmake \ -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_ASM_FLAGS="-Wa,--noexecstack -m32 -msse2" \ -GNinja ..
1ninja
Parent topic: Configuring the Compilation Environment