1# -*- shell-script -*- 2# Copyright (C) 2012-2018 Free Software Foundation, Inc. 3 4# This program is free software; you can redistribute it and/or modify 5# it under the terms of the GNU General Public License as published by 6# the Free Software Foundation; either version 2 of the License, or 7# (at your option) any later version. 8# 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12# GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License 15# along with this program; if not see <http://www.gnu.org/licenses/>. 16 17# This is the target specific configuration file. This is invoked by the 18# autoconf generated configure script. Putting it in a separate shell file 19# lets us skip running autoconf when modifying target specific information. 20 21# Filter out unsupported systems. 22TSAN_TARGET_DEPENDENT_OBJECTS= 23SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS= 24case "${target}" in 25 *-netbsd*) 26 # There is only glue for amd64 27 case "${target}" in 28 x86_64-*) 29 TSAN_SUPPORTED=yes 30 ;; 31 esac 32 ;; 33 x86_64-*-linux* | i?86-*-linux*) 34 if test x$ac_cv_sizeof_void_p = x8; then 35 TSAN_SUPPORTED=yes 36 LSAN_SUPPORTED=yes 37 TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_amd64.lo 38 fi 39 if echo "int x = __x86_64__;" | $CC -c -x c -o /dev/null - > /dev/null 2>&1; then 40 SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS=sanitizer_linux_x86_64.lo 41 fi 42 ;; 43 powerpc*-*-linux*) 44 if test x$ac_cv_sizeof_void_p = x8; then 45 TSAN_SUPPORTED=yes 46 LSAN_SUPPORTED=yes 47 TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_ppc64.lo 48 fi 49 ;; 50 sparc*-*-linux*) 51 ;; 52 s390*-*-linux*) 53 ;; 54 sparc*-*-solaris2.11*) 55 ;; 56 arm*-*-linux*) 57 ;; 58 mips*64*-*-linux*) 59 # This clause is only here to not match the supported mips*-*-linux*. 60 UNSUPPORTED=1 61 ;; 62 mips*-*-linux*) 63 ;; 64 aarch64*-*-linux*) 65 if test x$ac_cv_sizeof_void_p = x8; then 66 TSAN_SUPPORTED=yes 67 LSAN_SUPPORTED=yes 68 TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_aarch64.lo 69 fi 70 ;; 71 x86_64-*-darwin1[1-9]* | i?86-*-darwin1[1-9]*) 72 TSAN_SUPPORTED=no 73 ;; 74 x86_64-*-solaris2.11* | i?86-*-solaris2.11*) 75 ;; 76 *) 77 UNSUPPORTED=1 78 ;; 79esac 80