• Luca Barbato's avatar
    configure: Check for -no_weak_imports in ldflags on macOS · 81bffae3
    Luca Barbato authored
    Recent versions of macOS provide more POSIX API (in particular,
    clock_gettime) than previous versions and recent Apple toolchains
    provide all that API, even when targeting older releases without
    said API. Disallow linking to functions which might not be available
    at runtime.
    
    To actually have an effect, either add
    --extra-cflags="-mmacosx-version-min=10.11" (or any other version
    prior to 10.12) or set MACOSX_DEPLOYMENT_TARGET=10.11 when running
    configure.
    
    As a workaround for libav versions without this fix, one can
    also add --extra-cflags="-mmacosx-version-min=10.11
    -Werror=partial-availability" while running configure.
    
    The -no_weak_imports flag is new in Xcode 8; in Xcode 7 it is not
    supported. This is not an issue since Xcode 7 only ships with the
    10.11 macOS SDK, which lacks clock_gettime.
    
    Bug-Id: 1033
    
    CC: libav-stable@libav.org
    Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
    81bffae3
Name
Last commit
Last update
avbuild Loading commit data...
avtools Loading commit data...
compat Loading commit data...
doc Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...