From 11dfd65e955950b01b130adc2df786c9ac215e70 Mon Sep 17 00:00:00 2001 From: Guido Vranken Date: Sun, 1 Mar 2020 03:19:28 +0100 Subject: [PATCH] [cryptofuzz] Add target for BoringSSL i386 with assembly optimizations (#3446) --- projects/cryptofuzz/build.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/cryptofuzz/build.sh b/projects/cryptofuzz/build.sh index f2c05016d..053ff4c47 100755 --- a/projects/cryptofuzz/build.sh +++ b/projects/cryptofuzz/build.sh @@ -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