On Thu, Oct 18, 2012 at 11:16 AM, Jakub Jelinek <ja...@redhat.com> wrote: > On Thu, Oct 18, 2012 at 09:46:36AM -0700, Wei Mi wrote: >> --- gcc/gcc.c (revision 192567) >> +++ gcc/gcc.c (working copy) >> @@ -679,6 +679,7 @@ proper position among the other output f >> %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ >> %(mflib) " STACK_SPLIT_SPEC "\ >> %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\ >> + %{fasan:-lasan -lpthread -ldl}\ >> %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ >> %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" >> #endif > > Sorry for not mentioning it earlier at once, but -lpthread -ldl shouldn't > be there either, the -fasan compiled code makes no direct calls to > -lpthread nor -ldl, just libasan. > > Jakub
Thanks, I move those options to libasan LDFLAGS. Wei.