On Tue, Nov 13, 2012 at 03:06:56PM +0100, Dodji Seketeli wrote:
> Jakub Jelinek <ja...@redhat.com> writes:
> 
> > On Tue, Nov 13, 2012 at 02:17:55PM +0100, Dodji Seketeli wrote:
> >> What do the maintainers think?
> >
> > Yes.  And it shouldn't be just based on target CPU, but also based
> > on target OS, I don't think libsanitizer supports anything but linux (glibc
> > + maybe android) right now, with some smaller or bigger tweaks it could
> > support darwin (but see the reports that it doesn't build there right now)
> > or mingw/cygwin? (but there is a PR that it doesn't build there).
> > So IMHO it should be a whitelist of supported targets with *) case
> > adding noconfigdirs="$noconfigdirs target-libsanitizer", rather than
> > blacklist of few unsupported ones.  Can you please prepare a patch?
> 
> Sure, will do.
> 
> -- 
>               Dodji

Dodji,
   I don't think darwin is very far from having usable asan support. Basically
we need the following changes...

1) The missing libsanitizer/interception/mach_override subdirectory with the 
files...

LICENSE.TXT     Makefile.mk     README.txt      mach_override.c mach_override.h

needs to be imported from compiler-rt's git.

2) In libsanitizer/interception, mach_override/mach_override.c needs to be
added to interception_files and in libsanitizer/asan, the resulting object code
in libsanitizer/interception/mach_override/mach_override.o needs to be linked
into libasan.a and libasan.dylib.

3) In gcc/config/darwin.h, we need to add an entry to LINK_COMMAND_SPEC_A for
faddress-sanitizer to automatically pass -framework CoreFoundation -lasan to
the linker.
          Jack

Reply via email to