diff mbox

[v3] qemu: fix out of tree cross compile

Message ID 1369698583-32533-1-git-send-email-aik@ozlabs.ru
State New
Headers show

Commit Message

Alexey Kardashevskiy May 27, 2013, 11:49 p.m. UTC
The symlink to "asm" platform linux headers is made in the build tree by
the configure script but gcc is not told to look for them there.

The patch fixes this.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---

The previous patch did not remove the old line adding includes. Early morning,
lack of focus :)

---
 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini May 28, 2013, 8:54 a.m. UTC | #1
Il 28/05/2013 01:49, Alexey Kardashevskiy ha scritto:
> The symlink to "asm" platform linux headers is made in the build tree by
> the configure script but gcc is not told to look for them there.
> 
> The patch fixes this.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> 
> The previous patch did not remove the old line adding includes. Early morning,
> lack of focus :)
> 
> ---
>  configure |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 5ae7e4a..eca2a20 100755
> --- a/configure
> +++ b/configure
> @@ -547,7 +547,7 @@ Haiku)
>    if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
>      audio_possible_drivers="$audio_possible_drivers fmod"
>    fi
> -  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES"
> +  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
>  ;;
>  esac
>  
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo
Andreas Färber May 28, 2013, 9:12 a.m. UTC | #2
Am 28.05.2013 10:54, schrieb Paolo Bonzini:
> Il 28/05/2013 01:49, Alexey Kardashevskiy ha scritto:
>> The symlink to "asm" platform linux headers is made in the build tree by
>> the configure script but gcc is not told to look for them there.
>>
>> The patch fixes this.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>> ---
>>
>> The previous patch did not remove the old line adding includes. Early morning,
>> lack of focus :)
>>
>> ---
>>  configure |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index 5ae7e4a..eca2a20 100755
>> --- a/configure
>> +++ b/configure
>> @@ -547,7 +547,7 @@ Haiku)
>>    if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
>>      audio_possible_drivers="$audio_possible_drivers fmod"
>>    fi
>> -  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES"
>> +  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
>>  ;;
>>  esac
>>  
>>
> 
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Hm, I see no other case of adding $(pwd) to QEMU_INCLUDES - shouldn't
this just be -Ilinux-headers?

And might it make sense to give the build directory precedence over the
source directory?

Andreas
Paolo Bonzini May 28, 2013, 9:21 a.m. UTC | #3
Il 28/05/2013 11:12, Andreas Färber ha scritto:
> Am 28.05.2013 10:54, schrieb Paolo Bonzini:
>> Il 28/05/2013 01:49, Alexey Kardashevskiy ha scritto:
>>> The symlink to "asm" platform linux headers is made in the build tree by
>>> the configure script but gcc is not told to look for them there.
>>>
>>> The patch fixes this.
>>>
>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>> ---
>>>
>>> The previous patch did not remove the old line adding includes. Early morning,
>>> lack of focus :)
>>>
>>> ---
>>>  configure |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index 5ae7e4a..eca2a20 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -547,7 +547,7 @@ Haiku)
>>>    if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
>>>      audio_possible_drivers="$audio_possible_drivers fmod"
>>>    fi
>>> -  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES"
>>> +  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
>>>  ;;
>>>  esac
>>>  
>>>
>>
>> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Hm, I see no other case of adding $(pwd) to QEMU_INCLUDES - shouldn't
> this just be -Ilinux-headers?

I think -Ilinux-headers would add
<builddir>/x86_64-softmmu/linux-headers, which is wrong.

> And might it make sense to give the build directory precedence over the
> source directory?

It shouldn't matter.

Paolo
Anthony Liguori May 29, 2013, 1:17 p.m. UTC | #4
Alexey Kardashevskiy <aik@ozlabs.ru> writes:

> The symlink to "asm" platform linux headers is made in the build tree by
> the configure script but gcc is not told to look for them there.
>
> The patch fixes this.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>
> The previous patch did not remove the old line adding includes. Early morning,
> lack of focus :)

Please repost as a top level patch.

Regards,

Anthony Liguori



>
> ---
>  configure |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 5ae7e4a..eca2a20 100755
> --- a/configure
> +++ b/configure
> @@ -547,7 +547,7 @@ Haiku)
>    if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
>      audio_possible_drivers="$audio_possible_drivers fmod"
>    fi
> -  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES"
> +  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
>  ;;
>  esac
>  
> -- 
> 1.7.10.4
diff mbox

Patch

diff --git a/configure b/configure
index 5ae7e4a..eca2a20 100755
--- a/configure
+++ b/configure
@@ -547,7 +547,7 @@  Haiku)
   if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
     audio_possible_drivers="$audio_possible_drivers fmod"
   fi
-  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES"
+  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
 ;;
 esac