Skip to content

Commit

Permalink
media-libs/libva: Fix build with LLD 17
Browse files Browse the repository at this point in the history
Upstream PR: intel/libva#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 <[email protected]>
  • Loading branch information
vimproved committed Jul 20, 2023
1 parent b77a5ac commit d61e35e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
29 changes: 29 additions & 0 deletions media-libs/libva/files/libva-2.19.0-undefined-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From https://github.com/intel/libva/pull/732/commits/48a1674e9d5b0ea33bc1677c88743c59f087ffde Mon Sep 17 00:00:00 2001
From: Violet Purcell <[email protected]>
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 <[email protected]>
--- 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

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions media-libs/libva/libva-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d61e35e

Please sign in to comment.