qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stuart Brady <sdbrady@ntlworld.com>
To: qemu-devel@nongnu.org
Cc: Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] [PATCH] configure cleanup
Date: Sat, 12 Apr 2008 16:20:25 +0100	[thread overview]
Message-ID: <20080412152025.GA32663@miranda.arrow> (raw)
In-Reply-To: <200804121441.16416.paul@codesourcery.com>

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

  reply	other threads:[~2008-04-12 15:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11 19:24 [Qemu-devel] [PATCH] configure cleanup Stuart Brady
2008-04-11 21:20 ` [Qemu-devel] [PATCH] configure cleanup [v2] Stuart Brady
2008-04-12 13:41 ` [Qemu-devel] [PATCH] configure cleanup Paul Brook
2008-04-12 15:20   ` Stuart Brady [this message]
2008-04-12 16:29     ` Andreas Schwab
2008-04-12 17:13       ` Stuart Brady
2008-04-12 18:52         ` Andreas Schwab
2008-04-12 19:01           ` Stuart Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080412152025.GA32663@miranda.arrow \
    --to=sdbrady@ntlworld.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).