From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JkhWz-0007qw-Dq for qemu-devel@nongnu.org; Sat, 12 Apr 2008 11:20:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JkhWy-0007qI-G3 for qemu-devel@nongnu.org; Sat, 12 Apr 2008 11:20:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JkhWy-0007qA-Cj for qemu-devel@nongnu.org; Sat, 12 Apr 2008 11:20:40 -0400 Received: from mtaout01-winn.ispmail.ntl.com ([81.103.221.47]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JkhWx-0004AP-Mz for qemu-devel@nongnu.org; Sat, 12 Apr 2008 11:20:40 -0400 Date: Sat, 12 Apr 2008 16:20:25 +0100 From: Stuart Brady Subject: Re: [Qemu-devel] [PATCH] configure cleanup Message-ID: <20080412152025.GA32663@miranda.arrow> References: <20080411192401.GA30794@miranda.arrow> <200804121441.16416.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200804121441.16416.paul@codesourcery.com> 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 Cc: Paul Brook On Sat, Apr 12, 2008 at 02:41:15PM +0100, Paul Brook wrote: > > The included patch rearranges the configure script slightly, to reduce > > future merge conflicts and to make it easier to read diffs for changes > > to the script that add support extra host/target architectures/ABIs. > > IMHO things like this are better expressed as switch statements. We already > have such a switch statement a few pages above for ARCH_CFLAGS. It seems like > these and the subsequent hostlongbits could be combined. Using switch statements seems reasonable. However, the lists for bigendian and hostlongbits are only used if we're cross compiling (although the indentation does not make this obvious). We could set them at the same time as ARCH_CFLAGS is set, but when not cross-compiling, the values would be later replaced -- how do you feel about that? (Perhaps we could warn if bigendian and hostlongbits are not guessed correctly?) For the target_list, I've noticed we could do something like this: for target in \ i386-softmmu \ x86_64-softmmu \ arm-softmmu \ ... sparc-softmmu \ ; do target_list="$target_list $target"; done Using switch statements for setting ARCH, HOST_$arch, TARGET_ARCH, etc. makes sense. However, I'm not sure what to do with target_bigendian. I think setting CONFIG_SOFTFLOAT should probably be where TARGET_ARCH is set... although I don't like the way the definition of TARGET_ARCH is duplicated for each target for config.mak and config.h -- I think it'd make more sense to set a variable for each target, and then set TARGET_ARCH using that variable, afterwards. Unfortunately, I could probably try to clean up 80-90% of the configure script, but I'd rather avoid the resulting flames. :) Cheers, -- Stuart Brady