Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L51qs-0005JH-30 for qemu-devel@nongnu.org; Tue, 25 Nov 2008 12:37:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L51qq-0005Fi-Ar for qemu-devel@nongnu.org; Tue, 25 Nov 2008 12:37:29 -0500 Received: from [199.232.76.173] (port=34770 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L51qq-0005FQ-08 for qemu-devel@nongnu.org; Tue, 25 Nov 2008 12:37:28 -0500 Received: from nf-out-0910.google.com ([64.233.182.187]:47431) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L51qp-0005p4-JV for qemu-devel@nongnu.org; Tue, 25 Nov 2008 12:37:27 -0500 Received: by nf-out-0910.google.com with SMTP id b2so34501nfb.12 for ; Tue, 25 Nov 2008 09:37:26 -0800 (PST) Message-ID: Date: Tue, 25 Nov 2008 19:37:25 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] [5780] Native BSD host USB support (Juergen Lock, Lonnie Mendez) In-Reply-To: <492C0D01.8000604@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <492B10B1.1050409@codemonkey.ws> <20081125100732.GA15592@networkno.de> <492C0D01.8000604@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 11/25/08, Anthony Liguori wrote: > Thiemo Seufer wrote: > > > 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. > > > > > > Good enough, but I wonder why you think it shouldn't compile for the sake > of cross portability? > > The cross compiler should be able to create an executable. You don't have > to run it, you just have to rely on #error causing compilation to fail. There is a small problem: in configure, we want to parse the command line options for things like cpu, compiler flags etc. So the OS or CPU detection should be after that. Currently the CPU from uname is used to modify the OS flags even before command line options are handled, this seems to be broken.