On Mon, Oct 15, 2012 at 11:39:52PM -0700, Wei Mi wrote:
> --- gcc/gcc.c (revision 192487)
> +++ 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|coverage:-lasan -lpthread -ldl -lstdc++}\
> %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
> %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
Why the |coverage there? It isn't related to asan in any way.
Also, why -lstdc++ in there? I could understand %{static:-lstdc++}, but
given that libasan doesn't support static linking, I find it hardly useful.
> --- Makefile.def (revision 192487)
> +++ Makefile.def (working copy)
> @@ -119,6 +119,7 @@ target_modules = { module= libstdc++-v3;
> lib_path=src/.libs;
> raw_cxx=true; };
> target_modules = { module= libmudflap; lib_path=.libs; };
> +target_modules = { module= libasan; lib_path=.libs; };
> target_modules = { module= libssp; lib_path=.libs; };
> target_modules = { module= newlib; };
> target_modules = { module= libgcc; bootstrap=true; no_check=true; };
Shouldn't libasan, given it is a C++ shared library, depend on libstdc++-v3?
Jakub