diff options
| author | Max Ostapenko <m.ostapenko@partner.samsung.com> | 2015-10-21 10:32:45 +0300 |
|---|---|---|
| committer | Maxim Ostapenko <chefmax@gcc.gnu.org> | 2015-10-21 10:32:45 +0300 |
| commit | 696d846a56cc12549f080c6c87e6a0272bdb29f1 (patch) | |
| tree | 2bdaf703dd35e1806b59bd7d74c7eee290a1054f /libsanitizer/configure | |
| parent | 013a8899f5d9469a835cf1f6ccb1b29f69344959 (diff) | |
libsanitizer merge from upstream r250806.
libsanitizer/
2015-10-20 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
* All source files: Merge from upstream r250806.
* configure.ac (link_sanitizer_common): Add -lrt flag.
* configure.tgt: Enable TSAN and LSAN for aarch64-linux targets.
Set CXX_ABI_NEEDED=true for darwin.
* asan/Makefile.am (asan_files): Add new files.
(DEFS): Add DCAN_SANITIZE_UB=0 and remove unused and legacy
DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0.
* asan/Makefile.in: Regenerate.
* ubsan/Makefile.am (ubsan_files): Add new files.
(DEFS): Add DCAN_SANITIZE_UB=1.
(libubsan_la_LIBADD): Add -lc++abi if CXX_ABI_NEEDED is true.
* ubsan/Makefile.in: Regenerate.
* tsan/Makefile.am (tsan_files): Add new files.
(DEFS): Add DCAN_SANITIZE_UB=0.
* tsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.am (sanitizer_common_files): Add new files.
* sanitizer_common/Makefile.in: Regenerate.
* asan/libtool-version: Bump the libasan SONAME.
From-SVN: r229111
Diffstat (limited to 'libsanitizer/configure')
| -rwxr-xr-x | libsanitizer/configure | 73 |
1 files changed, 19 insertions, 54 deletions
diff --git a/libsanitizer/configure b/libsanitizer/configure index 809f0d76bd3..80655f05e97 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -616,6 +616,8 @@ BACKTRACE_SUPPORTED FORMAT_FILE SANITIZER_SUPPORTED_FALSE SANITIZER_SUPPORTED_TRUE +USE_CXX_ABI_FLAG_FALSE +USE_CXX_ABI_FLAG_TRUE USING_MAC_INTERPOSE_FALSE USING_MAC_INTERPOSE_TRUE link_liblsan @@ -12027,7 +12029,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12030 "configure" +#line 12032 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12133,7 +12135,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12136 "configure" +#line 12138 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15514,7 +15516,7 @@ done # Common libraries that we need to link against for all sanitizer libs. -link_sanitizer_common='-lpthread -ldl -lm' +link_sanitizer_common='-lrt -lpthread -ldl -lm' # Set up the set of additional libraries that we need to link against for libasan. link_libasan=$link_sanitizer_common @@ -15532,58 +15534,9 @@ link_libubsan=$link_sanitizer_common link_liblsan=$link_sanitizer_common -# At least for glibc, clock_gettime is in librt. But don't pull that -# in if it still doesn't give us the function we want. This -# test is copied from libgomp. -if test $ac_cv_func_clock_gettime = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -$as_echo_n "checking for clock_gettime in -lrt... " >&6; } -if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rt_clock_gettime=yes -else - ac_cv_lib_rt_clock_gettime=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then : - link_libasan="-lrt $link_libasan" -link_libtsan="-lrt $link_libtsan" -# Other sanitizers do not override clock_* API - -fi - -fi - case "$host" in - *-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ;; - *) MAC_INTERPOSE=false ;; + *-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ; CXX_ABI_NEEDED=true ;; + *) MAC_INTERPOSE=false ; CXX_ABI_NEEDED=false ;; esac if $MAC_INTERPOSE; then USING_MAC_INTERPOSE_TRUE= @@ -15593,6 +15546,14 @@ else USING_MAC_INTERPOSE_FALSE= fi + if $CXX_ABI_NEEDED; then + USE_CXX_ABI_FLAG_TRUE= + USE_CXX_ABI_FLAG_FALSE='#' +else + USE_CXX_ABI_FLAG_TRUE='#' + USE_CXX_ABI_FLAG_FALSE= +fi + backtrace_supported=yes @@ -16550,6 +16511,10 @@ if test -z "${USING_MAC_INTERPOSE_TRUE}" && test -z "${USING_MAC_INTERPOSE_FALSE as_fn_error "conditional \"USING_MAC_INTERPOSE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${USE_CXX_ABI_FLAG_TRUE}" && test -z "${USE_CXX_ABI_FLAG_FALSE}"; then + as_fn_error "conditional \"USE_CXX_ABI_FLAG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${SANITIZER_SUPPORTED_TRUE}" && test -z "${SANITIZER_SUPPORTED_FALSE}"; then as_fn_error "conditional \"SANITIZER_SUPPORTED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
