Package: rsh-redone
Version: 85-1
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

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

  https://bugs.launchpad.net/ubuntu/+source/rsh-redone/+bug/771080

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.

--- rsh-redone-85.orig/Makefile
+++ rsh-redone-85/Makefile
@@ -22,13 +22,13 @@
        $(CC) $(CFLAGS) -o $@ $<
 
 in.rlogind: rlogind.c
-       $(CC) $(CFLAGS) -lutil -lpam -o $@ $<
+       $(CC) $(CFLAGS) -o $@ $< -lutil -lpam
 
 rsh: rsh.c
        $(CC) $(CFLAGS) -o $@ $<
 
 in.rshd: rshd.c
-       $(CC) $(CFLAGS) -lpam -o $@ $<
+       $(CC) $(CFLAGS) -o $@ $< -lpam
 
 install: install-bin install-sbin install-man install-pam
 

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