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

Rémi Denis-Courmont remi at remlab.net
Wed Mar 15 15:46:09 CET 2017

On March 15, 2017 4:42:34 PM GMT+02:00, "Filip Roséen" <filip at atch.se> wrote:
>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
>> > 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,\

To be clear, I have no problems using all 3 sanitizers with both GCC and clang and without patching the build system. So I am unable to answer your question.
Rémi Denis-Courmont
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170315/aff0541f/attachment.html>

More information about the vlc-devel mailing list