From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl0sM-0001am-Iw for qemu-devel@nongnu.org; Wed, 01 Oct 2008 08:32:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl0sK-0001ZW-EI for qemu-devel@nongnu.org; Wed, 01 Oct 2008 08:32:16 -0400 Received: from [199.232.76.173] (port=43288 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl0sK-0001ZQ-7E for qemu-devel@nongnu.org; Wed, 01 Oct 2008 08:32:16 -0400 Received: from mtagate2.uk.ibm.com ([194.196.100.162]:57746) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kl0sJ-0001w1-Lp for qemu-devel@nongnu.org; Wed, 01 Oct 2008 08:32:16 -0400 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id m91CQYnM026548 for ; Wed, 1 Oct 2008 12:26:34 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m91CQY6C4161566 for ; Wed, 1 Oct 2008 13:26:34 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m91CQXjb003980 for ; Wed, 1 Oct 2008 13:26:34 +0100 Message-ID: <48E36C78.9020605@linux.vnet.ibm.com> Date: Wed, 01 Oct 2008 14:26:32 +0200 From: Christian Ehrhardt MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2 References: <1222765817-26552-1-git-send-email-ehrhardt@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: hollisb@us.ibm.com, avi@qumranet.com, qemu-devel@nongnu.org, kvm-ppc@vger.kernel.org, kvm@vger.kernel.org malc wrote: > On Tue, 30 Sep 2008, ehrhardt@linux.vnet.ibm.com wrote: > >> From: Christian Ehrhardt >> >> *update* >> further debugging according to some requests revealed that=20 >> ARCH_CFLAGS does >> not contain all CFLAGS that might be needed, especially those=20 >> supplied via >> extra-cflags. Therefore people supplying things via extra-cflags=20 >> instead of an >> environment variable might have had issues. > > This part i don't get, there are few more checks before/after=20 > hostlongbits where no CFLAGS are added to the $cc argument list. What > makes hostlongbits selection "special"? Do people specify -m32/-m64 via > --extra-cflags? > it was there to ensure availability of the needed include paths to reach=20 wordsize.h. But Hollis approach is much simpler, better and more reliable so never=20 mind :-) >> >> A recent kvm merge with qemu brought code for 64bit power that broke=20 >> cross >> compilation. The issue is caused by configure trying to execute target >> architecture binaries where configure is executed. > > Yes, i never thought about cross-compilation, my bad. np, now it's fixed - thanks for quickly applying it. > >> I tried to change that detection so that it works with&without cross >> compilation with only a small change and especially without an addtion= al >> configure command line switch. Including the bits/wordsize.h header a=20 >> platform >> usually can check its wordsize and by doing that configure can check t= he >> hostlongbits without executing the binary. Instead it now stops after >> preprocessing stage which resolved the __WORDSIZE constant and retriev= es >> that value. >> >> I don't like my new check style, but it is at least less broken than=20 >> before. >> Another approach that was suggested was that qemu might end up needing >> something like asm-offsets in the kernel to manage architecture sizes=20 >> etc. >> Comments and other approaches welcome. >> > > I think Hollis Blanchard's method is sound, > > Thank you for bringing this up. > --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization