This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: r196201 - in /trunk: gcc/ChangeLog gcc/config/i...
On Fri, Feb 22, 2013 at 11:53:39AM +0400, Konstantin Serebryany wrote:
> Jakub, thanks again for cleaning up my mess.
>
> Here is a question regarding your fix:
> > -#if ASAN_USE_PREINIT_ARRAY
> > +#if ASAN_USE_PREINIT_ARRAY && !defined (PIC)
>
> The PIC macro is an artifact of the GCC build system and is not
> directly related the the -fPIC flag?
The PIC macro is an artifact of using libtool, which takes care of building
everything twice, once with -fPIC -DPIC, once without.
If we set up our Makefiles so that asan_preinit.cc isn't build as part of
libasan.la (the libtool library), but just as an object, then the PIC guard
isn't needed.
Jakub