media-video/ffmpeg: only add -latomic when supported by compiler/linker

Closes: https://bugs.gentoo.org/820095
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2021-10-25 01:05:47 +00:00
parent 5575d1e739
commit a0a2de862f
2 changed files with 10 additions and 2 deletions

View File

@@ -455,7 +455,7 @@ multilib_src_configure() {
if use arm || use ppc ; then
# bug #782811
# bug #790590
extra_libs+="-latomic "
extra_libs+="$(test-flags-CCLD -latomic) "
fi
set -- "${S}/configure" \

View File

@@ -59,7 +59,7 @@ LICENSE="
samba? ( GPL-3 )
"
if [ "${PV#9999}" = "${PV}" ] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
fi
# Options to use as use_enable in the foo[:bar] form.
@@ -450,6 +450,13 @@ multilib_src_configure() {
$(multilib_native_enable manpages)
)
local extra_libs
if use arm || use ppc ; then
# bug #782811
# bug #790590
extra_libs+="$(test-flags-CCLD -latomic) "
fi
set -- "${S}/configure" \
--prefix="${EPREFIX}/usr" \
--libdir="${EPREFIX}/usr/$(get_libdir)" \
@@ -464,6 +471,7 @@ multilib_src_configure() {
--ranlib="$(tc-getRANLIB)" \
--pkg-config="$(tc-getPKG_CONFIG)" \
--optflags="${CFLAGS}" \
--extra-libs="${extra_libs}" \
$(use_enable static-libs static) \
"${myconf[@]}" \
${EXTRA_FFMPEG_CONF}