From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRhsr-0001fM-Mb for qemu-devel@nongnu.org; Sun, 23 Mar 2014 08:52:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRhsh-0005Ya-AE for qemu-devel@nongnu.org; Sun, 23 Mar 2014 08:52:13 -0400 Received: from mail-ee0-x233.google.com ([2a00:1450:4013:c00::233]:38072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRhsh-0005YD-2g for qemu-devel@nongnu.org; Sun, 23 Mar 2014 08:52:03 -0400 Received: by mail-ee0-f51.google.com with SMTP id c13so3431151eek.24 for ; Sun, 23 Mar 2014 05:52:01 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <532ED8EB.4000306@redhat.com> Date: Sun, 23 Mar 2014 13:51:55 +0100 From: Paolo Bonzini MIME-Version: 1.0 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> In-Reply-To: <1395577967.5673.17.camel@localhost.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed 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: Marcel Apfelbaum , Peter Maydell Cc: "Michael S. Tsirkin" , Alexey Kardashevskiy , Michael Tokarev , QEMU Developers , Stefan Hajnoczi , Laszlo Ersek , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Richard Henderson Il 23/03/2014 13:32, Marcel Apfelbaum ha scritto: >> > 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. Peter is right. There are three systems: build (what you run on), host (what you compile for), target (always x86-64 for now for acpi-test). $bigendian and G_BYTE_ORDER check the host system. If you wanted to test the build system's endianness, Laszlo's suggestion would be fine. However, Michael is also right if we assume that iasl on bigendian can assemble, and that the problems are only on disassembling. This is because in this particular case you'll be running an executable compiled for the host and you know that host == build. I think the assumption is sane. As far as I remember, upstream iasl doesn't compile at all on big-endian machines. You need specific patches such as those shared by Fedora and Debian's. Unfortunately, the patches are incomplete, they only fix assembling because that's what was needed so far to cross-compile SeaBIOS. Paolo