mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
build: Pass sanitize flags to instrument libsecp256k1
code
Also a new UBSan suppression has been added.
This commit is contained in:
parent
3ba8de1b70
commit
cbea49c0d3
2 changed files with 7 additions and 2 deletions
|
@ -388,7 +388,8 @@ if test "$use_sanitizers" != ""; then
|
|||
dnl fail if a bad argument is passed, e.g. -fsanitize=undfeined
|
||||
AX_CHECK_COMPILE_FLAG(
|
||||
[-fsanitize=$use_sanitizers],
|
||||
[SANITIZER_CXXFLAGS="-fsanitize=$use_sanitizers"],
|
||||
[SANITIZER_CXXFLAGS="-fsanitize=$use_sanitizers"
|
||||
SANITIZER_CFLAGS="-fsanitize=$use_sanitizers"],
|
||||
[AC_MSG_ERROR([compiler did not accept requested flags])])
|
||||
|
||||
dnl Some compilers (e.g. GCC) require additional libraries like libasan,
|
||||
|
@ -1946,6 +1947,9 @@ CPPFLAGS_TEMP="$CPPFLAGS"
|
|||
unset CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS_TEMP"
|
||||
|
||||
if test -n "$use_sanitizers"; then
|
||||
export SECP_CFLAGS="$SECP_CFLAGS $SANITIZER_CFLAGS"
|
||||
fi
|
||||
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh"
|
||||
AC_CONFIG_SUBDIRS([src/secp256k1])
|
||||
|
||||
|
@ -2006,7 +2010,7 @@ echo " target os = $host_os"
|
|||
echo " build os = $build_os"
|
||||
echo
|
||||
echo " CC = $CC"
|
||||
echo " CFLAGS = $PTHREAD_CFLAGS $CFLAGS"
|
||||
echo " CFLAGS = $PTHREAD_CFLAGS $SANITIZER_CFLAGS $CFLAGS"
|
||||
echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPPFLAGS"
|
||||
echo " CXX = $CXX"
|
||||
echo " CXXFLAGS = $LTO_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CORE_CXXFLAGS $CXXFLAGS"
|
||||
|
|
|
@ -23,6 +23,7 @@ implicit-integer-sign-change:secp256k1/
|
|||
implicit-signed-integer-truncation:*/include/c++/
|
||||
implicit-signed-integer-truncation:leveldb/
|
||||
implicit-signed-integer-truncation:secp256k1/
|
||||
implicit-signed-integer-truncation,implicit-integer-sign-change:secp256k1_modinv64_posdivsteps_62_var
|
||||
implicit-unsigned-integer-truncation:*/include/c++/
|
||||
implicit-unsigned-integer-truncation:leveldb/
|
||||
implicit-unsigned-integer-truncation:secp256k1/
|
||||
|
|
Loading…
Add table
Reference in a new issue