From d61e35e95e854c9362bd17479b5311469aabbb44 Mon Sep 17 00:00:00 2001 From: Violet Purcell Date: Wed, 19 Jul 2023 22:28:47 -0400 Subject: [PATCH] media-libs/libva: Fix build with LLD 17 Upstream PR: https://github.com/intel/libva/pull/732 In the upcoming LLD 17 (and previously in LLD 16.0.0, but reverted in 16.0.1), --no-undefined-version is becoming the default behavior. This causes the configure check for --version-scripts support to fail due to the symbols in the version script not being defined, which will cause the version script to not be used, and the build will fail due to --no-undefined-version. This patch adds '-Wl,--undefined-version' to the args of the configure check. Signed-off-by: Violet Purcell --- .../libva-2.19.0-undefined-version.patch | 29 +++++++++++++++++++ ....18.0-r1.ebuild => libva-2.18.0-r2.ebuild} | 4 +++ ...a-2.19.0.ebuild => libva-2.19.0-r1.ebuild} | 4 +++ media-libs/libva/libva-9999.ebuild | 4 +++ 4 files changed, 41 insertions(+) create mode 100644 media-libs/libva/files/libva-2.19.0-undefined-version.patch rename media-libs/libva/{libva-2.18.0-r1.ebuild => libva-2.18.0-r2.ebuild} (95%) rename media-libs/libva/{libva-2.19.0.ebuild => libva-2.19.0-r1.ebuild} (95%) diff --git a/media-libs/libva/files/libva-2.19.0-undefined-version.patch b/media-libs/libva/files/libva-2.19.0-undefined-version.patch new file mode 100644 index 0000000000000..052aa1aed39c0 --- /dev/null +++ b/media-libs/libva/files/libva-2.19.0-undefined-version.patch @@ -0,0 +1,29 @@ +From https://github.com/intel/libva/pull/732/commits/48a1674e9d5b0ea33bc1677c88743c59f087ffde Mon Sep 17 00:00:00 2001 +From: Violet Purcell +Date: Wed, 19 Jul 2023 22:12:59 -0400 +Subject: [PATCH] va: fix configure check for --version-script with + --no-undefined-version + +In the upcoming LLD 17 (and previously in LLD 16.0.0, but reverted in 16.0.1), +--no-undefined-version is becoming the default behavior. This causes the +configure check for --version-scripts support to fail due to the symbols +in the version script not being defined, which will cause the version +script to not be used, and the build will fail due to +--no-undefined-version. This commit adds '-Wl,--undefined-version' to +the args of the configure check. + +Signed-off-by: Violet Purcell +--- 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 cc.links('', name: '-Wl,--version-script', args: ['-shared', '-Wl,--undefined-version', libva_sym_arg]) + libva_link_args = libva_sym_arg + libva_link_depends = libva_sym + endif +-- +2.41.0 + diff --git a/media-libs/libva/libva-2.18.0-r1.ebuild b/media-libs/libva/libva-2.18.0-r2.ebuild similarity index 95% rename from media-libs/libva/libva-2.18.0-r1.ebuild rename to media-libs/libva/libva-2.18.0-r2.ebuild index cf0503fdb3a55..78a9f8a469d5b 100644 --- a/media-libs/libva/libva-2.18.0-r1.ebuild +++ b/media-libs/libva/libva-2.18.0-r2.ebuild @@ -39,6 +39,10 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}/${PN}-2.19.0-undefined-version.patch" +) + MULTILIB_WRAPPED_HEADERS=( /usr/include/va/va_x11.h /usr/include/va/va_dri2.h diff --git a/media-libs/libva/libva-2.19.0.ebuild b/media-libs/libva/libva-2.19.0-r1.ebuild similarity index 95% rename from media-libs/libva/libva-2.19.0.ebuild rename to media-libs/libva/libva-2.19.0-r1.ebuild index 4f264beeabedd..ca75f60ae9fe5 100644 --- a/media-libs/libva/libva-2.19.0.ebuild +++ b/media-libs/libva/libva-2.19.0-r1.ebuild @@ -39,6 +39,10 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}/${PN}-2.19.0-undefined-version.patch" +) + MULTILIB_WRAPPED_HEADERS=( /usr/include/va/va_x11.h /usr/include/va/va_dri2.h diff --git a/media-libs/libva/libva-9999.ebuild b/media-libs/libva/libva-9999.ebuild index 4f264beeabedd..ca75f60ae9fe5 100644 --- a/media-libs/libva/libva-9999.ebuild +++ b/media-libs/libva/libva-9999.ebuild @@ -39,6 +39,10 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}/${PN}-2.19.0-undefined-version.patch" +) + MULTILIB_WRAPPED_HEADERS=( /usr/include/va/va_x11.h /usr/include/va/va_dri2.h