[vlc-devel] [PATCH] configure: do not use wordexp on iOS/tvOS

Marvin Scholz epirat07 at gmail.com
Thu Dec 3 13:20:48 CET 2020


Hi,

On 3 Dec 2020, at 12:15, Rémi Denis-Courmont wrote:

> Hi,
>
> Is that not usually put in the shell script so that it works on all 
> configure scripts?
>

Usually yes but for this function, its never available for iOS,
so without this it would not compile at all for armv7 iOS anymore
without the script.

The script is mostly to cover symbols that are not available on
older versions of macOS/iOS, so its not really needed to always
use it, so I would really like to not make it a mandatory part of
the VLC build on macOS/iOS.

Of course once a contrib would start to use wordexp it would become
necessary to have it in the script or somewhere else for these, but
so far nothing uses it and we can always change the approach once
that happens.

> And why is this needed anyway in this specific case?

The symbol is unavailable on iOS (marked as
__attribute__((availability(ios,unavailable))))
(see https://clang.llvm.org/docs/AttributeReference.html#availability
for the reference for these attributes) so it would fail
compilation when used. Usually these symbols are not included
in the library stubs that the linker uses either, but in this
case on armv7, for whatever reason, maybe legacy compatibility
with internal Apple Frameworks or simply an oversight, it is.

So a pure link test would report the symbol as available even
though its not considered usable on iOS. (Using it anyway
ignoring the unavailable annotation would likely just fail
loading with the non-stub library or at least be rejected
in the AppStore for private API usage).

>
> Le 2 décembre 2020 16:13:14 GMT+02:00, Marvin Scholz 
> <epirat07 at gmail.com> a écrit :
>> ---
>> configure.ac | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index e67bb7e2966..2b4e5741ef3 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -213,7 +213,8 @@ case "${host_os}" in
>>              #if TARGET_OS_IPHONE
>>              yes
>>              #endif],
>> -             [HAVE_IOS="1"],
>> +             [HAVE_IOS="1"
>> +             ac_cv_func_wordexp=no],
>>              [HAVE_OSX="1"])
>>
>>     AC_EGREP_CPP(yes,
>> -- 
>> 2.24.3 (Apple Git-128)
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez 
> excuser ma brièveté.




More information about the vlc-devel mailing list