From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRi1D-0008QX-Qx for qemu-devel@nongnu.org; Sun, 23 Mar 2014 09:00:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRi17-0008OG-R1 for qemu-devel@nongnu.org; Sun, 23 Mar 2014 09:00:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRi17-0008O7-Ig for qemu-devel@nongnu.org; Sun, 23 Mar 2014 09:00:45 -0400 Message-ID: <1395579651.5673.23.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Sun, 23 Mar 2014 15:00:51 +0200 In-Reply-To: References: <1395350099-14664-1-git-send-email-marcel.a@redhat.com> <532B645B.5020507@redhat.com> <1395353214.21800.6.camel@localhost.localdomain> <532B6B27.2080105@redhat.com> <1395354837.21800.12.camel@localhost.localdomain> <532B76E5.7090608@redhat.com> <20140323094943.GA6989@redhat.com> <1395577967.5673.17.camel@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.0 V3] tests/acpi-test: do not run iasl on big endian machines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "Michael S. Tsirkin" , Alexey Kardashevskiy , Michael Tokarev , QEMU Developers , Stefan Hajnoczi , Paolo Bonzini , Laszlo Ersek , Andreas =?ISO-8859-1?Q?F=E4rber?= , Richard Henderson On Sun, 2014-03-23 at 12:48 +0000, Peter Maydell wrote: > On 23 March 2014 12:32, Marcel Apfelbaum wrote: > > On Sun, 2014-03-23 at 12:14 +0000, Peter Maydell wrote: > >> On 23 March 2014 09:49, Michael S. Tsirkin wrote: > >> > At this point I'm confused. > >> > If iasl compiler is broken, we should detect and fix that. > >> > It might be ok to just detect endian-ness as a quick work-around. > >> > BTW configure already has code to detect endian-ness: > >> > if test "$bigendian" = "yes" ; then > >> > echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak > >> > fi > >> > >> That's the endianness of the machine we're compiling QEMU > >> for, not the endianness of the machine we're compiling QEMU > >> on. If for instance you're on x86_64 cross-compiling for PPC > >> then HOST_WORDS_BIGENDIAN is true, but the iasl you use > >> in the build process will be running on a little endian machine. > > > > Hi Peter, are you sure about this? > > I saw the 'target_bigendian' that does what you described above. > > $bigendian is the result of a little C program that checks *host's* endian-ness. > > Of course I might have missed something. > > "host" for QEMU means "the machine QEMU will run on" > (as opposed to "target" meaning "the machine QEMU is emulating"). > Those can both be different from the machine you're building on. > Example: you can be on an x86_64 machine cross-compiling a > qemu-system-mips intended to run on PPC hosts: > build system: x86_64 (we don't currently try to identify its endianness) > host system: PPC ("$bigendian" is set to endianness) > target system: mips ("$target_bigendian" is set to endianness) > > bigendian is set by cross-compiling a test object, which produces > a PPC object file that we then examine to see which endianness > the PPC system we're building for is. > target_bigendian is set for the target machine by just hard-coding it -- > in this case it would be set because 'mips' is a bigendian target. > The iasl we use in the build process is the x86_64 native binary, > so neither $bigendian nor $target_bigendian are correct. Thanks for the detailed answer! It really helped! I missed the build machine != host machine != target machine :( Marcel > > thanks > -- PMM