[vlc-devel] [PATCH 1/2] configure: allow toggling of -Wl, -z, defs and -no-undefined

Filip Roséen filip at atch.se
Wed Mar 15 15:42:34 CET 2017

Hi Rémi,

On 2017-03-15 16:28, Rémi Denis-Courmont wrote:

> On mercredi 15 mars 2017 15:24:06 EET Filip Roséen wrote:
> > A developer should know his/her platform well enough to be able to
> > manually specify the sanitizer flags, which `--disable-no-undefined`
> > allows.
> A developer should know his/her platform well enough to handle sanitizers with 
> the --no-undefined option.

So you are saying that those who wants to use the sanitizer with a
shall manually patch `configure.ac` and the relevant `Makefile.am` in
order to remove the usage of `-Wl,-z,defs` and `-no-undefined` in
order to achieve satisfying sanitizer usage?

Or specify complicated flags just to circumvent the fact that we now
unconditionally add flags on platform where they apply, but silently
ignore them on platforms that says they do not.

If we want to have developers to really fight in order
to use a sanitizer, or prevent `-Wl,-z,defs` and `-no-undefined` from
being able to easily test functions from out-of-tree objects (which
greatly simplies things such as benchmarks of individual functions, at
least in my opinion), I guess one also **could** replace the linker
with a wrapper that pretends that it does not understand the relevant
flags, and have a "clean" build without `-Wl,-z,defs`.

> I agree that an option for sanitizers is not very useful insofar as it will be 
> disabled by default. Afterall, those who know about it, would also know how to 
> do it manually. Well then there are no needs to change anything at all. Easy.

I did not say that the option for sanitizer would not be very useful.
My fear is that it will be more complex to implement than to allow
developers to specify `--disable-no-undefined` and setting the
*simple* flags themselves.

Also, as mentioned, if `--enable-sanitizer=...` is allowed to disable
the usage of `-Wl,-z,defs` and `-no-undefined` I cannot understand why
such would be allowed, but not this patch.

Best Regards,\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170315/f6c77813/attachment.html>

More information about the vlc-devel mailing list