Package: oggfwd
Version: 0.2-5
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

oggfwd fails to build with a linker that defaults to --as-needed, as
shown in this Ubuntu bug report:

  https://bugs.launchpad.net/ubuntu/+source/oggfwd/+bug/771102

This is because of incorrect link ordering: it puts libraries before the
objects that use them rather than after.  See:

  http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries

The following patch fixes this.

  * Fix link order to list libraries after the objects that require them.

diff -Nru oggfwd-0.2/debian/patches/003_link_order.patch 
oggfwd-0.2/debian/patches/003_link_order.patch
--- oggfwd-0.2/debian/patches/003_link_order.patch      1970-01-01 
01:00:00.000000000 +0100
+++ oggfwd-0.2/debian/patches/003_link_order.patch      2011-09-13 
12:36:42.000000000 +0100
@@ -0,0 +1,19 @@
+Description: List libraries after the objects that require them
+Author: Colin Watson <cjwat...@ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/771102
+Forwarded: no
+Last-Update: 2011-09-13
+
+Index: b/Makefile
+===================================================================
+--- a/Makefile
++++ b/Makefile
+@@ -20,7 +20,7 @@
+ all: ${PROG}
+ 
+ ${PROG}: ${SRC}
+-      ${CC} ${CFLAGS} ${PTHREADFLAGS} ${INCLUDEFLAGS} ${LINKFLAGS} -o ${PROG} 
$<
++      ${CC} ${CFLAGS} ${PTHREADFLAGS} ${INCLUDEFLAGS} -o ${PROG} $< 
${LINKFLAGS}
+ 
+ install: ${PROG}
+       ${INSTALL} -c -m 555 -o root -g bin ${PROG} ${BINDIR}
diff -Nru oggfwd-0.2/debian/patches/series oggfwd-0.2/debian/patches/series
--- oggfwd-0.2/debian/patches/series    2009-12-17 13:28:15.000000000 +0000
+++ oggfwd-0.2/debian/patches/series    2011-09-13 12:35:22.000000000 +0100
@@ -1,2 +1,3 @@
 001_remove_unnecessary_linked_libraries.patch
 002_oggfwd-exit-status.patch
+003_link_order.patch

-- 
Colin Watson                                       [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to