[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] qemu: fix out of tree cross compile

From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [PATCH] qemu: fix out of tree cross compile
Date: Tue, 28 May 2013 00:11:02 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

On 05/27/2013 08:24 PM, Peter Maydell wrote:
> On 27 May 2013 07:13, Alexey Kardashevskiy <address@hidden> wrote:
>> QEMU uses headers from source directory, however the "asm" symlink was
>> created in the build directory what broke KVM stuff compilation.
>> Signed-off-by: Alexey Kardashevskiy <address@hidden>
>> ---
>>  configure |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/configure b/configure
>> index 5ae7e4a..9c3c5e5 100755
>> --- a/configure
>> +++ b/configure
>> @@ -4135,7 +4135,7 @@ if test "$linux" = "yes" ; then
>>    esac
>>      # For non-KVM architectures we will not have asm headers
>>      if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then
>> -      symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
>> +      symlink "$source_path/linux-headers/asm-$linux_arch" 
>> $source_path/linux-headers/asm
> This is definitely wrong -- the asm symlink must be created
> in the build tree, because you could have two build trees
> which are building for different architectures and need
> different symlink targets. (More generally, an out of tree
> build should never create files in the source tree, because
> the point of out of tree builds is to leave the source tree
> in a pristine state.)

Ok, ok. Then I'll post another patch in a a response to this.

> What is the actual bug here? QEMU builds fine for me, because
> the build directory is also in the include path via "-I.".

Does you build directory beside inside the source tree directory? I cannot
see the other way for it to work. -I <blabla>/linux-headers must be added,
"-I." is not enough.

The actual bug is that it does not cross compile until I apply this or the
other patch.

This is how I run ./configure:
-I/home/alexey/pcipassthru/lib4qemu/usr/include -D__EXCEPTIONS
-D__LONG_DOUBLE_128__ -D__NO_INLINE__ -Wno-redundant-decls
-Wno-missing-prototypes -Wmissing-include-dirs'

This is where the compilation fails on:
powerpc64-linux-gcc \
-Wredundant-decls -Wall
-Wno-redundant-decls -Wno-missing-prototypes
-Wmissing-include-dirs  -Wendif-labels
-Wmissing-include-dirs -Wempty-body
-Wnested-externs -Wformat-security
-Wformat-y2k -Winit-self -Wignored-qualifiers
-Wold-style-declaration -Wold-style-definition
-MMD -MP -MT target-ppc/kvm.o -MF target-ppc/kvm.d -g
-I/home/alexey/pcipassthru/lib4qemu/usr/include -c
-o target-ppc/kvm.o
/home/alexey/pcipassthru/qemu-impreza/hw/ppc/xics.c: In function
/home/alexey/pcipassthru/qemu-impreza/hw/ppc/xics.c:186:15: error:
'KVM_REG_PPC_ICP_STATE' undeclared (first use in this function)
         .id = KVM_REG_PPC_ICP_STATE,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]