[cryptofuzz] Add target for BoringSSL i386 with assembly optimizations (#3446)

This commit is contained in:
Guido Vranken 2020-03-01 03:19:28 +01:00 committed by GitHub
parent 87c0ba8313
commit 11dfd65e95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -437,13 +437,18 @@ cp $SRC/cryptofuzz-corpora/openssl_latest.zip $OUT/cryptofuzz-openssl-noasm_seed
export CXXFLAGS="$SAVE_CXXFLAGS"
##############################################################################
if [[ $CFLAGS != *sanitize=memory* && $CFLAGS != *-m32* ]]
if [[ $CFLAGS != *sanitize=memory* ]]
then
# Compile BoringSSL (with assembly)
cd $SRC/boringssl
rm -rf build ; mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="$CXXFLAGS" -DCMAKE_C_FLAGS="$CFLAGS" -DBORINGSSL_ALLOW_CXX_RUNTIME=1 ..
if [[ $CFLAGS = *-m32* ]]
then
setarch i386 cmake -DCMAKE_CXX_FLAGS="$CXXFLAGS" -DCMAKE_C_FLAGS="$CFLAGS" -DBORINGSSL_ALLOW_CXX_RUNTIME=1 -DCMAKE_ASM_FLAGS="-m32" ..
else
cmake -DCMAKE_CXX_FLAGS="$CXXFLAGS" -DCMAKE_C_FLAGS="$CFLAGS" -DBORINGSSL_ALLOW_CXX_RUNTIME=1 ..
fi
make -j$(nproc) crypto >/dev/null 2>&1
# Compile Cryptofuzz BoringSSL (with assembly) module