Package: scheme48
Version: 1.8+dfsg-1
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

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

  https://bugs.launchpad.net/ubuntu/+source/scheme48/+bug/832929

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 -u scheme48-1.8+dfsg/debian/patches/series 
scheme48-1.8+dfsg/debian/patches/series
--- scheme48-1.8+dfsg/debian/patches/series
+++ scheme48-1.8+dfsg/debian/patches/series
@@ -9,0 +10 @@
+link-order.diff
only in patch2:
unchanged:
--- scheme48-1.8+dfsg.orig/debian/patches/link-order.diff
+++ scheme48-1.8+dfsg/debian/patches/link-order.diff
@@ -0,0 +1,20 @@
+Description: List libraries after the objects that require them
+Author: Colin Watson <cjwat...@ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/832929
+Forwarded: no
+Last-Update: 2011-09-18
+
+Index: b/Makefile.in
+===================================================================
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -286,8 +286,7 @@
+       c/scheme48.exp c/scheme48.def
+       $(CC) $(LDFLAGS) $(LDFLAGS_VM) $(CFLAGS) -o $@ c/main.o         \
+               $(OBJS) $(GC_OBJS) $(UNIX_OBJS)                         \
+-              $(LIBOBJS) $(LIBS)                                      \
+-              $(EXTERNAL_OBJECTS)
++              $(LIBOBJS) $(EXTERNAL_OBJECTS) $(LIBS)
+       # Cygwin
+       if test -x /usr/bin/dlltool; then \
+               dlltool --dllname $(VM).exe --output-lib $(VM).a --def 
$(srcdir)/c/scheme48.def; \

Thanks,

-- 
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