[vlc-devel] [PATCH] contrib: don't pass compiler environment variables to Meson when cross compiling

Marvin Scholz epirat07 at gmail.com
Tue Dec 17 15:23:28 CET 2019



On 17 Dec 2019, at 15:18, Steve Lhomme wrote:

> On 2019-12-17 15:15, Steve Lhomme wrote:
>> On 2019-12-17 15:11, Alexandre Janniaux wrote:
>>> Hi,
>>>
>>> This is a variation over patches from Marvin there, after
>>> meson has been fixed to support this correctly:
>>>
>>> https://mailman.videolan.org/pipermail/vlc-devel/2019-September/127942.html
>>
>> Yes, but only Meson is affected here.
>>
>> If all these variables are triggering the use of environment 
>> variables in Meson, it might be worth disabling them as well.
>
> In the Meson logs I only see this:
> No CFLAGS in the environment, not changing global flags.
> No LDFLAGS in the environment, not changing global flags.
> No CPPFLAGS in the environment, not changing global flags.
>

This is supposed to be done in HOSTVARS_MESON in my opinion, please see 
the
patches I am about to send.

>
>>> LGTM for me,
>>>
>>> Regards,
>>> -- 
>>> Alexandre Janniaux
>>> Videolabs
>>>
>>> On Tue, Dec 17, 2019 at 02:50:29PM +0100, Steve Lhomme wrote:
>>>> This patch makes the "package/win32: use VLC_EXTRA_CFLAGS 
>>>> environment
>>>> variable" patch unneeded.
>>>>
>>>> Only the extra compiler flags can be added separately. It also 
>>>> makes the use
>>>> of CFLAGS in the environment work safely when cross compiling with 
>>>> Meson
>>>> (they are in the cross compiler).
>>>>
>>>> Thanks to Alexandre Janniaux and Marvin Scholz for the help.
>>>>
>>>> On 2019-12-17 14:46, Steve Lhomme wrote:
>>>>> So it doesn't try to use them with the native compiler
>>>>> ---
>>>>>    contrib/src/main.mak | 11 ++++++-----
>>>>>    1 file changed, 6 insertions(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
>>>>> index 7d701626ba4..575f8548144 100644
>>>>> --- a/contrib/src/main.mak
>>>>> +++ b/contrib/src/main.mak
>>>>> @@ -410,17 +410,18 @@ ifeq ($(V),1)
>>>>>    CMAKE += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
>>>>>    endif
>>>>> -MESON = meson --default-library static --prefix "$(PREFIX)" 
>>>>> --backend ninja \
>>>>> -    -Dlibdir=lib
>>>>> +ifdef HAVE_CROSS_COMPILE
>>>>> +MESON = CFLAGS= CXXFLAGS= LDFLAGS= CPPFLAGS= meson --cross-file 
>>>>> $(abspath crossfile.meson)
>>>>> +else
>>>>> +MESON = meson
>>>>> +endif
>>>>> +MESON += --default-library static --prefix "$(PREFIX)" --backend 
>>>>> ninja -Dlibdir=lib
>>>>>    ifndef WITH_OPTIMIZATION
>>>>>    MESON += --buildtype debug
>>>>>    else
>>>>>    MESON += --buildtype release
>>>>>    endif
>>>>> -ifdef HAVE_CROSS_COMPILE
>>>>> -MESON += --cross-file $(abspath crossfile.meson)
>>>>> -endif
>>>>>    ifdef GPL
>>>>>    REQUIRE_GPL =
>>>>> -- 
>>>>> 2.17.1
>>>>>
>>>>> _______________________________________________
>>>>> vlc-devel mailing list
>>>>> To unsubscribe or modify your subscription options:
>>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>>>
>>>> _______________________________________________
>>>> vlc-devel mailing list
>>>> To unsubscribe or modify your subscription options:
>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> 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