From 6754f91631e56bacb46eb47f83cae443e6a466d4 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 11 Jul 2022 04:25:11 +0200 Subject: build-botan: Update amalgamation files, adding blake2, ... --- scripts/build-botan.sh | 66 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 23 deletions(-) (limited to 'scripts') diff --git a/scripts/build-botan.sh b/scripts/build-botan.sh index fea95a5..045db74 100644 --- a/scripts/build-botan.sh +++ b/scripts/build-botan.sh @@ -2,19 +2,22 @@ sdir=`dirname $(readlink -f $0)` rootdir=`dirname $sdir` +bname=`basename $0 .sh` . $sdir/setup-machine-arch.sh -cd $rootdir/botan +logfile=$rootdir/$bname-$archabi.log +rm -f $logfile MOD_HW_COMMON=simd,chacha_simd32,chacha_avx2,simd_avx2 -#MOD_HW_AMD64=aes_ni,sha1_sse2,sha1_x86,sha2_32_x86,$MOD_HW_COMMON -MOD_HW_AMD64=sha1_sse2,sha1_x86,sha2_32_x86,$MOD_HW_COMMON +# Since Intel Haswell or AMD Excavator: sha2_32_bmi2,sha2_64_bmi2 +#MOD_HW_AMD64=aes_ni,sha2_32_x86,$MOD_HW_COMMON +MOD_HW_AMD64=sha2_32_x86,$MOD_HW_COMMON CFG_OPTIONS_AMD64= -#MOD_HW_ARM64=aes_armv8,sha1_armv8,sha2_32_armv8,$MOD_HW_COMMON -MOD_HW_ARM64=sha1_armv8,sha2_32_armv8,$MOD_HW_COMMON +#MOD_HW_ARM64=aes_armv8,sha2_32_armv8,$MOD_HW_COMMON +MOD_HW_ARM64=sha2_32_armv8,$MOD_HW_COMMON CFG_OPTIONS_ARM64= MOD_HW_ARM32=$MOD_HW_COMMON @@ -22,7 +25,7 @@ CFG_OPTIONS_ARM32="--disable-neon" MOD_RNG=system_rng -MOD_HASH=sha1,sha2_32 +MOD_HASH=sha2_32,sha2_64,blake2,blake2mac #MOD_CIPHER=aes,gcm,chacha,chacha20poly1305,aead,stream MOD_CIPHER=chacha,chacha20poly1305,aead,stream # MOD_COMPRESSION=lzma,bzip2 @@ -56,21 +59,38 @@ esac CXX_FLAGS= LD_FLAGS= -mkdir -p $rootdir/include/amalgamation-$archabi -rm -f $rootdir/include/amalgamation-$archabi/botan_all.h -rm -f $rootdir/include/amalgamation-$archabi/botan_all.cpp +buildit() { + echo rootdir $rootdir + echo logfile $logfile + echo CPU $USE_CPU + echo CFG_OPTIONS_THIS $CFG_OPTIONS_THIS + echo MOD_BASIC $MOD_BASIC + echo MOD_CIPHER $MOD_CIPHER + echo MOD_HASH $MOD_HASH + echo MOD_RNG $MOD_RNG + echo MOD_HW_THIS $MOD_HW_THIS + + mkdir -p $rootdir/include/amalgamation-$archabi + rm -f $rootdir/include/amalgamation-$archabi/botan_all.h + rm -f $rootdir/include/amalgamation-$archabi/botan_all.cpp + + cd $rootdir/botan + + ./configure.py --cpu=$USE_CPU $CFG_OPTIONS_THIS \ + --prefix=`pwd`/dist-$archabi-min \ + --minimized-build \ + --enable-modules=$MOD_BASIC,$MOD_CIPHER,$MOD_HASH,$MOD_RNG,$MOD_HW_THIS \ + --cxxflags=$CXX_FLAGS \ + --ldflags=$LD_FLAGS \ + --amalgamation \ + --with-doxygen \ + + # --with-lzma --with-bzip2 \ + + mv botan_all.cpp botan_all.h $rootdir/include/amalgamation-$archabi/ + cd $rootdir +} + +buildit 2>&1 | tee $logfile +cp -av $logfile $rootdir/include/amalgamation-$archabi/ -./configure.py --cpu=$USE_CPU $CFG_OPTIONS_THIS \ - --prefix=`pwd`/dist-$archabi-min \ - --minimized-build \ - --enable-modules=$MOD_BASIC,$MOD_CIPHER,$MOD_HASH,$MOD_RNG,$MOD_HW_THIS \ - --cxxflags=$CXX_FLAGS \ - --ldflags=$LD_FLAGS \ - --amalgamation \ - --with-doxygen \ - -# --with-lzma --with-bzip2 \ - -mv botan_all.cpp botan_all.h $rootdir/include/amalgamation-$archabi/ - -cd $rootdir -- cgit v1.2.3