From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsbMZ-00030D-D8 for qemu-devel@nongnu.org; Sun, 14 Aug 2011 10:08:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QsbMY-0008UO-7i for qemu-devel@nongnu.org; Sun, 14 Aug 2011 10:08:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsbMX-0008UK-Sn for qemu-devel@nongnu.org; Sun, 14 Aug 2011 10:08:26 -0400 Date: Sat, 13 Aug 2011 07:07:06 -0700 From: Alon Levy Message-ID: <20110813140706.GD4606@bow.redhat.com> References: <1313328684-25619-1-git-send-email-flameeyes@flameeyes.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1313328684-25619-1-git-send-email-flameeyes@flameeyes.eu> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] build: list libraries after objects, for proper linkage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Diego Elio =?iso-8859-1?Q?Petten=F2?= Cc: qemu-devel@nongnu.org On Sun, Aug 14, 2011 at 03:31:24PM +0200, Diego Elio Petten=F2 wrote: > Without this change, when using -Wl,--as-needed with GNU linker, the > libraries would be discarded. >=20 Thanks, my bad, didn't know about this switch, makes perfect sense, will = add to the pull request (I should send one by the end of the week). > Signed-off-by: Diego Elio Petten=F2 > --- > libcacard/Makefile | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/libcacard/Makefile b/libcacard/Makefile > index 5cd7594..3ea845f 100644 > --- a/libcacard/Makefile > +++ b/libcacard/Makefile > @@ -18,7 +18,7 @@ QEMU_CFLAGS+=3D-I../ > libcacard.lib-y=3D$(addsuffix .lo,$(basename $(libcacard-y))) > =20 > vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o > - $(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^," LINK $= @") > + $(call quiet-command,$(CC) -o $@ $^ $(libcacard_libs) -lrt," LINK $= @") > =20 > clean: > rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo .libs/* *.= la *.pc > @@ -37,7 +37,7 @@ install-libcacard: > @echo "libtool is missing, please install and rerun configure"; exit = 1 > else > libcacard.la: $(libcacard.lib-y) $(QEMU_OBJS_LIB) > - $(call quiet-command,libtool --mode=3Dlink --quiet --tag=3DCC $(CC) $= (libcacard_libs) -lrt -rpath $(libdir) -o $@ $^," lt LINK $@") > + $(call quiet-command,libtool --mode=3Dlink --quiet --tag=3DCC $(CC) -= rpath $(libdir) -o $@ $^ $(libcacard_libs) -lrt," lt LINK $@") > =20 > libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in > sed -e 's|@LIBDIR@|$(libdir)|' \ > --=20 > 1.7.6 >=20 >=20