diff options
author | Violet Purcell <vimproved@inventati.org> | 2023-10-12 15:20:50 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2024-05-06 10:40:05 -0400 |
commit | 6008de38ffbf328bb331f19a3ed71fda97af502d (patch) | |
tree | a0f50285b5830574d944b1e0f68756a56e7b9162 /media-libs/libva | |
parent | www-servers/lighttpd: drop 1.4.73 (diff) | |
download | gentoo-6008de38ffbf328bb331f19a3ed71fda97af502d.tar.gz gentoo-6008de38ffbf328bb331f19a3ed71fda97af502d.tar.bz2 gentoo-6008de38ffbf328bb331f19a3ed71fda97af502d.zip |
media-libs/libva: fix link with LLD 17
Upstream-PR: https://github.com/intel/libva/pull/732
Closes: https://bugs.gentoo.org/915200
Closes: https://github.com/gentoo/gentoo/pull/33314
Signed-off-by: Violet Purcell <vimproved@inventati.org>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-libs/libva')
-rw-r--r-- | media-libs/libva/files/libva-2.21.0-no-undefined-version.patch | 46 | ||||
-rw-r--r-- | media-libs/libva/libva-2.21.0.ebuild | 4 |
2 files changed, 50 insertions, 0 deletions
diff --git a/media-libs/libva/files/libva-2.21.0-no-undefined-version.patch b/media-libs/libva/files/libva-2.21.0-no-undefined-version.patch new file mode 100644 index 000000000000..007540bdb535 --- /dev/null +++ b/media-libs/libva/files/libva-2.21.0-no-undefined-version.patch @@ -0,0 +1,46 @@ +From https://github.com/intel/libva/commit/17e07d17ba723a6b5822390afacdd3ccd976ecd2 Mon Sep 17 00:00:00 2001 +From: Violet Purcell <vimproved@inventati.org> +Date: Sun, 1 Oct 2023 16:34:19 -0400 +Subject: [PATCH] va: Fix -Wl,--version-script check with LLD 17 + +LLD 17 uses --no-undefined-version by default, so the check currently +fails due to vaCreateSurface being undefined. This commit replaces that +check with a generic check in the top level meson.build, using the +conftest.syms file. + +Signed-off-by: Violet Purcell <vimproved@inventati.org> +--- /dev/null ++++ b/conftest.syms +@@ -0,0 +1,6 @@ ++VERSION_1 { ++ global: ++ main; ++ local: ++ *; ++}; +--- a/meson.build ++++ b/meson.build +@@ -87,6 +87,12 @@ dl_dep = cc.find_library('dl', required : false) + WITH_DRM = not get_option('disable_drm') and (host_machine.system() != 'windows') + libdrm_dep = dependency('libdrm', version : '>= 2.4.60', required : (host_machine.system() != 'windows')) + ++ld_supports_version_script = cc.links( ++ 'int main() { return 0; }', ++ name : '-Wl,--version-script', ++ args : ['-shared', '-Wl,--version-script,' + '@0@/@1@'.format(meson.current_source_dir(), 'conftest.syms')] ++) ++ + WITH_X11 = false + if get_option('with_x11') != 'no' + x11_dep = dependency('x11', required : get_option('with_x11') == 'yes') +--- a/va/meson.build ++++ b/va/meson.build +@@ -60,7 +60,7 @@ libva_sym_arg = '-Wl,-version-script,' + '@0@/@1@'.format(meson.current_source_d + + libva_link_args = [] + libva_link_depends = [] +-if cc.links('', name: '-Wl,--version-script', args: ['-shared', libva_sym_arg]) ++if ld_supports_version_script + libva_link_args = libva_sym_arg + libva_link_depends = libva_sym + endif diff --git a/media-libs/libva/libva-2.21.0.ebuild b/media-libs/libva/libva-2.21.0.ebuild index bb3076a9aee2..eb524d366807 100644 --- a/media-libs/libva/libva-2.21.0.ebuild +++ b/media-libs/libva/libva-2.21.0.ebuild @@ -48,6 +48,10 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/va/va_dricommon.h ) +PATCHES=( + "${FILESDIR}/libva-2.21.0-no-undefined-version.patch" +) + multilib_src_configure() { local emesonargs=( -Ddriverdir="${EPREFIX}/usr/$(get_libdir)/va/drivers" |