kvmtool : [PATCH] PowerPc : Fix compilation for ppc64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'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 <prerna@xxxxxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux