[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#646272: istgt: ftbs with ld --as-needed

Package: istgt
Version: 0.4~20110928-1
Severity: wishlist
Tags: patch
User: debian-gcc@lists.debian.org
Usertags: ld-as-needed

istgt fails to build with ld --as-needed.
With this flag objects needing symbols must be placed after libraries
providing them.
Else libraries will not be registered as needed, dropped and one gets
undefined references.

Attached a patch that fixes this issue by moving the LIBS variable in
src/Makefile.in to the correct position.
thanks for considering the patch.

Description: fix build with ld --as-needed
 With the linker flag --as-needed libraries must be placed
 behind objects needing their symbols on the commandline.
Author: Julian Taylor <jtaylor.debian@googlemail.com>

Index: istgt-0.4~20110928/src/Makefile.in
--- istgt-0.4~20110928.orig/src/Makefile.in	2011-10-22 19:05:03.000000000 +0000
+++ istgt-0.4~20110928/src/Makefile.in	2011-10-22 19:07:26.717895675 +0000
@@ -77,10 +77,10 @@
 all: stamp-depend config.h istgt istgtcontrol
 istgt: $(ISTGT)
-	$(CC) $(LDFLAGS) $(LIBS) -o $@ $(ISTGT)
+	$(CC) $(LDFLAGS) -o $@ $(ISTGT) $(LIBS)
 istgtcontrol: $(ISTGTCONTROL)
 install: install-dirs
 	install -c -m 0755 istgt $(DESTDIR)$(sbindir)

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: