On Fri, Nov 30, 2012 at 5:30 AM, Richard Biener
<richard.guent...@gmail.com> wrote:
> On Fri, Nov 30, 2012 at 2:17 PM, H.J. Lu <hjl.to...@gmail.com> wrote:
>> On Fri, Nov 30, 2012 at 12:45 AM, Richard Biener
>> <richard.guent...@gmail.com> wrote:
>>> On Thu, Nov 29, 2012 at 6:40 PM, H.J. Lu <hongjiu...@intel.com> wrote:
>>>> Hi,
>>>>
>>>> When GCC is configured with --with-build-config="bootstrap-asan", all
>>>> -flto tests will fail since -fsanitize=address is used to compile host
>>>> libiberty, which is used to create liblto_plugin.so, and linker isn't
>>>> compiled with -fsanitize=address.  This patch filters out
>>>> -fsanitize=address from CFLAGS if we aren't in a combined tree with
>>>> binutils.  OK to install?
>>>
>>> Why not simply ensure that only host _executables_ are sanitized?
>>>
>>
>> Host libiberty library is used to create both host executables and
>> host plugins. We don't have separate host libiberty libraries for them.
>
> So don't instrument libiberty then.
>

When you bootstrap, all host libraries are compiled with the
same CFLAGS as gcc itself in 3 stages.  That means stage2
and stage3 libiberty are compiled with -fsanitize=address if
it is added to stage2/stage3 CFLAGS for gcc.  My patch filters it
out when compiling stage2/stage3 libiberty.

-- 
H.J.

Reply via email to