From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QU00w-00051Z-3z for qemu-devel@nongnu.org; Tue, 07 Jun 2011 13:24:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QU00u-0001xA-C1 for qemu-devel@nongnu.org; Tue, 07 Jun 2011 13:24:25 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:57882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QU00t-0001x5-Vs for qemu-devel@nongnu.org; Tue, 07 Jun 2011 13:24:24 -0400 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e33.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p57HGwlo011841 for ; Tue, 7 Jun 2011 11:16:58 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p57HOFFJ151658 for ; Tue, 7 Jun 2011 11:24:15 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p57HOEBb002045 for ; Tue, 7 Jun 2011 11:24:14 -0600 Message-ID: <4DEE5EBD.6000903@linux.vnet.ibm.com> Date: Tue, 07 Jun 2011 13:24:13 -0400 From: Stefan Berger MIME-Version: 1.0 References: <4DDE9466.9030300@linux.vnet.ibm.com> <20110526182648.GS31654@playa.tlv.redhat.com> <4DEE306A.60103@linux.vnet.ibm.com> <35EDCC3B-CBDC-4FFD-B351-F5D20055FA5D@web.de> In-Reply-To: <35EDCC3B-CBDC-4FFD-B351-F5D20055FA5D@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Buildfix: fix libcacard build with -m32 on 64bit machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: Anthony Liguori , Alon Levy , "qemu-devel@nongnu.org Developers" On 06/07/2011 10:20 AM, Andreas F=E4rber wrote: > Am 07.06.2011 um 16:06 schrieb Stefan Berger: > >> On 05/26/2011 02:26 PM, Alon Levy wrote: >>> On Thu, May 26, 2011 at 01:56:54PM -0400, Stefan Berger wrote: >>>> When configuring with --extra-cflags=3D"-m32" on a 64bit machine the >>>> following error appears during compilation: >>> Thanks for the fix. >> Anybody else who thinks that this patch below is necessary? > > Yes, this or a similar patch. Not sure if there's a QEMU_LDFLAGS and,=20 > if yes, whether that or LDFLAGS is more correct. > There is no QEMU_LDFLAGS from what I can see. > The only issue I see is that we may be passing unnecessary cruft in,=20 > but that seems negligible. > Fixing up $libcacard_libs to contain the relevant LDFLAGS is probably=20 > more complicated. > For the below linking step the LDFLAGS presumably contain the right=20 command line parameters. Stefan > Andreas > >>> Reviewed-by: Alon Levy >>> >>>> make -C libhw64 V=3D"1" TARGET_DIR=3D"libhw64/" all >>>> make[1]: Entering directory `/root/tmp/qemu-git/libhw64' >>>> make[1]: Leaving directory `/root/tmp/qemu-git/libhw64' >>>> make -C libcacard V=3D"1" TARGET_DIR=3D"libcacard/" all >>>> make[1]: Entering directory `/root/tmp/qemu-git/libcacard' >>>> gcc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 >>>> -lpthread -ldl -lrt -o vscclient cac.o event.o vcard.o vreader.o >>>> vcard_emul_nss.o vcard_emul_type.o card_7816.o ../osdep.o >>>> ../oslib-posix.o ../qemu-thread-posix.o ../trace.o ../qemu-malloc.o >>>> ../qemu-timer-common.o vscclient.o >>>> cac.o: could not read symbols: File in wrong format >>>> collect2: ld returned 1 exit status >>>> make[1]: *** [vscclient] Error 1 >>>> make[1]: Leaving directory `/root/tmp/qemu-git/libcacard' >>>> make: *** [subdir-libcacard] Error 2 >>>> >>>> The LDFLAGS are not passed to the compiled. The below patch fixes it. >>>> >>>> Signed-off-by: Stefan Berger >>>> >>>> --- >>>> libcacard/Makefile | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> Index: qemu-git/libcacard/Makefile >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- qemu-git.orig/libcacard/Makefile >>>> +++ qemu-git/libcacard/Makefile >>>> @@ -9,7 +9,7 @@ QEMU_OBJS=3D$(addprefix ../, $(oslib-obj-y >>>> QEMU_CFLAGS+=3D-I../ >>>> >>>> vscclient: $(libcacard-y) $(QEMU_OBJS) vscclient.o >>>> - $(call quiet-command,$(CC) $(libcacard_libs) -lrt -o $@ $^," >>>> LINK $(TARGET_DIR)$@") >>>> + $(call quiet-command,$(CC) $(LDFLAGS) $(libcacard_libs) -lrt -o >>>> $@ $^," LINK $(TARGET_DIR)$@") >>>> >>>> all: vscclient >>>> >>>> >> > >