This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [asan] migrate runtime from llvm


Thanks for the comments. I create a dynamic linking libasan and update
the patch.

Thanks,
Wei.

ChangeLog:
2012-10-18   Wei Mi  <wmi@google.com>

migrate llvm runtime to asan branch
* configure.ac: Add libasan to target_libraries
* Makefile.def: Ditto
* configure: Regenerate
* Makefile.in: Regenerate
* libasan: New directory for asan runtime

gcc/ChangeLog:
2012-10-18   Wei Mi  <wmi@google.com>

link pthread and dynamic load library
* gcc/gcc.c: Add -lasan -lpthread -ldl to link command if -fasan is on

On Tue, Oct 16, 2012 at 12:27 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> 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

Attachment: patch.wo.libasan.txt
Description: Text document

Attachment: patch.txt.bz2
Description: BZip2 compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]