aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer/lsan/Makefile.am
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-11-22 22:13:08 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-11-22 22:13:08 +0100
commit9065ada9b5fa30d47ec723fbfbbeaad1082035cb (patch)
tree1e351f73c04f7b8ee40bc54557ac53f5b8b0aa2a /libsanitizer/lsan/Makefile.am
parent2e5189c83a2b2c6f3fff04f9d8f6c1b1a869b915 (diff)
downloadgcc-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/lsan/Makefile.am')
-rw-r--r--libsanitizer/lsan/Makefile.am14
1 files changed, 14 insertions, 0 deletions
diff --git a/libsanitizer/lsan/Makefile.am b/libsanitizer/lsan/Makefile.am
index 3d500f3..a312c1c 100644
--- a/libsanitizer/lsan/Makefile.am
+++ b/libsanitizer/lsan/Makefile.am
@@ -9,13 +9,27 @@ AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
ACLOCAL_AMFLAGS = -I m4
noinst_LTLIBRARIES = libsanitizer_lsan.la
+if LSAN_SUPPORTED
+toolexeclib_LTLIBRARIES = liblsan.la
+endif
sanitizer_lsan_files = \
lsan_common.cc \
lsan_common_linux.cc
+lsan_files = \
+ $(sanitizer_lsan_files) \
+ lsan.cc \
+ lsan_allocator.cc \
+ lsan_interceptors.cc \
+ lsan_thread.cc
+
libsanitizer_lsan_la_SOURCES = $(sanitizer_lsan_files)
+liblsan_la_SOURCES = $(lsan_files)
+liblsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(LIBSTDCXX_RAW_CXX_LDFLAGS)
+liblsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl
+
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.