[vlc-devel] [PATCH v2 13/17] contrib: use makefile instead of environment variable
ajanni at videolabs.io
Thu Apr 30 12:11:52 CEST 2020
On Thu, Apr 30, 2020 at 12:47:44PM +0300, Martin Storsjö wrote:
> On Thu, 30 Apr 2020, Rémi Denis-Courmont wrote:
> > Instead of building with the SDK for the target lowest version, they build
> > with the newest, so autoconf correctly detects stuff that's in the SDK but
> > not the target.
> Yeah, that's a known dilemma.
> In general, it's possible to get build systems that test for availability to
> behave in these situations though - I'm pretty sure the contribs build
> system already specifies -miphoneos-version-min somewhere.
Indeed, as Apple likes umbrella things (framework, headers,
sdk, clang, fatlibrary, etc), tools have to account that and
while the SDK is newer, it still exposes versionned variants.
The main pain point is to have the headers included during
the availability test iiuc ePirat on this.
I don't thing contribs adds -miphoneos-version-min but
apple build script definitively does, and maybe you can
use environment variable like on MacOSX too if you don't
want neither to use the buildscript nor to add the flags
> By adding -Werror=partial-availability on top of that, function checks that
> actually include headers (instead of just blindly trying to link against a
> symbol) will error out for functions that are introduced after the minimum
> This is just a FYI (and potential future improvement) in any case and
> orthogonal to the patch, which just moves the existing hacks around.
I think ePirat spent a lot of time on this issue and even
had apple engineer telling him that it cannot be supported
that way by autotools, so it's probably harder to integrate.
He also has multiple PR around this issue in meson, like 
so the final goal is indeed to remove such hacks in the
future for VLC at least.
More information about the vlc-devel