2012-11-13 23:19:44 +01:00
|
|
|
# -*- shell-script -*-
|
2017-01-24 09:19:37 +01:00
|
|
|
# Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
2012-11-13 23:19:44 +01:00
|
|
|
|
|
|
|
# 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.
|
2015-01-24 16:21:51 +01:00
|
|
|
TSAN_TARGET_DEPENDENT_OBJECTS=
|
2016-11-08 23:04:09 +01:00
|
|
|
SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS=
|
2012-11-13 23:19:44 +01:00
|
|
|
case "${target}" in
|
2012-11-23 01:31:54 +01:00
|
|
|
x86_64-*-linux* | i?86-*-linux*)
|
|
|
|
if test x$ac_cv_sizeof_void_p = x8; then
|
|
|
|
TSAN_SUPPORTED=yes
|
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
2013-11-22 22:13:08 +01:00
|
|
|
LSAN_SUPPORTED=yes
|
2015-01-24 16:21:51 +01:00
|
|
|
TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_amd64.lo
|
2016-11-08 23:04:09 +01:00
|
|
|
SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS=sanitizer_linux_x86_64.lo
|
2012-11-23 01:31:54 +01:00
|
|
|
fi
|
|
|
|
;;
|
2012-12-06 22:53:36 +01:00
|
|
|
powerpc*-*-linux*)
|
2017-01-24 09:19:37 +01:00
|
|
|
if test x$ac_cv_sizeof_void_p = x8; then
|
|
|
|
TSAN_SUPPORTED=yes
|
|
|
|
LSAN_SUPPORTED=yes
|
|
|
|
TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_ppc64.lo
|
|
|
|
fi
|
2012-12-06 22:53:36 +01:00
|
|
|
;;
|
2012-11-23 01:31:54 +01:00
|
|
|
sparc*-*-linux*)
|
2012-11-13 23:19:44 +01:00
|
|
|
;;
|
2017-01-31 14:50:20 +01:00
|
|
|
s390*-*-linux*)
|
|
|
|
;;
|
2013-05-07 16:17:50 +02:00
|
|
|
arm*-*-linux*)
|
|
|
|
;;
|
2014-09-26 15:07:42 +02:00
|
|
|
aarch64*-*-linux*)
|
2015-10-21 09:32:45 +02:00
|
|
|
if test x$ac_cv_sizeof_void_p = x8; then
|
|
|
|
TSAN_SUPPORTED=yes
|
2015-11-23 10:07:18 +01:00
|
|
|
LSAN_SUPPORTED=yes
|
|
|
|
TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_aarch64.lo
|
2015-10-21 09:32:45 +02:00
|
|
|
fi
|
2014-09-26 15:07:42 +02:00
|
|
|
;;
|
2013-02-12 00:13:37 +01:00
|
|
|
x86_64-*-darwin[1]* | i?86-*-darwin[1]*)
|
2012-11-24 19:24:13 +01:00
|
|
|
TSAN_SUPPORTED=no
|
|
|
|
;;
|
2012-11-13 23:19:44 +01:00
|
|
|
*)
|
|
|
|
UNSUPPORTED=1
|
|
|
|
;;
|
|
|
|
esac
|