aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer/asan
AgeCommit message (Collapse)AuthorFilesLines
2024-02-16libsanitizer: Intercept __makecontext_v2 on Solaris/SPARC [PR113785]Rainer Orth1-0/+17
c-c++-common/asan/swapcontext-test-1.c FAILs on Solaris/SPARC: FAIL: c-c++-common/asan/swapcontext-test-1.c -O0 execution test FAIL: c-c++-common/asan/swapcontext-test-1.c -O1 execution test FAIL: c-c++-common/asan/swapcontext-test-1.c -O2 execution test FAIL: c-c++-common/asan/swapcontext-test-1.c -O2 -flto execution test FAIL: c-c++-common/asan/swapcontext-test-1.c -O2 -flto -flto-partition=none execution test FAIL: c-c++-common/asan/swapcontext-test-1.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test FAIL: c-c++-common/asan/swapcontext-test-1.c -O3 -g execution test FAIL: c-c++-common/asan/swapcontext-test-1.c -Os execution test As detailed in PR sanitizer/113785, this happens because an ABI change in Solaris 10/SPARC caused the external symbol for makecontext to be changed to __makecontext_v2, which isn't intercepted. The following patch, submitted upstream at https://github.com/llvm/llvm-project/pull/81588, fixes that. Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11. 2024-02-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> libsanitizer: PR sanitizer/113785 * asan/asan_interceptors.cpp: Cherry-pick llvm-project revision 8c2033719a843a1880427a5e8caa5563248bce78.
2023-11-28libsanitizer: Check assembler support for symbol assignment [PR112563]Rainer Orth2-2/+3
The recent libsanitizer import broke the build on Solaris/SPARC with the native as: /usr/ccs/bin/as: ".libs/sanitizer_errno.s", line 4247: error: symbol "__sanitizer_internal_memset" is used but not defined /usr/ccs/bin/as: ".libs/sanitizer_errno.s", line 4247: error: symbol "__sanitizer_internal_memcpy" is used but not defined /usr/ccs/bin/as: ".libs/sanitizer_errno.s", line 4247: error: symbol "__sanitizer_internal_memmove" is used but not defined Since none of the alternatives considered in the PR worked out, this patch checks if the assembler does support symbol assignment, disabling the code otherwise. This returns the code to the way it was up to LLVM 16. Bootstrapped without regressions on sparc-sun-solaris2.11 (as and gas) and i386-pc-solaris2.11 (as and gas). 2023-11-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> libsanitizer: PR sanitizer/112563 * configure.ac (libsanitizer_cv_as_sym_assign): Check for assembler symbol assignment support. * configure: Regenerate. * asan/Makefile.am (DEFS): Add @AS_SYM_ASSIGN_DEFS@. * Makefile.in, asan/Makefile.in, hwasan/Makefile.in, interception/Makefile.in, libbacktrace/Makefile.in, lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in, ubsan/Makefile.in: Regenerate.
2023-11-18libsanitizer: fix build on darwinFrancois-Xavier Coudert1-0/+2
Upstream report of the issue at https://github.com/llvm/llvm-project/issues/72639 libsanitizer/ChangeLog: * asan/asan_mac.cpp: Protect Apple blocks behind the MISSING_BLOCKS_SUPPORT macro.
2023-11-15libsanitizer: Apply local patchesJakub Jelinek3-21/+7
This patch just reapplies local patches (will be noted in LOCAL_PATCHES).
2023-11-15libsanitizer: merge from upstream (c425db2eb558c263)Jakub Jelinek29-498/+869
The following patch is result of libsanitizer/merge.sh from c425db2eb558c263 (yesterday evening). Bootstrapped/regtested on x86_64-linux and i686-linux (together with the follow-up 3 patches I'm about to post). BTW, seems upstream has added riscv64 support for I think lsan/tsan, so if anyone is willing to try it there, it would be a matter of copying e.g. the s390*-*-linux* libsanitizer/configure.tgt entry to riscv64-*-linux* with the obvious s/s390x/riscv64/ change in it.
2023-10-22Config,Darwin: Allow for configuring Darwin to use embedded runpath.Iain Sandoe2-2/+12
Recent Darwin versions place contraints on the use of run paths specified in environment variables. This breaks some assumptions in the GCC build. This change allows the user to configure a Darwin build to use '@rpath/libraryname.dylib' in library names and then to add an embedded runpath to executables (and libraries with dependents). The embedded runpath is added by default unless the user adds '-nodefaultrpaths' to the link line. For an installed compiler, it means that any executable built with that compiler will reference the runtimes installed with the compiler (equivalent to hard-coding the library path into the name of the library). During build-time configurations any "-B" entries will be added to the runpath thus the newly-built libraries will be found by exes. Since the install name is set in libtool, that decision needs to be available here (but might also cause dependent ones in Makefiles, so we need to export a conditional). This facility is not available for Darwin 8 or earlier, however the existing environment variable runpath does work there. We default this on for systems where the external DYLD_LIBRARY_PATH does not work and off for Darwin 8 or earlier. For systems that can use either method, if the value is unset, we use the default (which is currently DYLD_LIBRARY_PATH). ChangeLog: * configure: Regenerate. * configure.ac: Do not add default runpaths to GCC exes when we are building -static-libstdc++/-static-libgcc (the default). * libtool.m4: Add 'enable-darwin-at-runpath'. Act on the enable flag to alter Darwin libraries to use @rpath names. gcc/ChangeLog: * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * config/darwin.h: Handle Darwin rpaths. * config/darwin.opt: Handle Darwin rpaths. * Makefile.in: Handle Darwin rpaths. gcc/ada/ChangeLog: * gcc-interface/Makefile.in: Handle Darwin rpaths. gcc/jit/ChangeLog: * Make-lang.in: Handle Darwin rpaths. libatomic/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libbacktrace/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. libgcc/ChangeLog: * config/t-slibgcc-darwin: Generate libgcc_s with an @rpath name. * config.host: Handle Darwin rpaths. libgfortran/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths libgm2/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * libm2cor/Makefile.am: Handle Darwin rpaths. * libm2cor/Makefile.in: Regenerate. * libm2iso/Makefile.am: Handle Darwin rpaths. * libm2iso/Makefile.in: Regenerate. * libm2log/Makefile.am: Handle Darwin rpaths. * libm2log/Makefile.in: Regenerate. * libm2min/Makefile.am: Handle Darwin rpaths. * libm2min/Makefile.in: Regenerate. * libm2pim/Makefile.am: Handle Darwin rpaths. * libm2pim/Makefile.in: Regenerate. libgomp/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths libitm/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libobjc/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * libdruntime/Makefile.am: Handle Darwin rpaths. * libdruntime/Makefile.in: Regenerate. * src/Makefile.am: Handle Darwin rpaths. * src/Makefile.in: Regenerate. libquadmath/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libsanitizer/ChangeLog: * asan/Makefile.am: Handle Darwin rpaths. * asan/Makefile.in: Regenerate. * configure: Regenerate. * hwasan/Makefile.am: Handle Darwin rpaths. * hwasan/Makefile.in: Regenerate. * lsan/Makefile.am: Handle Darwin rpaths. * lsan/Makefile.in: Regenerate. * tsan/Makefile.am: Handle Darwin rpaths. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.am: Handle Darwin rpaths. * ubsan/Makefile.in: Regenerate. libssp/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libstdc++-v3/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * src/Makefile.am: Handle Darwin rpaths. * src/Makefile.in: Regenerate. libvtv/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. lto-plugin/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. zlib/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths.
2023-04-30libsanitizer: Apply local patchesMartin Liska3-21/+7
2023-04-30libsanitizer: merge from upstream (87e6e490e79384a5)Martin Liska3-7/+21
2023-04-26libsanitizer: Apply local patchesMartin Liska3-21/+7
2023-04-26libsanitizer: merge from upstream (3185e47b5a8444e9fd).Martin Liska18-289/+584
2023-02-24libsanitizer: cherry-pick commit 8f5962b1ccb5fcd4d4544121d43efb860ac3cc6d ↵Martin Liska2-3/+13
from upstream ASAN: keep support for Global::location We as GCC still emit __asan_global_source_location for global variables and we would like to use it in the future. On other hand, we don't support llvm-symbolizer and the default libbacktraace symbolizer does not support location info.
2022-11-15libsanitizer: Apply local patchesMartin Liska3-21/+7
2022-11-15libsanitizer: merge from upstream ae59131d3ef311fb4b1e50627c6457be00e60dc9Martin Liska12-33/+179
2022-08-30libsanitizer: Apply local patchesMartin Liska3-21/+7
2022-08-30libsanitizer: merge from master (84a71d5259c2682403cdbd8710592410a2f128ab)Martin Liska17-147/+195
2022-05-05libsanitizer: Apply local patchesMartin Liska3-21/+7
2022-05-05libsanitizer: merge from master (75f9e83ace52773af65dcebca543005ec8a2705d).Martin Liska3-7/+21
2022-05-04libsanitizer: Update Makefile.am files.Martin Liska1-1/+0
libsanitizer/ChangeLog: * tsan/Makefile.am: Update Makefile.am files. * hwasan/Makefile.am: Likewise. * sanitizer_common/Makefile.am: Likewise. * Makefile.in: Re-generate. * asan/Makefile.in: Likewise. * hwasan/Makefile.in: Likewise. * interception/Makefile.in: Likewise. * libbacktrace/Makefile.in: Likewise. * lsan/Makefile.in: Likewise. * sanitizer_common/Makefile.in: Likewise. * tsan/Makefile.in: Likewise. * ubsan/Makefile.in: Likewise.
2022-05-04libsanitizer: Apply local patchesH.J. Lu3-21/+7
2022-05-04libsanitizer: merge from upstream (0a1bcab9f3bf75c4c5d3e53bafb3eeb80320af46).Martin Liska29-364/+543
2022-02-03make `-Werror` optional in libatomic/libbacktrace/libgomp/libitm/libsanitizerDavid Seifert1-0/+2
* `-Werror` can cause issues when a more recent version of GCC compiles an older version: - https://bugs.gentoo.org/229059 - https://bugs.gentoo.org/475350 - https://bugs.gentoo.org/667104 libatomic/ChangeLog: * configure.ac: Support --disable-werror. * configure: Regenerate. libbacktrace/ChangeLog: * configure.ac: Support --disable-werror. * configure: Regenerate. libgomp/ChangeLog: * configure.ac: Support --disable-werror. * configure: Regenerate. libitm/ChangeLog: * configure.ac: Support --disable-werror. * configure: Regenerate. libsanitizer/ChangeLog: * configure.ac: Support --disable-werror. * aclocal.m4: Include also ../config/warnings.m4. * libbacktrace/Makefile.am (WARN_FLAGS): Remove. * configure: Regenerate. * Makefile.in: Regenerate. * asan/Makefile.in: Regenerate. * hwasan/Makefile.in: Regenerate. * interception/Makefile.in: Regenerate. * libbacktrace/Makefile.in: Regenerate. * lsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.in: Regenerate. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.in: Regenerate. Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
2021-11-28Fix PR 62157: disclean in libsanitizer not workingAndrew Pinski1-0/+1
So what is happening is DIST_SUBDIRS contains the conditional directories which is wrong, so we need to force DIST_SUBDIRS to be the same as SUBDIRS as recommened by the automake manual. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Also now make distclean works inside libsanitizer directory. libsanitizer/ChangeLog: PR sanitizer/62157 * Makefile.am: Force DIST_SUBDIRS to be SUBDIRS. * Makefile.in: Regenerate. * asan/Makefile.in: Likewise. * hwasan/Makefile.in: Likewise. * interception/Makefile.in: Likewise. * libbacktrace/Makefile.in: Likewise. * lsan/Makefile.in: Likewise. * sanitizer_common/Makefile.in: Likewise. * tsan/Makefile.in: Likewise. * ubsan/Makefile.in: Likewise.
2021-11-13libsanitizer: Apply local patchesH.J. Lu3-21/+7
2021-11-13libsanitizer: Merge with upstreamH.J. Lu5-106/+54
Merged revision: 82bc6a094e85014f1891ef9407496f44af8fe442 with the fix for PR sanitizer/102911
2021-11-05libsanitizer: Apply local patchesH.J. Lu3-21/+7
2021-11-05libsanitizer: merge from master (78d3e0a4f1406b17cdecc77540e09210670fe9a9).Martin Liska5-13/+29
2021-11-04libsanitizer: Apply local patchesH.J. Lu3-21/+7
2021-11-04libsanitizer: merge from master (c86b4503a94c277534ce4b9a5c015a6ac151b98a).Martin Liska12-50/+68
2021-10-08libsanitizer: Add AM_CCASFLAGS to Makefile.amH.J. Lu2-0/+2
commit 9069eb28d45baaa8baf5e3790b03b0e2cc5b49b3 Author: Igor Tsimbalist <igor.v.tsimbalist@intel.com> Date: Fri Nov 17 22:34:50 2017 +0100 Enable building libsanitizer with Intel CET libsanitizer/ * acinclude.m4: Add enable.m4 and cet.m4. * Makefile.in: Regenerate. * asan/Makefile.am: Update AM_CXXFLAGS. * asan/Makefile.in: Regenerate. * configure: Likewise. * configure.ac: Set CET_FLAGS. Update EXTRA_CFLAGS, EXTRA_CXXFLAGS, EXTRA_ASFLAGS. * interception/Makefile.am: Update AM_CXXFLAGS. * interception/Makefile.in: Regenerate. * libbacktrace/Makefile.am: Update AM_CFLAGS, AM_CXXFLAGS. * libbacktrace/Makefile.in: Regenerate. * lsan/Makefile.am: Update AM_CXXFLAGS. * lsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.am: Update AM_CXXFLAGS, AM_CCASFLAGS. * sanitizer_common/sanitizer_linux_x86_64.S: Include cet.h. Add _CET_ENDBR macro. * sanitizer_common/Makefile.in: Regenerate. * tsan/Makefile.am: Update AM_CXXFLAGS. * tsan/Makefile.in: Regenerate. * tsan/tsan_rtl_amd64.S Include cet.h. Add _CET_ENDBR macro. * ubsan/Makefile.am: Update AM_CXXFLAGS. * ubsan/Makefile.in: Regenerate. failed to add EXTRA_ASFLAGS to AM_CCASFLAGS in all Makefile.am. As the result, CET aren't enabled in all assembly codes. Add AM_CCASFLAGS to Makefile.am to compile assembly codes with $CET_FLAGS. PR sanitizer/102632 * asan/Makefile.am (AM_CCASFLAGS): New. Set to $(EXTRA_ASFLAGS). * hwasan/Makefile.am (AM_CCASFLAGS): Likewise. * interception/Makefile.am (AM_CCASFLAGS): Likewise. * lsan/Makefile.am (AM_CCASFLAGS): Likewise. * tsan/Makefile.am (AM_CCASFLAGS): Likewise. * ubsan/Makefile.am (AM_CCASFLAGS): Likewise. * asan/Makefile.in: Regenerate. * hwasan/Makefile.in: Likewise. * interception/Makefile.in: Likewise. * lsan/Makefile.in: Likewise. * tsan/Makefile.in: Likewise. * ubsan/Makefile.in: Likewise.
2021-10-06libsanitizer: Apply local patchesH.J. Lu3-21/+7
2021-10-06libsanitizer: Merge with upstreamH.J. Lu7-28/+26
Merged revision: fdf4c035225de52f596899931b1f6100e5e3e928
2021-10-01libsanitizer: Bump asan/tsan versionsH.J. Lu1-1/+1
Bump asan/tsan versions for upstream commits: commit f1bb30a4956f83e46406d6082e5d376ce65391e0 Author: Vitaly Buka <vitalybuka@google.com> Date: Thu Aug 26 10:25:09 2021 -0700 [sanitizer] No THREADLOCAL in qsort and bsearch qsort can reuse qsort_r if available. bsearch always passes key as the first comparator argument, so we can use it to wrap the original comparator. Differential Revision: https://reviews.llvm.org/D108751 commit d77b476c1953bcb0a608b2d6a4f2dd9fe0b43967 Author: Dmitry Vyukov <dvyukov@google.com> Date: Mon Aug 2 16:52:53 2021 +0200 tsan: avoid extra call indirection in unaligned access functions Currently unaligned access functions are defined in tsan_interface.cpp and do a real call to MemoryAccess. This means we have a real call and no read/write constant propagation. Unaligned memory access can be quite hot for some programs (observed on some compression algorithms with ~90% of unaligned accesses). Move them to tsan_interface_inl.h to avoid the additional call and enable constant propagation. Also reorder the actual store and memory access handling for __sanitizer_unaligned_store callbacks to enable tail calling in MemoryAccess. Depends on D107282. Reviewed By: vitalybuka, melver commit 97795be22f634667ce7a022398c59ccc9f7440eb Author: Dmitry Vyukov <dvyukov@google.com> Date: Fri Jul 30 08:35:11 2021 +0200 tsan: optimize test-only barrier The updated lots_of_threads.c test with 300 threads started running for too long on machines with low hardware parallelism (e.g. taskset -c 0-1). On lots of CPUs it finishes in ~2 secs. But with taskset -c 0-1 it runs for hundreds of seconds effectively spinning in the barrier in the sleep loop. We now have the handy futex API in sanitizer_common. Use it instead of the passive spin loop. It makes the test run only faster with taskset -c 0-1, it runs for ~1.5 secs, while with full parallelism it still runs for ~2 secs (but consumes less CPU time). Depends on D107131. Reviewed By: vitalybuka
2021-10-01libsanitizer: Apply local patchesH.J. Lu3-21/+7
2021-10-01libsanitizer: Merge with upstreamH.J. Lu9-66/+116
Merged revision: 1c2e5fd66ea27d0c51360ba4e22099124a915562
2021-07-20libsanitizer: Bump asan/tsan versionsH.J. Lu1-1/+1
Bump asan/tsan versions for the upstream commit: commit acf0a6428681dccac803984bfbb1e3e54248f090 Author: Ilya Leoshkevich <iii@linux.ibm.com> Date: Fri Jul 2 02:42:38 2021 +0200 [sanitizer] Fix __sanitizer_kernel_sigset_t endianness issue setuid(0) hangs on SystemZ under TSan because TSan's BackgroundThread ignores SIGSETXID. This in turn happens because internal_sigdelset() messes up the mask bits on big-endian system due to how __sanitizer_kernel_sigset_t is defined. Commit d9a1a53b8d80 ("[ESan] [MIPS] Fix workingset-signal-posix.cpp on MIPS") fixed this for MIPS by adjusting the __sanitizer_kernel_sigset_t definition. Generalize this by defining __SANITIZER_KERNEL_NSIG based on kernel's _NSIG and using uptr[] for __sanitizer_kernel_sigset_t.sig on all platforms. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D105629 which changed __sanitizer_kernel_sigset_t and changed the ABI for function void __sanitizer_syscall_post_impl_rt_sigaction (long int, long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*, SIZE_T); * asan/libtool-version: Bump version. * tsan/libtool-version: Likewise.
2021-07-20libsanitizer: Apply local patchesH.J. Lu3-21/+7
2021-07-20libsanitizer: Merge with upstreamH.J. Lu26-610/+192
Merged revision: 7704fedfff6ef5676adb6415f3be0ac927d1a746
2021-05-13libsanitizer: Apply local patches.Martin Liska3-21/+7
2021-05-13libsanitizer: merge from masterMartin Liska19-129/+149
Merged revision: f58e0513dd95944b81ce7a6e7b49ba656de7d75f
2021-03-08libsanitizer: cherry-pick ad294e572bc5c16f9dc420cc994322de6ca3fbfbMartin Liska2-1/+11
libsanitizer/ChangeLog: PR sanitizer/98920 * asan/asan_interceptors.cpp (COMMON_INTERCEPT_FUNCTION_VER): Cherry pick. (COMMON_INTERCEPT_FUNCTION_VER_UNVERSIONED_FALLBACK): Likewise. * asan/asan_interceptors.h (ASAN_INTERCEPT_FUNC_VER_UNVERSIONED_FALLBACK): Likewise. * sanitizer_common/sanitizer_common_interceptors.inc (COMMON_INTERCEPT_FUNCTION_GLIBC_VER_MIN): Likewise. (INIT_REGEX): Likewise. * tsan/tsan_interceptors_posix.cpp (COMMON_INTERCEPT_FUNCTION_VER_UNVERSIONED_FALLBACK): Likewise. gcc/testsuite/ChangeLog: PR sanitizer/98920 * c-c++-common/asan/pr98920.c: New test.
2020-11-25libsanitizer: Tie the hwasan library into our build systemMatthew Malcomson1-0/+1
This patch tries to tie libhwasan into the GCC build system in the same way that the other sanitizer runtime libraries are handled. libsanitizer/ChangeLog: * Makefile.am: Build libhwasan. * Makefile.in: Build libhwasan. * asan/Makefile.in: Build libhwasan. * configure: Build libhwasan. * configure.ac: Build libhwasan. * hwasan/Makefile.am: New file. * hwasan/Makefile.in: New file. * hwasan/libtool-version: New file. * interception/Makefile.in: Build libhwasan. * libbacktrace/Makefile.in: Build libhwasan. * libsanitizer.spec.in: Build libhwasan. * lsan/Makefile.in: Build libhwasan. * sanitizer_common/Makefile.in: Build libhwasan. * tsan/Makefile.in: Build libhwasan. * ubsan/Makefile.in: Build libhwasan.
2020-11-13libsanitizer: Apply local patches.Martin Liska3-21/+7
2020-11-13libsanitizer: merge from master.Martin Liska8-24/+58
2020-10-21ASAN: Support detect_invalid_pointer_pairs=1 with ↵Martin Liska1-1/+3
detect_stack_use_after_return=1 Do not crash when AsanThread::GetStackVariableShadowStart does not find a variable for a pointer on a shadow stack. Cherry-pick from ad2be02a833e56f7fe280797280b219eb3312621. Differential Revision: https://reviews.llvm.org/D89552
2020-10-16Reapply all revisions mentioned in LOCAL_PATCHES.Martin Liska3-21/+7
(cherry picked from commit 21bb1625bd4f183984223ce31bd03ba47ed62f27)
2020-10-16libsanitizer: merge from masterMartin Liska23-381/+470
2020-06-09libsanitizer: use gnu++14Martin Liska2-2/+2
libsanitizer/ChangeLog: * asan/Makefile.am: Replace gnu++11 with gnu++14. * interception/Makefile.am: Likewise. * libbacktrace/Makefile.am: Likewise. * lsan/Makefile.am: Likewise. * sanitizer_common/Makefile.am: Likewise. * tsan/Makefile.am: Likewise. * ubsan/Makefile.am: Likewise. * asan/Makefile.in: Regenerate. * interception/Makefile.in: Likewise. * libbacktrace/Makefile.in: Likewise. * lsan/Makefile.in: Likewise. * sanitizer_common/Makefile.in: Likewise. * tsan/Makefile.in: Likewise. * ubsan/Makefile.in: Likewise.
2020-06-02Reapply all revisions mentioned in LOCAL_PATCHES.Martin Liska3-21/+7
(cherry picked from commit 21bb1625bd4f183984223ce31bd03ba47ed62f27)
2020-06-02Libsanitizer: merge from master.Martin Liska5-7/+26
Merged from revision b638b63b99d66786cb37336292604a2ae3490cfd. The patch successfully bootstraps on x86_64-linux-gnu and ppc64le-linux-gnu. I also tested ppc64-linux-gnu that exposed: https://reviews.llvm.org/D80864 (which is fixed on master). Abidiff looks happy and I made UBSAN and ASAN bootstrap on x86_64-linux-gnu. I'm planning to do merge from master twice a year, once now and next time short before stage1 closes. I am going to install the patches as merge from master is obvious and I haven't made anything special. libsanitizer/ChangeLog: * MERGE: Merge from master.
2020-01-24Add `--with-toolexeclibdir=' configuration optionMaciej W. Rozycki1-0/+1
Provide means, in the form of a `--with-toolexeclibdir=' configuration option, to override the default installation directory for target libraries, otherwise known as $toolexeclibdir. This is so that it is possible to get newly-built libraries, particularly the shared ones, installed in a common place, so that they can be readily used by the target system as their host libraries, possibly over NFS, without a need to manually copy them over from the currently hardcoded location they would otherwise be installed in. In the presence of the `--enable-version-specific-runtime-libs' option and for configurations building native GCC the option is ignored. config/ * toolexeclibdir.m4: New file. gcc/ * doc/install.texi (Cross-Compiler-Specific Options): Document `--with-toolexeclibdir' option. libada/ * Makefile.in (configure_deps): Add `toolexeclibdir.m4'. * configure.ac: Handle `--with-toolexeclibdir='. * configure: Regenerate. libatomic/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libffi/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * include/Makefile.in: Regenerate. * man/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libgcc/ * Makefile.in (configure_deps): Add `toolexeclibdir.m4'. * configure.ac: Handle `--with-toolexeclibdir='. * configure: Regenerate. libgfortran/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libgomp/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libhsail-rt/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libitm/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/ * Makefile.in (aclocal_deps): Add `toolexeclibdir.m4'. * aclocal.m4: Include `toolexeclibdir.m4'. * configure.ac: Handle `--with-toolexeclibdir='. * configure: Regenerate. liboffloadmic/ * plugin/configure.ac: Handle `--with-toolexeclibdir='. * plugin/Makefile.in: Regenerate. * plugin/aclocal.m4: Regenerate. * plugin/configure: Regenerate. * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libphobos/ * m4/druntime.m4: Handle `--with-toolexeclibdir='. * m4/Makefile.in: Regenerate. * libdruntime/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libquadmath/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libsanitizer/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * asan/Makefile.in: Regenerate. * interception/Makefile.in: Regenerate. * libbacktrace/Makefile.in: Regenerate. * lsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.in: Regenerate. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.in: Regenerate. libssp/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libstdc++-v3/ * acinclude.m4: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * src/c++11/Makefile.in: Regenerate. * src/c++17/Makefile.in: Regenerate. * src/c++98/Makefile.in: Regenerate. * src/filesystem/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libvtv/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. zlib/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate.