|
| 1 | +From https://github.com/intel/libva/commit/17e07d17ba723a6b5822390afacdd3ccd976ecd2 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Violet Purcell < [email protected]> |
| 3 | +Date: Sun, 1 Oct 2023 16:34:19 -0400 |
| 4 | +Subject: [PATCH] va: Fix -Wl,--version-script check with LLD 17 |
| 5 | + |
| 6 | +LLD 17 uses --no-undefined-version by default, so the check currently |
| 7 | +fails due to vaCreateSurface being undefined. This commit replaces that |
| 8 | +check with a generic check in the top level meson.build, using the |
| 9 | +conftest.syms file. |
| 10 | + |
| 11 | +Signed-off-by: Violet Purcell < [email protected]> |
| 12 | +--- /dev/null |
| 13 | ++++ b/conftest.syms |
| 14 | +@@ -0,0 +1,6 @@ |
| 15 | ++VERSION_1 { |
| 16 | ++ global: |
| 17 | ++ main; |
| 18 | ++ local: |
| 19 | ++ *; |
| 20 | ++}; |
| 21 | +--- a/meson.build |
| 22 | ++++ b/meson.build |
| 23 | +@@ -87,6 +87,12 @@ dl_dep = cc.find_library('dl', required : false) |
| 24 | + WITH_DRM = not get_option('disable_drm') and (host_machine.system() != 'windows') |
| 25 | + libdrm_dep = dependency('libdrm', version : '>= 2.4.60', required : (host_machine.system() != 'windows')) |
| 26 | + |
| 27 | ++ld_supports_version_script = cc.links( |
| 28 | ++ 'int main() { return 0; }', |
| 29 | ++ name : '-Wl,--version-script', |
| 30 | ++ args : ['-shared', '-Wl,--version-script,' + '@0@/@1@'.format(meson.current_source_dir(), 'conftest.syms')] |
| 31 | ++) |
| 32 | ++ |
| 33 | + WITH_X11 = false |
| 34 | + if get_option('with_x11') != 'no' |
| 35 | + x11_dep = dependency('x11', required : get_option('with_x11') == 'yes') |
| 36 | +--- a/va/meson.build |
| 37 | ++++ b/va/meson.build |
| 38 | +@@ -60,7 +60,7 @@ libva_sym_arg = '-Wl,-version-script,' + '@0@/@1@'.format(meson.current_source_d |
| 39 | + |
| 40 | + libva_link_args = [] |
| 41 | + libva_link_depends = [] |
| 42 | +-if cc.links('', name: '-Wl,--version-script', args: ['-shared', libva_sym_arg]) |
| 43 | ++if ld_supports_version_script |
| 44 | + libva_link_args = libva_sym_arg |
| 45 | + libva_link_depends = libva_sym |
| 46 | + endif |
0 commit comments