summaryrefslogtreecommitdiff
path: root/libsanitizer/configure.tgt
AgeCommit message (Collapse)Author
2020-05-01gcc: Enable bits for sanitizer support on FreeBSD x86_64Andreas Tobler
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 Sandoe
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 Sandoe
Darwin10 is no longer supported upstream and will not build without additional patches.
2019-11-13Enable libsanitizer build on riscv64Andreas Schwab
* 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 Lyon
-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 Liska
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 Orth
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 Nilsson
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. Lu
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 Jelinek
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 Jelinek
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 Jelinek
From-SVN: r244854
2016-11-09All source files: Merge from upstream 285547.Maxim Ostapenko
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 Ostapenko
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 Ostapenko
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 Bergner
From-SVN: r221060
2015-01-24Include TSAN dependent sources for 64 bit i?86 target. Venkataramanan Kumar
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 Lyon
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 Schmidt
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 Jelinek
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 Lyon
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 Howarth
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 Bergner
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 Howarth
From-SVN: r193781
2012-11-23Makefile.am (AM_CXXFLAGS): Remove -Wno-variadic-macros.Jakub Jelinek
* 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 Seketeli
libsanitizer/ChangeLog: * configure.tgt: Enable sparc linux. From-SVN: r193552
2012-11-13Move libsanitizer configure logic to subdirectoryRichard Henderson
From-SVN: r193487