9065ada9b5
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
42 lines
1.3 KiB
Bash
42 lines
1.3 KiB
Bash
# -*- shell-script -*-
|
|
# Copyright (C) 2012 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not see <http://www.gnu.org/licenses/>.
|
|
|
|
# This is the target specific configuration file. This is invoked by the
|
|
# autoconf generated configure script. Putting it in a separate shell file
|
|
# lets us skip running autoconf when modifying target specific information.
|
|
|
|
# Filter out unsupported systems.
|
|
case "${target}" in
|
|
x86_64-*-linux* | i?86-*-linux*)
|
|
if test x$ac_cv_sizeof_void_p = x8; then
|
|
TSAN_SUPPORTED=yes
|
|
LSAN_SUPPORTED=yes
|
|
fi
|
|
;;
|
|
powerpc*-*-linux*)
|
|
;;
|
|
sparc*-*-linux*)
|
|
;;
|
|
arm*-*-linux*)
|
|
;;
|
|
x86_64-*-darwin[1]* | i?86-*-darwin[1]*)
|
|
TSAN_SUPPORTED=no
|
|
;;
|
|
*)
|
|
UNSUPPORTED=1
|
|
;;
|
|
esac
|