kvm-unit-test compilation failed on Ubuntu Yakkety (4.8 kernel)

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

 



Hello,

I found this compilation issue on an Ubuntu Yakkety (kernel 4.8.0-30)
x86_64 system.

When running "make" till the following step:
gcc  -mno-red-zone -m64 -O1 -g -MMD -MF x86/.vmexit.d -Wall -Werror
-fno-omit-frame-pointer    -Wno-frame-address -nostdlib -o
x86/vmexit.elf -Wl,-T,x86/flat.lds x86/vmexit.o x86/cstart64.o
lib/libcflat.a /usr/lib/gcc/x86_64-linux-gnu/6/libgcc.a

It will return:
/usr/bin/ld: x86/cstart64.o: relocation R_X86_64_32 against `.data'
can not be used when making a shared object; recompile with -fPIC

This issue won't go away even with x86/cstart64.o recompiled with the
-fPIC flag:
gcc -fPIC -mno-red-zone -m64 -O1 -g -MMD -MF x86/.cstart64.d -Wall
-Werror  -fno-omit-frame-pointer    -Wno-frame-address -std=gnu99
-ffreestanding -I lib -I lib/x86 -c -nostdlib -o x86/cstart64.o
x86/cstart64.S

The head of the kvm-unit-test repository is 1bde9127da4c

I think maybe it's because the source is assembly code, making the
-fPIC flag useless for it?

System spec
 - CPU: Intel i3-4010U
 - Kernel version: 4.8.0-30-generic #32
 - GCC version: gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005

Compilation works fine with Ubuntu Xenial (4.4 kernel, gcc Ubuntu
5.4.0-6ubuntu1~16.04.4 5.4.0 20160609), even with 4.8 kernel on
Xenial, so I think this is more related to the compiler or something.

Thanks
--
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