On Thu, Nov 22, 2012 at 06:39:11AM -0800, H.J. Lu wrote: > fsanitize=address doesn't work with static link. This patch issues > an error when both are specified. OK to install?
> 2012-11-22 H.J. Lu <hongjiu...@intel.com> > > PR driver/55379 Replace driver/ with sanitizer/ > * gcc.c (LINK_COMMAND_SPEC): Issue an error for -static with > -fsanitize=address. Ok with that change. > diff --git a/gcc/gcc.c b/gcc/gcc.c > index 0f8bcea..41474aa 100644 > --- a/gcc/gcc.c > +++ b/gcc/gcc.c > @@ -696,7 +696,7 @@ proper position among the other output files. */ > %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ > %(mflib) " STACK_SPLIT_SPEC "\ > %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\ > - %{fsanitize=address:" LIBASAN_SPEC "}\ > + %{fsanitize=address:" LIBASAN_SPEC "%{static:%ecannot specify -static > with -fsanitize=address}}\ > %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ > %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" > #endif Jakub