From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1333347-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E9814158086
	for <garchives@archives.gentoo.org>; Mon, 25 Oct 2021 01:06:19 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 36FA8E0828;
	Mon, 25 Oct 2021 01:06:19 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 18354E0828
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 Oct 2021 01:06:19 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 21B2234366F
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 Oct 2021 01:06:18 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 8B0E2162
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 Oct 2021 01:06:16 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1635123959.a0a2de862f66a5914234dd7561bc8dc63eb7e9ca.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-video/ffmpeg/ffmpeg-4.4-r1.ebuild media-video/ffmpeg/ffmpeg-9999.ebuild
X-VCS-Directories: media-video/ffmpeg/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: a0a2de862f66a5914234dd7561bc8dc63eb7e9ca
X-VCS-Branch: master
Date: Mon, 25 Oct 2021 01:06:16 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 72967494-b2a6-49c9-b6f5-817c3cee22ac
X-Archives-Hash: aa891c1e00c77f1a6c6aaae2653879ef

commit:     a0a2de862f66a5914234dd7561bc8dc63eb7e9ca
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 25 01:05:47 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 25 01:05:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0a2de86

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

Closes: https://bugs.gentoo.org/820095
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-video/ffmpeg/ffmpeg-4.4-r1.ebuild |  2 +-
 media-video/ffmpeg/ffmpeg-9999.ebuild   | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/media-video/ffmpeg/ffmpeg-4.4-r1.ebuild b/media-video/ffmpeg/ffmpeg-4.4-r1.ebuild
index 9dfdeaccd48..4f4969b7733 100644
--- a/media-video/ffmpeg/ffmpeg-4.4-r1.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.4-r1.ebuild
@@ -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" \

diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild
index 21212b25c0a..442b6f27b0f 100644
--- a/media-video/ffmpeg/ffmpeg-9999.ebuild
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -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}