qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [5780] Native BSD host USB support (Juergen Lock, Lonni


From: Thiemo Seufer
Subject: Re: [Qemu-devel] [5780] Native BSD host USB support (Juergen Lock, Lonnie Mendez)
Date: Tue, 25 Nov 2008 11:07:32 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Anthony Liguori wrote:
[snip]
>> +usb="linux"
>>  if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
>>      kqemu="yes"
>>      audio_possible_drivers="$audio_possible_drivers fmod"
>> @@ -231,6 +232,7 @@
>>  if [ "$bsd" = "yes" ] ; then
>>    if [ "$darwin" != "yes" ] ; then
>>      make="gmake"
>> +    usb="bsd"
>>    fi
>>    bsd_user="yes"
>>  fi
>>   
>
> This whole set of checks is horribly broken because it relies on uname  
> -s.  Such a thing doesn't exist on Windows but more importantly, when  
> cross compiling, uname is meaningless.
>
> What we really should do, is compile a small test program that checks for:
>
> #ifndef __linux__
> #error Not linux
> #endif
>
> And then try compiling that to see if we're on Linux or not.  The same  
> with FreeBSD et al.

It shouldn't try to compile, for the sake of cross portability. Rather
something like

gcc -E -dM -xc /dev/null |grep __linux__

This checks if the compiler in use is a Linux compiler.


Thiemo




reply via email to

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