Hi!
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:
*snip*
> What matters here is that -fsanitize=address is dropped, it is
> not passed to the linker. And I really need it:
*snap*
> 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).
*snep*
> 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?
*snyp*
> 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:
http://www.gnu.org/software/libtool/manual/libtool.html#FAQ
Cheers,
Peter
___
https://lists.gnu.org/mailman/listinfo/libtool