diff mbox series

[FFmpeg-devel] configure: Only try to use the -no_warn_duplicate_libraries flag on Darwin

Message ID 20241014205015.52800-1-martin@martin.st
State New
Headers show
Series [FFmpeg-devel] configure: Only try to use the -no_warn_duplicate_libraries flag on Darwin | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed

Commit Message

Martin Storsjö Oct. 14, 2024, 8:50 p.m. UTC
While we only add the flag if the linker seems to support it,
it turns out that ld.bfd had a bug where the flag is accidentally
accepted, and the flag produces an output file named
"_warn_duplicate_libraries".

The ld.bfd bug was fixed in binutils 2.36, in
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=3991c7acb29aa8d7d52150695eb3efa03a08dd50.
---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Michael Niedermayer Oct. 14, 2024, 10:12 p.m. UTC | #1
On Mon, Oct 14, 2024 at 11:50:15PM +0300, Martin Storsjö wrote:
> While we only add the flag if the linker seems to support it,
> it turns out that ld.bfd had a bug where the flag is accidentally
> accepted, and the flag produces an output file named
> "_warn_duplicate_libraries".
> 
> The ld.bfd bug was fixed in binutils 2.36, in
> https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=3991c7acb29aa8d7d52150695eb3efa03a08dd50.
> ---
>  configure | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

LGTM

thx

PS: maybe "make disclean" should delete this file

[...]
diff mbox series

Patch

diff --git a/configure b/configure
index 8803148ab7..9f508a2527 100755
--- a/configure
+++ b/configure
@@ -6478,7 +6478,9 @@  check_cc intrinsics_sse2 emmintrin.h "__m128i test = _mm_setzero_si128()"
 
 check_ldflags -Wl,--as-needed
 check_ldflags -Wl,-z,noexecstack
-check_ldflags -Wl,-no_warn_duplicate_libraries
+if [ $target_os = "darwin" ]; then
+    check_ldflags -Wl,-no_warn_duplicate_libraries
+fi
 
 if ! disabled network; then
     check_func getaddrinfo $network_extralibs