This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING^2] [PATCH] PR59063
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: gcc-patches at gcc dot gnu dot org, eugeni dot stepanov at gmail dot com, VandeVondele Joost <joost dot vandevondele at mat dot ethz dot ch>, Evgeny Gavrin <e dot gavrin at samsung dot com>, Viacheslav Garbuzov <v dot garbuzov at samsung dot com>
- Date: Wed, 27 Nov 2013 08:17:09 +0100
- Subject: Re: [PING^2] [PATCH] PR59063
- Authentication-results: sourceware.org; auth=none
- References: <52831CF2 dot 1020203 at samsung dot com> <528C5453 dot 3020408 at samsung dot com> <529592F9 dot 3050209 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 27, 2013 at 10:36:41AM +0400, Yury Gribov wrote:
> > This patch is supposed to fix PR59063
> (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59063).
> >
> > The original bug results from libasan providing clock_gettime
> wrapper and then trying to call the "real" clock_gettime.
> > The "real" symbol is supposed to come from librt.so which was not
> necessarily linked to executable. The net result is a NULL call.
> >
> > Patch is based on Evgeniy Stepanov's and Jakub's suggestions in
> bugzilla discussion. It instructs frontend to add -lrt on static
> Asan compilation and also links dynamic libasan.so against librt.so.
> >
> > This was tested against gcc asan testsuite on x86_64.
>
> Original post: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01389.html
I don't like the unconditional -lrt added for -static-lib*san (note, you
need it for both -static-lib{a,t}san). Perhaps it is time for
libsanitizer.spec filled in during configure of libsanitizer that
the spec would source in? Look at how libgomp.spec, or libitm.spec or
libjava.spec are created and used. It could be one libsanitizer.spec
with rules for all the individual libraries.
Jakub