aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/gnu-user.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-09-01 10:26:51 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2014-09-01 10:26:51 +0200
commitd30c76701b519e907beaaf4e4fd4ca6de2b26dbd (patch)
treee99be9eec3bb353d4ac609a30342379cde47ff6a /gcc/config/gnu-user.h
parenta2f581e1429356d7074814a514056ed3c23a5881 (diff)
downloadgcc-d30c76701b519e907beaaf4e4fd4ca6de2b26dbd.zip
gcc-d30c76701b519e907beaaf4e4fd4ca6de2b26dbd.tar.gz
gcc-d30c76701b519e907beaaf4e4fd4ca6de2b26dbd.tar.bz2
gnu-user.h (LIBLSAN_EARLY_SPEC): Define.
* config/gnu-user.h (LIBLSAN_EARLY_SPEC): Define. * gcc.c (LIBLSAN_SPEC, LIBLSAN_EARLY_SPEC): Follow LIBTSAN*_SPEC. (SANITIZER_EARLY_SPEC): Include LIBLSAN_EARLY_SPEC for -fsanitize=leak. From-SVN: r214778
Diffstat (limited to 'gcc/config/gnu-user.h')
-rw-r--r--gcc/config/gnu-user.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index a1955a7..9b46621 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -114,7 +114,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* Link -lasan early on the command line. For -static-libasan, don't link
it for -shared link, the executable should be compiled with -static-libasan
in that case, and for executable link link with --{,no-}whole-archive around
- it to force everything into the executable. And similarly for -ltsan. */
+ it to force everything into the executable. And similarly for -ltsan
+ and -llsan. */
#if defined(HAVE_LD_STATIC_DYNAMIC)
#undef LIBASAN_EARLY_SPEC
#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
@@ -125,4 +126,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
+#undef LIBLSAN_EARLY_SPEC
+#define LIBLSAN_EARLY_SPEC "%{static-liblsan:%{!shared:" \
+ LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \
+ LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}"
#endif