diff mbox

qemu: fix out of tree cross compile

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

Commit Message

Alexey Kardashevskiy May 27, 2013, 2:12 p.m. UTC
The symlink to 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>
---
 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini May 27, 2013, 3:02 p.m. UTC | #1
Il 27/05/2013 16:12, Alexey Kardashevskiy ha scritto:
> The symlink to 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>
> ---
>  configure |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 5ae7e4a..5ba691a 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$(pwd)/linux-headers $QEMU_INCLUDES"

You need to have both directories.  Files other than asm/*.h will be
found in the source path.

Paolo
Alexey Kardashevskiy May 27, 2013, 10:59 p.m. UTC | #2
On 05/28/2013 01:02 AM, Paolo Bonzini wrote:
> Il 27/05/2013 16:12, Alexey Kardashevskiy ha scritto:
>> The symlink to 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>
>> ---
>>  configure |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index 5ae7e4a..5ba691a 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$(pwd)/linux-headers $QEMU_INCLUDES"
> 
> You need to have both directories.  Files other than asm/*.h will be
> found in the source path.

So do I need this?

+  QEMU_INCLUDES="-I$(pwd)/linux-headers -I\$(SRC_PATH)/linux-headers
$QEMU_INCLUDES"
diff mbox

Patch

diff --git a/configure b/configure
index 5ae7e4a..5ba691a 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$(pwd)/linux-headers $QEMU_INCLUDES"
 ;;
 esac