ffmpeg: fix build with XCode 15 (#40187)

As reported in #40159, a shared library build of ffmpeg 6.0 fails with the linker that was added with XCode 15:
ld: building exports trie: duplicate symbol '_av_ac3_parse_header'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Forcing the old linker with -Wl,-ld_classic works around this.
This commit is contained in:
Martin Aumüller 2023-09-27 16:41:32 +02:00 committed by GitHub
parent 1cd2d07f0b
commit bb66d15d08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,6 +128,10 @@ def headers(self):
headers.directories = [self.prefix.include]
return headers
@when("@:6.0 %apple-clang@15:")
def setup_build_environment(self, env):
env.append_flags("LDFLAGS", "-Wl,-ld_classic")
def enable_or_disable_meta(self, variant, options):
switch = "enable" if "+{0}".format(variant) in self.spec else "disable"
return ["--{0}-{1}".format(switch, option) for option in options]