[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool and ASAN

From: Peter Rosin
Subject: Re: Libtool and ASAN
Date: Sat, 17 May 2014 03:36:30 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0


On 2014-04-28 17:45, Akim Demaille wrote:
> I'm trying to use -fsanitize=address on OS X using MacPorts' Clang++ 3.5.
> The project consists of C++ libraries, on top of which is built a Python
> module (with a thin C++ layer which needs to be compiled).  Libtool
> (2.4.2 - the name of a fine belgian band of electronic music btw)
> is used in all layers.
> To enable ASAN, I add '-fsanitize=address' to my CXXFLAGS.  It works well
> except for the C++ part of the Python module:


> What matters here is that -fsanitize=address is dropped, it is
> not passed to the linker.  And I really need it:


> I have to use -Wc to force Libtool to pass it to the compiler used
> to link (I must not use -Wl, because then it is passed to the linker
> invoked by the compiler, and the linker rejects -fsanitize).


> My other libraries, which are not modules, are linked properly though.
> For instance (the only relevant part is that -fsanitize is not stripped
> from the command passed to the linker):

This part I don't understand, is there perhaps a -fsanitize in one of the
dependent .la files?


> So what should I do?  Am I doing something wrong?  I'd like to avoid
> having to teach my package to configure itself with ASAN and the others,
> it should remain only a question of passing appropriate CXXFLAGS
> and other LDFLAGS to configure.
> Why does libtool strip these -f?  I could not find any instruction
> about this in the documentation.
> Thanks for reading (the English parts of this message :)!

This last part is an FAQ:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]