Received: from eggs.gnu.org ([140.186.70.92]:48271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPfGy-0007mG-If for qemu-devel@nongnu.org; Thu, 26 May 2011 14:27:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPfGx-0003Dm-KV for qemu-devel@nongnu.org; Thu, 26 May 2011 14:27:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPfGx-0003Dh-B8 for qemu-devel@nongnu.org; Thu, 26 May 2011 14:27:03 -0400 Date: Thu, 26 May 2011 21:26:48 +0300 From: Alon Levy Message-ID: <20110526182648.GS31654@playa.tlv.redhat.com> References: <4DDE9466.9030300@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DDE9466.9030300@linux.vnet.ibm.com> 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: Stefan Berger Cc: Anthony Liguori , qemu-devel@nongnu.org On Thu, May 26, 2011 at 01:56:54PM -0400, Stefan Berger wrote: > When configuring with --extra-cflags="-m32" on a 64bit machine the > following error appears during compilation: Thanks for the fix. Reviewed-by: Alon Levy > > make -C libhw64 V="1" TARGET_DIR="libhw64/" all > make[1]: Entering directory `/root/tmp/qemu-git/libhw64' > make[1]: Leaving directory `/root/tmp/qemu-git/libhw64' > make -C libcacard V="1" TARGET_DIR="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 > =================================================================== > --- qemu-git.orig/libcacard/Makefile > +++ qemu-git/libcacard/Makefile > @@ -9,7 +9,7 @@ QEMU_OBJS=$(addprefix ../, $(oslib-obj-y > QEMU_CFLAGS+=-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 > >