[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] configure cleanup

From: Stuart Brady
Subject: Re: [Qemu-devel] [PATCH] configure cleanup
Date: Sat, 12 Apr 2008 16:20:25 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

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. :)

Stuart Brady

reply via email to

[Prev in Thread] Current Thread [Next in Thread]