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

Marvin Scholz epirat07 at gmail.com
Wed Mar 15 19:31:51 CET 2017



On 15 Mar 2017, at 15:46, Rémi Denis-Courmont wrote:

> 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
>> `--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,\
>> Filip
>
> 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.

I am not sure about other operating systems, but at least on macOS I am 
not aware of an easy way of using the address
sanitizer without the flag introduced by this patch.

> -- 
> Rémi Denis-Courmont_______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list