diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-11-22 22:13:08 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-11-22 22:13:08 +0100 |
commit | 9065ada9b5fa30d47ec723fbfbbeaad1082035cb (patch) | |
tree | 1e351f73c04f7b8ee40bc54557ac53f5b8b0aa2a /libsanitizer/configure | |
parent | 2e5189c83a2b2c6f3fff04f9d8f6c1b1a869b915 (diff) | |
download | gcc-9065ada9b5fa30d47ec723fbfbbeaad1082035cb.zip gcc-9065ada9b5fa30d47ec723fbfbbeaad1082035cb.tar.gz gcc-9065ada9b5fa30d47ec723fbfbbeaad1082035cb.tar.bz2 |
re PR sanitizer/59061 (Port leaksanitizer)
PR sanitizer/59061
* common.opt (static-liblsan): Add.
* config/gnu-user.h (STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS):
Define.
* flag-types.h (enum sanitize_code): Add SANITIZE_LEAK. Renumber
SANITIZE_SHIFT, SANITIZE_DIVIDE, SANITIZE_UNREACHABLE, SANITIZE_VLA,
SANITIZE_RETURN.
* opts.c (common_handle_option): Handle -fsanitize=leak.
* gcc.c (ADD_STATIC_LIBLSAN_LIBS, LIBLSAN_SPEC): Define.
(LIBUBSAN_SPEC): Don't test LIBUBSAN_EARLY_SPEC.
(LIBUBSAN_EARLY_SPEC): Remove.
(SANITIZER_EARLY_SPEC): Don't do anything for libubsan.
(SANITIZER_SPEC): Add -fsanitize=leak handling.
(sanitize_spec_function): Handle %sanitize(leak).
* doc/invoke.texi (-static-liblsan, -fsanitize=leak): Document.
* c-c++-common/asan/no-redundant-instrumentation-7.c: Fix
cleanup-tree-dump directive.
* configure.tgt: Set LSAN_SUPPORTED=yes for x86_64-linux.
* configure.ac (LSAN_SUPPORTED): New AM_CONDITIONAL.
* configure: Regenerated.
* lsan/Makefile.am (toolexeclib_LTLIBRARIES, lsan_files,
liblsan_la_SOURCES, liblsan_la_LIBADD, liblsan_la_LDFLAGS): Add.
* lsan/Makefile.in: Regenerated.
From-SVN: r205290
Diffstat (limited to 'libsanitizer/configure')
-rwxr-xr-x | libsanitizer/configure | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libsanitizer/configure b/libsanitizer/configure index 5e425d1..22f7fee 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -606,6 +606,8 @@ LTLIBOBJS LIBOBJS USING_MAC_INTERPOSE_FALSE USING_MAC_INTERPOSE_TRUE +LSAN_SUPPORTED_FALSE +LSAN_SUPPORTED_TRUE TSAN_SUPPORTED_FALSE TSAN_SUPPORTED_TRUE enable_static @@ -11117,7 +11119,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11120 "configure" +#line 11122 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11223,7 +11225,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11226 "configure" +#line 11228 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14523,6 +14525,7 @@ fi # Get target configury. unset TSAN_SUPPORTED +unset LSAN_SUPPORTED . ${srcdir}/configure.tgt if test "x$TSAN_SUPPORTED" = "xyes"; then TSAN_SUPPORTED_TRUE= @@ -14532,6 +14535,14 @@ else TSAN_SUPPORTED_FALSE= fi + if test "x$LSAN_SUPPORTED" = "xyes"; then + LSAN_SUPPORTED_TRUE= + LSAN_SUPPORTED_FALSE='#' +else + LSAN_SUPPORTED_TRUE='#' + LSAN_SUPPORTED_FALSE= +fi + case "$host" in *-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ;; @@ -14722,6 +14733,10 @@ if test -z "${TSAN_SUPPORTED_TRUE}" && test -z "${TSAN_SUPPORTED_FALSE}"; then as_fn_error "conditional \"TSAN_SUPPORTED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${LSAN_SUPPORTED_TRUE}" && test -z "${LSAN_SUPPORTED_FALSE}"; then + as_fn_error "conditional \"LSAN_SUPPORTED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${USING_MAC_INTERPOSE_TRUE}" && test -z "${USING_MAC_INTERPOSE_FALSE}"; then as_fn_error "conditional \"USING_MAC_INTERPOSE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |