aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer/configure.tgt
AgeCommit message (Collapse)AuthorFilesLines
2024-02-06LoongArch: libsanitizer: Enable Lsan and Tsan for loongarch64.chenguoqi1-0/+5
libsanitizer/ChangeLog: * configure.tgt: Enable tsan and lsan for loongarch64. * tsan/Makefile.am (EXTRA_libtsan_la_SOURCES): Add tsan_rtl_loongarch64.S. * tsan/Makefile.in: Regenerate.
2024-01-02libsanitizer: Enable LSan and TSan for riscv64Andreas Schwab1-0/+5
libsanitizer: * configure.tgt (riscv64-*-linux*): Enable LSan and TSan.
2023-04-18libsanitizer, darwin: Unsupport Darwin >= 22 for now.Iain Sandoe1-1/+1
The mechanism for location dyld has altered from Darwin22 since dyld is now in the shared cache. The implemented mechanism for walking the cache uses Apple Blocks which GCC does not yet support, and the fallback to the original mechanism does not work there. Until a suitable work-around can be found, unsupport Darwin22+. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libsanitizer/ChangeLog: * configure.tgt: Unsupport Darwin22+ until a mechanism can be found to locate dyld in the shared cache.
2022-12-09Enable hwasan for x86-64.liuhongt1-0/+1
libsanitizer * configure.tgt: Enable hwasan for x86-64.
2022-12-04libsanitizer, Darwin: Restrict build to Darwin 16 or newer.Iain Sandoe1-1/+1
The latest import has added dependencies on system resources that are not present until Darwin 16. It might be possible to work around these for earlier systems, but in the short-term we have to disable the build so that bootstrap completes. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libsanitizer/ChangeLog: * configure.tgt: Restrict build to Darwin 16 or newer.
2022-08-31libsanitizer: enable libubsan and libasan for loongarch64-*-linux*Xi Ruoyao1-0/+2
The LoongArch support for libubsan and libasan has been added in: - https://reviews.llvm.org/D129371 - https://reviews.llvm.org/D129418 and we've merged them in r13-2269. It's time to enable them. No unexpected failures in GCC asan.exp and ubsan.exp tests. libsanitizer/ChangeLog: * configure.tgt: Allow loongarch64-*-linux*.
2022-03-15Enable libsanitizer build on mips64Xi Ruoyao1-4/+0
Bootstrapped and regtested on mips64-linux-gnuabi64. bootstrap-ubsan revealed 3 bugs (PR 104842, 104843, 104851). bootstrap-asan did not reveal any new bug. gcc/ * config/mips/mips.h (SUBTARGET_SHADOW_OFFSET): Define. * config/mips/mips.cc (mips_option_override): Make -fsanitize=address imply -fasynchronous-unwind-tables. This is needed by libasan for stack backtrace on MIPS. (mips_asan_shadow_offset): Return SUBTARGET_SHADOW_OFFSET. gcc/testsuite: * c-c++-common/asan/global-overflow-1.c: Skip for MIPS with some optimization levels because inaccurate debug info is causing dg-output mismatch on line numbers. * g++.dg/asan/large-func-test-1.C: Likewise. libsanitizer/ * configure.tgt: Enable build on mips*64*-*-linux*.
2021-08-03Fix bashism in `libsanitizer/configure.tgt'Mosè Giordano1-1/+1
Appending to a string variable with `+=' is a bashism and does not work in strict POSIX shells like dash. This results in the extra compilation flags not to be set correctly. This patch replaces the `+=' syntax with a simple string interpolation to append to the `EXTRA_CXXFLAGS' variable. libsanitizer/ChangeLog PR sanitizer/101111 * configure.tgt: Fix bashism in setting of `EXTRA_CXXFLAGS'.
2021-07-28IBM Z: Enable LSan and TSanIlya Leoshkevich1-0/+5
libsanitizer/ChangeLog: * configure.tgt (s390*-*-linux*): Enable LSan and TSan for s390x.
2020-12-05Darwin : Update libtool and dependencies for Darwin20 [PR97865]Iain Sandoe1-0/+1
The change in major version (and the increment from Darwin19 to 20) caused libtool tests to fail which resulted in incorrect build settings for shared libraries. We take this opportunity to sort out the shared undefined symbols state rather than propagating the current unsound behaviour into a new rev. This change means that we default to the case that missing symbols are considered an error, and if one wants to allow this intentionally, the confiuration for that case should be set appropriately. Three existing cases need undefined dynamic lookup: libitm, where there is already a configuration mechanism to add the flags. libcc1, where we add simple configuration to add the flags for Darwin. libsanitizer, where we can add to the existing extra flags. libcc1/ChangeLog: PR target/97865 * Makefile.am: Add dynamic_lookup to LD flags for Darwin. * configure.ac: Test for Darwin host and set a flag. * Makefile.in: Regenerate. * configure: Regenerate. libitm/ChangeLog: PR target/97865 * configure.tgt: Add dynamic_lookup to XLDFLAGS for Darwin. * configure: Regenerate. libsanitizer/ChangeLog: PR target/97865 * configure.tgt: Add dynamic_lookup to EXTRA_CXXFLAGS for Darwin. * configure: Regenerate. ChangeLog: PR target/97865 * libtool.m4: Update handling of Darwin platform link flags for Darwin20. gcc/ChangeLog: PR target/97865 * configure: Regenerate. libatomic/ChangeLog: PR target/97865 * configure: Regenerate. libbacktrace/ChangeLog: PR target/97865 * configure: Regenerate. libffi/ChangeLog: PR target/97865 * configure: Regenerate. libgfortran/ChangeLog: PR target/97865 * configure: Regenerate. libgomp/ChangeLog: PR target/97865 * configure: Regenerate. libhsail-rt/ChangeLog: PR target/97865 * configure: Regenerate. libobjc/ChangeLog: PR target/97865 * configure: Regenerate. libphobos/ChangeLog: PR target/97865 * configure: Regenerate. libquadmath/ChangeLog: PR target/97865 * configure: Regenerate. libssp/ChangeLog: PR target/97865 * configure: Regenerate. libstdc++-v3/ChangeLog: PR target/97865 * configure: Regenerate. libvtv/ChangeLog: PR target/97865 * configure: Regenerate. zlib/ChangeLog: PR target/97865 * configure: Regenerate.
2020-11-25libsanitizer: Only build libhwasan when targeting AArch64Matthew Malcomson1-0/+1
Though the library has limited support for x86, we don't have any support for generating code targeting x86 so there is no point building for that target. Ensure we build for AArch64 but not for AArch64 ilp32. libsanitizer/ChangeLog: * Makefile.am: Condition Build hwasan directory. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Set HWASAN_SUPPORTED based on target architecture. * configure.tgt: Likewise.
2020-11-21Darwin, libsanitizer : Support libsanitizer for x86_64-darwin20.Iain Sandoe1-1/+1
The sanitizer is supported for at least x86_64 and Darwin20. libsanitizer/ChangeLog: * configure.tgt: Allow x86_64 Darwin2x.
2020-05-01gcc: Enable bits for sanitizer support on FreeBSD x86_64Andreas Tobler1-0/+2
This patch add the necessary bits to suport libasan on FreeBSD x86_64. gcc * config/i386/i386.h: Define a new macro: SUBTARGET_SHADOW_OFFSET. * config/i386/i386.c (ix86_asan_shadow_offset): Use this macro. * config/i386/darwin.h: Override the SUBTARGET_SHADOW_OFFSET macro. * config/i386/freebsd.h: Likewise. * config/freebsd.h (LIBASAN_EARLY_SPEC): Define. LIBTSAN_EARLY_SPEC): Likewise. (LIBLSAN_EARLY_SPEC): Likewise. libsanitizer: * configure.tgt: Add x86_64- and i?86-*-freebsd* targets.
2020-03-01Darwin, libsanitizer: Adjust minimum supported Darwin version (PR93731).Iain Sandoe1-1/+1
The current imported libsanitizer code produces kernel panics for Darwin 11 (macOS 10.7) and is unsupported for earlier versions already. It is not clear if the current sources are even intended to be supported on Darwin 11, so this patch causes the default to be build without sanitizers for Darwin <= 11. 2020-03-01 Iain Sandoe <iain@sandoe.co.uk> PR sanitizer/93731 * configure.tgt (x86_64-*-darwin*, i?86-*-darwin*): Enable by default only for Darwin versions greater than 12 (macOS 10.8).
2020-03-01[Darwin, libsanitizer] Default to no sanitizer for Darwin <= 10Iain Sandoe1-1/+1
Darwin10 is no longer supported upstream and will not build without additional patches.
2019-11-13Enable libsanitizer build on riscv64Andreas Schwab1-0/+2
* configure.tgt (riscv64-*-linux*): Enable build. From-SVN: r278126
2019-09-10[ARM/FDPIC v6 03/24] [ARM] FDPIC: Force FDPIC related options unless ↵Christophe Lyon1-0/+3
-mno-fdpic is provided In FDPIC mode, we set -fPIE unless the user provides -fno-PIE, -fpie, -fPIC or -fpic: indeed FDPIC code is PIC, but we want to generate code for executables rather than shared libraries by default. We also make sure to use the --fdpic assembler option, and select the appropriate linker emulation. At link time, we also default to -pie, unless we are generating a shared library or a relocatable file (-r). Note that static link is not supported as it requires specifying the dynamic linker because the executable still has to relocate itself at startup. We also force 'now' binding since lazy binding is not supported. We should also apply the same behavior for -Wl,-Ur as for -r, but I couldn't find how to describe that in the specs fragment. 2019-09-10 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> gcc/ * config.gcc: Handle arm*-*-uclinuxfdpiceabi. * config/arm/bpabi.h (TARGET_FDPIC_ASM_SPEC): New. (SUBTARGET_EXTRA_ASM_SPEC): Use TARGET_FDPIC_ASM_SPEC. * config/arm/linux-eabi.h (FDPIC_CC1_SPEC): New. (CC1_SPEC): Use FDPIC_CC1_SPEC. (MUSL_DYNAMIC_LINKER): Add -fdpic suffix when needed. * config/arm/uclinuxfdpiceabi.h: New file. libsanitizer/ * configure.tgt (arm*-*-*fdpiceabi): Sanitizers are unsupported in this configuration. Co-Authored-By: Mickaël Guêné <mickael.guene@st.com> From-SVN: r275565
2019-08-14Libsanitizer merge from trunk r368656.Martin Liska1-3/+0
2019-08-14 Martin Liska <mliska@suse.cz> PR sanitizer/89832 PR sanitizer/91325 * All source files: Merge from upstream 368656. From-SVN: r274426
2018-11-06Enable libsanitizer on Solaris (PR sanitizer/80953)Rainer Orth1-0/+4
gcc: PR sanitizer/80953 * config/sol2.h (ASAN_CC1_SPEC): Define. (LD_WHOLE_ARCHIVE_OPTION): Define. (LD_NO_WHOLE_ARCHIVE_OPTION): Define. (ASAN_REJECT_SPEC): Provide default. (LIBASAN_EARLY_SPEC): Define. (LIBTSAN_EARLY_SPEC): Define. (LIBLSAN_EARLY_SPEC): Define. * config/i386/sol2.h (CC1_SPEC): Redefine. (ASAN_REJECT_SPEC): Define. * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare. (TARGET_ASAN_SHADOW_OFFSET): Define. (sparc_asan_shadow_offset): New function. * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC. (ASAN_REJECT_SPEC): Define. gcc/testsuite: PR sanitizer/80953 * c-c++-common/asan/alloca_loop_unpoisoning.c: Require alloca support. (foo): Use __builtin_alloca. libsanitizer: PR sanitizer/80953 * configure.tgt (sparc*-*-solaris2.11*): Enable. (x86_64-*-solaris2.11* | i?86-*-solaris2.11*): Enable. From-SVN: r265837
2018-04-26If someone has access to a 64-bit mips-linux system to test this (with the ↵Hans-Peter Nilsson1-1/+7
obvious edit), that'd be really nice. If someone has access to a 64-bit mips-linux system to test this (with the obvious edit), that'd be really nice. Until then, best to not introduce possible build failures. * configure.tgt <mips*-*-linux*>: Enable build, excluding mips*64*-*-linux*. From-SVN: r259665
2017-10-05Add sanitizer_linux_x86_64.lo if __x86_64__ is defined by $CCH.J. Lu1-0/+2
Since size of "void *" is 4 bytes for x32, check if __x86_64__ is defined by $CC, instead of if test x$ac_cv_sizeof_void_p = x8; then to decide wether sanitizer_linux_x86_64.lo should be used. PR sanitizer/82379 * configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Set to sanitizer_linux_x86_64.lo if __x86_64__ is defined by $CC. From-SVN: r253441
2017-02-11re PR sanitizer/79341 (Many Asan tests fail on s390)Jakub Jelinek1-3/+0
PR sanitizer/79341 * configure.tgt (s390*-*-linux*): Don't disable libsanitizer on s390-linux 31-bit. * sanitizer_common/sanitizer_internal_defs.h: Cherry-pick upstream r294793. * sanitizer_common/sanitizer_common_interceptors.inc: Cherry-pick upstream r294790. * sanitizer_common/sanitizer_linux_s390.cc: Cherry-pick upstream r294799. From-SVN: r245350
2017-01-31s390.c (s390_asan_shadow_offset): New function.Jakub Jelinek1-0/+5
gcc/ * config/s390/s390.c (s390_asan_shadow_offset): New function. (TARGET_ASAN_SHADOW_OFFSET): Redefine. libsanitizer/ * configure.tgt: Enable asan and ubsan on 64-bit s390*-*-linux*. From-SVN: r245060
2017-01-24* configure.tgt: Enable tsan and lsan on powerpc64{,le}-*-linux*.Jakub Jelinek1-1/+6
From-SVN: r244854
2016-11-09All source files: Merge from upstream 285547.Maxim Ostapenko1-0/+2
libsanitizer/ * All source files: Merge from upstream 285547. * configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): New variable. * configure.ac (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Handle it. * asan/Makefile.am (asan_files): Add new files. * asan/Makefile.in: Regenerate. * ubsan/Makefile.in: Likewise. * lsan/Makefile.in: Likewise. * tsan/Makefile.am (tsan_files): Add new files. * tsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.am (sanitizer_common_files): Add new files. (EXTRA_libsanitizer_common_la_SOURCES): Define. (libsanitizer_common_la_LIBADD): Likewise. (libsanitizer_common_la_DEPENDENCIES): Likewise. * sanitizer_common/Makefile.in: Regenerate. * interception/Makefile.in: Likewise. * libbacktace/Makefile.in: Likewise. * Makefile.in: Likewise. * configure: Likewise. * merge.sh: Handle builtins/assembly.h merging. * builtins/assembly.h: New file. * asan/libtool-version: Bump the libasan SONAME. From-SVN: r241977
2015-11-23libsanitizer merge from upstream r253555.Max Ostapenko1-0/+2
libsanitizer/ 2015-11-23 Maxim Ostapenko <m.ostapenko@partner.samsung.com> * All source files: Merge from upstream r253555. * configure.tgt: Enable LSan on aarch64-*-linux* targets. Add new dependences for TSan for aarch64-*-linux* targets. * tsan/Makefile.am: Add new source files. * configure: Regenerate. * tsan/Makefile.in: Likewise. From-SVN: r230739
2015-10-21libsanitizer merge from upstream r250806.Max Ostapenko1-0/+3
libsanitizer/ 2015-10-20 Maxim Ostapenko <m.ostapenko@partner.samsung.com> * All source files: Merge from upstream r250806. * configure.ac (link_sanitizer_common): Add -lrt flag. * configure.tgt: Enable TSAN and LSAN for aarch64-linux targets. Set CXX_ABI_NEEDED=true for darwin. * asan/Makefile.am (asan_files): Add new files. (DEFS): Add DCAN_SANITIZE_UB=0 and remove unused and legacy DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0. * asan/Makefile.in: Regenerate. * ubsan/Makefile.am (ubsan_files): Add new files. (DEFS): Add DCAN_SANITIZE_UB=1. (libubsan_la_LIBADD): Add -lc++abi if CXX_ABI_NEEDED is true. * ubsan/Makefile.in: Regenerate. * tsan/Makefile.am (tsan_files): Add new files. (DEFS): Add DCAN_SANITIZE_UB=0. * tsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.am (sanitizer_common_files): Add new files. * sanitizer_common/Makefile.in: Regenerate. * asan/libtool-version: Bump the libasan SONAME. From-SVN: r229111
2015-02-27* configure.tgt: Enable build on powerpc*le-*-linux.Peter Bergner1-3/+0
From-SVN: r221060
2015-01-24Include TSAN dependent sources for 64 bit i?86 target. Venkataramanan Kumar1-0/+2
2015-01-25 Venkataramanan Kumar <venkataramanan.kumar@linaro.org> * configure.ac (TSAN_TARGET_DEPENDENT_OBJECTS): Undefine. * configure: Regenerate. * configure.tgt (TSAN_TARGET_DEPENDENT_OBJECTS): Define. From-SVN: r220083
2014-09-26[AArch64] Enable Address Sanitizer.Christophe Lyon1-0/+2
2014-09-26 Christophe Lyon <christophe.lyon@linaro.org> [AArch64] Enable Address Sanitizer. gcc/ * config/aarch64/aarch64-linux.h (ASAN_CC1_SPEC): Define. (CC1_SPEC): Define. * config/aarch64/aarch64.c (aarch64_asan_shadow_offset): New function. (TARGET_ASAN_SHADOW_OFFSET): Define. libsanitzer/ * configure.tgt: Enable build on aarch64*-linux. From-SVN: r215642
2014-03-03configure.tgt: Unsupported for little endian PowerPC for now.Bill Schmidt1-0/+3
2014-03-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * configure.tgt: Unsupported for little endian PowerPC for now. From-SVN: r208290
2013-11-22re PR sanitizer/59061 (Port leaksanitizer)Jakub Jelinek1-0/+1
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-05-07arm.c (arm_asan_shadow_offset): New function.Christophe Lyon1-0/+2
2013-05-06 Christophe Lyon <christophe.lyon@linaro.org> gcc/ * config/arm/arm.c (arm_asan_shadow_offset): New function. (TARGET_ASAN_SHADOW_OFFSET): Define. * config/arm/linux-eabi.h (ASAN_CC1_SPEC): Define. (LINUX_OR_ANDROID_CC): Add ASAN_CC1_SPEC. libsanitizer/ * configure.tgt: Add ARM pattern. testsuite/ * lib/target-supports.exp (check_effective_target_hw): New function. * c-c++-common/asan/clone-test-1.c: Call check_effective_target_hw. * c-c++-common/asan/rlimit-mmap-test-1.c: Likewise. * c-c++-common/asan/heap-overflow-1.c: Update regexps to accept possible decorations. * c-c++-common/asan/null-deref-1.c: Likewise. * c-c++-common/asan/stack-overflow-1.c: Likewise. * c-c++-common/asan/strncpy-overflow-1.c: Likewise. * c-c++-common/asan/use-after-free-1.c: Likewise. * g++.dg/asan/deep-thread-stack-1.C: Likewise. * g++.dg/asan/large-func-test-1.C: Likewise. From-SVN: r198683
2013-02-11configure.tgt: Disable build on darwin9 and earlier.Jack Howarth1-1/+1
2013-02-11 Jack Howarth <howarth@bromo.med.uc.edu> * configure.tgt: Disable build on darwin9 and earlier. From-SVN: r195958
2012-12-06configure.tgt: Enable build on powerpc*-linux.Peter Bergner1-0/+2
libsanitizer/ * configure.tgt: Enable build on powerpc*-linux. gcc/ * config/rs6000/sysv4.h (TARGET_ASAN_SHADOW_OFFSET): Define. * config/rs6000/rs6000.c (rs6000_asan_shadow_offset): New function. * config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Disable if using ASAN. From-SVN: r194273
2012-11-24[libsanitizer] add mach_override and enable libsanitizer on darwinJack Howarth1-0/+3
From-SVN: r193781
2012-11-23Makefile.am (AM_CXXFLAGS): Remove -Wno-variadic-macros.Jakub Jelinek1-1/+6
* tsan/Makefile.am (AM_CXXFLAGS): Remove -Wno-variadic-macros. * Makefile.am (SUBDIRS): Guard tsan addition with TSAN_SUPPORTED automake conditional instead of !MULTISUBDIR32. * configure.tgt: Set TSAN_SUPPORTED=yes for x86_64/i686-linux for 64-bit multilib. * configure.ac: Check for void * size, source in configure.tgt, define TSAN_SUPPORTED conditional instead of MULTILIBDIR32. * configure: Regenerated. * Makefile.in: Regenerated. * tsan/Makefile.in: Regenerated. From-SVN: r193741
2012-11-16Enable building of libsanitizer on sparc linuxDodji Seketeli1-1/+1
libsanitizer/ChangeLog: * configure.tgt: Enable sparc linux. From-SVN: r193552
2012-11-13Move libsanitizer configure logic to subdirectoryRichard Henderson1-0/+28
From-SVN: r193487