From: Prerna Saxena Subject: kvmtool : [PATCH] PowerPc : Fix compilation for ppc64 Date: Tue, 9 Apr 2013 22:59:58 +0530 Message-ID: <20130409225958.760c72ac@zephyr.in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from e28smtp05.in.ibm.com ([122.248.162.5]:51444 "EHLO e28smtp05.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759682Ab3DIReB (ORCPT ); Tue, 9 Apr 2013 13:34:01 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Apr 2013 23:00:46 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 6E97D3940023 for ; Tue, 9 Apr 2013 23:03:54 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r39HXmkA55574622 for ; Tue, 9 Apr 2013 23:03:49 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r39HXrqm004864 for ; Wed, 10 Apr 2013 03:33:53 +1000 Received: from zephyr.in.ibm.com ([9.79.176.247]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r39HXq2s004818 for ; Wed, 10 Apr 2013 03:33:53 +1000 Sender: kvm-owner@vger.kernel.org List-ID: 'lkvm' compilation on ppc64 fails with the following error : ...[snip].. LINK guest/init LINK lkvm /usr/bin/ld: powerpc:common architecture of input file `guest/guest_init.o' is incompatible with powerpc:common64 output collect2: ld returned 1 exit status make: *** [lkvm] Error 1 This patch corrects the error above, and enables 'lkvm' to compile on ppc64 architecture. Signed-off-by: Prerna Saxena --- tools/kvm/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index 0c59faa..269e29e 100644 --- a/tools/kvm/Makefile +++ b/tools/kvm/Makefile @@ -335,7 +335,11 @@ $(PROGRAM_ALIAS): $(PROGRAM) $(GUEST_INIT): guest/init.c $(E) " LINK " $@ $(Q) $(CC) -static guest/init.c -o $@ +ifeq ($(ARCH), powerpc) + $(Q) $(LD) -r -b binary --oformat elf64-powerpc -o guest/guest_init.o $(GUEST_INIT) +else $(Q) $(LD) -r -b binary -o guest/guest_init.o $(GUEST_INIT) +endif $(DEPS): -- 1.7.10.4 Regards, -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India