This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Handle -fsanitize=leak more similarly to address/thread
- From: Dodji Seketeli <dodji at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 17 Aug 2014 12:16:55 +0200
- Subject: Re: [PATCH] Handle -fsanitize=leak more similarly to address/thread
- Authentication-results: sourceware.org; auth=none
- References: <20140814163748 dot GI1784 at tucnak dot redhat dot com>
Jakub Jelinek <jakub@redhat.com> writes:
> Right now when -fsanitize=leak adds -llsan, it adds it late on the command
> line, so e.g. -lstdc++ comes after it, which seems to be bad.
> The following patch puts it early on the link command line like we do for
> -lasan or -ltsan. Bootstrapped/regtested on x86_64-linux and i686-linux,
> ok for trunk?
>
> 2014-08-14 Jakub Jelinek <jakub@redhat.com>
>
> * 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.
This looks OK to me.
Thanks!
--
Dodji