Hello, The following diff makes it possible for ffmpeg to be linked on loongson (it used to give "ld: final link failed: Bad value", see [1]), and probably sgi too (though I couldn't test this one).
This is done by removing the call to "-Wl,-Bsymbolic" on mips targets. I'm not really sure to understand the effects of removing -Bsymbolic, but the resulting binary works fine for me on loongson. No REVISION bump since it only affects the archs on which it didn't build. [1] http://marc.info/?l=openbsd-ports&m=132691957332463&w=2 Index: patches/patch-configure =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-configure,v retrieving revision 1.31 diff -u -p -r1.31 patch-configure --- patches/patch-configure 12 Sep 2012 08:15:57 -0000 1.31 +++ patches/patch-configure 29 Sep 2012 10:27:32 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-configure,v 1.31 2012/09/12 08:15:57 ajacoutot Exp $ ---- configure.orig Sun Jun 10 00:59:57 2012 -+++ configure Tue Sep 11 22:47:01 2012 +--- configure.orig Sun Jun 10 06:59:57 2012 ++++ configure Sat Sep 29 12:25:43 2012 @@ -1092,7 +1092,6 @@ HAVE_LIST=" lzo1x_999_compress machine_ioctl_bt848_h @@ -35,7 +35,17 @@ $OpenBSD: patch-configure,v 1.31 2012/09 enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame enabled libnut && require libnut libnut.h nut_demuxer_init -lnut enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb -@@ -3075,10 +3075,6 @@ fi +@@ -3058,7 +3058,8 @@ enabled extra_warnings && check_cflags -Winline + # add some linker flags + check_ldflags -Wl,--warn-common + check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil +-test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic ++# Avoid "/usr/bin/ld: final link failed: Bad value" with old binutils on mips ++! enabled mips && test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic + + echo "X{};" > $TMPV + if test_ldflags -Wl,--version-script,$TMPV; then +@@ -3075,10 +3076,6 @@ fi if enabled small; then add_cflags $size_cflags @@ -46,7 +56,7 @@ $OpenBSD: patch-configure,v 1.31 2012/09 fi check_cflags -fno-math-errno check_cflags -fno-signed-zeros -@@ -3506,6 +3502,7 @@ comment=$2 +@@ -3506,6 +3503,7 @@ comment=$2 version=$3 libs=$4 requires=$5 @@ -54,7 +64,7 @@ $OpenBSD: patch-configure,v 1.31 2012/09 enabled ${name#lib} || return 0 cat <<EOF > $name/$name.pc prefix=$prefix -@@ -3519,7 +3516,7 @@ Version: $version +@@ -3519,7 +3517,7 @@ Version: $version Requires: $(enabled shared || echo $requires) Requires.private: $(enabled shared && echo $requires) Conflicts: @@ -63,7 +73,7 @@ $OpenBSD: patch-configure,v 1.31 2012/09 Libs.private: $(enabled shared && echo $libs) Cflags: -I\${includedir} EOF -@@ -3539,10 +3536,10 @@ Cflags: -I\${includedir} +@@ -3539,10 +3537,10 @@ Cflags: -I\${includedir} EOF }