tags 622051 + patch
user debian-...@lists.debian.org
usertags 622051 + ld-as-needed
thanks

attached patch 08 fixes the problem introduced by
--no-add-needed/--no-copy-dt-needed by explicitly linking against the
needed libz and libdl
patch 09 orders the command line correctly so it also builds with ld
--as-needed. Please also add this patch, as the wrong ordering leads to
build failures in ubuntu oneiric where this flag is default.
Description: explicitly link with needed libz and libdl
 required when building with ld --no-add-needed
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622051
Author: Julian Taylor <jtaylor.deb...@googlemail.com>
Index: isakmpd-20041012/GNUmakefile
===================================================================
--- isakmpd-20041012.orig/GNUmakefile	2011-07-14 11:47:56.233075507 +0000
+++ isakmpd-20041012/GNUmakefile	2011-07-14 11:48:09.523075513 +0000
@@ -207,7 +207,7 @@
 ${PROG} beforedepend: ${GENERATED}
 
 ${PROG}: ${OBJS} ${DPADD}
-	${CC} ${DEBUG} ${LDFLAGS} ${LDSTATIC} -o $@ ${OBJS} ${LDADD}
+	${CC} ${DEBUG} ${LDFLAGS} ${LDSTATIC} -o $@ ${OBJS} ${LDADD} -lz -ldl
 
 # Depend rules
 depend: beforedepend .depend mksubdirs afterdepend
Description: fix build with ld --as-needed
 libraries must be placed behind the objects needing them,
 else their symbols will not be registered as needed leading to
 undefined references when compiling with ld --as-needed
 LDFLAGS is placed before the objects, LOADLIBES is the correct
 implicit rule variable for library linking
Author: Julian Taylor <jtaylor.deb...@googlemail.com>
Index: isakmpd-20041012/apps/certpatch/GNUmakefile
===================================================================
--- isakmpd-20041012.orig/apps/certpatch/GNUmakefile	2011-07-14 11:50:28.433075567 +0000
+++ isakmpd-20041012/apps/certpatch/GNUmakefile	2011-07-14 11:51:24.903075591 +0000
@@ -39,7 +39,7 @@
 FEATURES!=	awk '/^FEATURES=/ { print $$0 }' ${.CURDIR}/../../Makefile | sed 's/FEATURES=.//'
 .PATH:		${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ}
 CFLAGS+=	-I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall
-LDFLAGS+=	-lcrypto -lssl -lgmp
+LOADLIBES+=	-lcrypto -lssl -lgmp
 MAN=		certpatch.8
 
 CFLAGS+=	-DMP_FLAVOUR=MP_FLAVOUR_GMP

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to