diff mbox

[1/2] configure: Autogenerate default target list

Message ID 1369062976-301-2-git-send-email-peter.maydell@linaro.org
State Accepted
Commit 6e92f823b67d87aa96df01b0cb01f81ac71ec5e3
Headers show

Commit Message

Peter Maydell May 20, 2013, 3:16 p.m. UTC
Autogenerate the default target list based on what files exist
in default-configs; this allows us to remove one of the places
that has to be kept up to date with a complete list of every
target we support.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |   84 +++++++++++--------------------------------------------------
 1 file changed, 14 insertions(+), 70 deletions(-)

Comments

Andreas Färber May 20, 2013, 9:11 p.m. UTC | #1
Am 20.05.2013 17:16, schrieb Peter Maydell:
> Autogenerate the default target list based on what files exist
> in default-configs; this allows us to remove one of the places
> that has to be kept up to date with a complete list of every
> target we support.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

In the past we have had differences between targets compilable and
targets fully implemented and thus not in the default list (mipsn32 and
mips64 linux-user). They could then be tested by the brave using
--target-list and --disable-werror.

Andreas
Peter Maydell May 20, 2013, 11:09 p.m. UTC | #2
On 20 May 2013 22:11, Andreas Färber <afaerber@suse.de> wrote:
> Am 20.05.2013 17:16, schrieb Peter Maydell:
>> Autogenerate the default target list based on what files exist
>> in default-configs; this allows us to remove one of the places
>> that has to be kept up to date with a complete list of every
>> target we support.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>
> In the past we have had differences between targets compilable and
> targets fully implemented and thus not in the default list (mipsn32 and
> mips64 linux-user). They could then be tested by the brave using
> --target-list and --disable-werror.

I suspect that any target we have in tree but not in the default
list is liable to bitrot because nobody will compile test it
(and indeed nobody knows about it since it's undocumented).

That said, we could have an experimental-configs/ to go with
default-configs/, such that we allow --target-list=foo if
there's an experimental-configs/ file but don't default to
it (and we could even print a "warning, this is an experimental
target!" message if we were feeling friendly, and have an
--enable-experimental-targets options so buildbots could at
least compiletest them).

I'm not sure that's worth the effort at this point when we don't
actually have any targets in tree which aren't enabled by default,
though. (I did cross-check the old and new lists so this patch
isn't accidentally enabling a previously disabled config.)

thanks
-- PMM
diff mbox

Patch

diff --git a/configure b/configure
index 9439f1c..e0fa143 100755
--- a/configure
+++ b/configure
@@ -970,78 +970,22 @@  EXTRA_CFLAGS="$CPU_CFLAGS $EXTRA_CFLAGS"
 
 default_target_list=""
 
-# these targets are portable
-if [ "$softmmu" = "yes" ] ; then
-    default_target_list="\
-i386-softmmu \
-x86_64-softmmu \
-alpha-softmmu \
-arm-softmmu \
-cris-softmmu \
-lm32-softmmu \
-m68k-softmmu \
-microblaze-softmmu \
-microblazeel-softmmu \
-mips-softmmu \
-mipsel-softmmu \
-mips64-softmmu \
-mips64el-softmmu \
-moxie-softmmu \
-or32-softmmu \
-ppc-softmmu \
-ppcemb-softmmu \
-ppc64-softmmu \
-sh4-softmmu \
-sh4eb-softmmu \
-sparc-softmmu \
-sparc64-softmmu \
-s390x-softmmu \
-xtensa-softmmu \
-xtensaeb-softmmu \
-unicore32-softmmu \
-"
-fi
-# the following are Linux specific
-if [ "$linux_user" = "yes" ] ; then
-    default_target_list="${default_target_list}\
-i386-linux-user \
-x86_64-linux-user \
-alpha-linux-user \
-arm-linux-user \
-armeb-linux-user \
-cris-linux-user \
-m68k-linux-user \
-microblaze-linux-user \
-microblazeel-linux-user \
-mips-linux-user \
-mipsel-linux-user \
-mips64-linux-user \
-mips64el-linux-user \
-mipsn32-linux-user \
-mipsn32el-linux-user \
-or32-linux-user \
-ppc-linux-user \
-ppc64-linux-user \
-ppc64abi32-linux-user \
-sh4-linux-user \
-sh4eb-linux-user \
-sparc-linux-user \
-sparc64-linux-user \
-sparc32plus-linux-user \
-unicore32-linux-user \
-s390x-linux-user \
-"
-fi
-# the following are BSD specific
-if [ "$bsd_user" = "yes" ] ; then
-    default_target_list="${default_target_list}\
-i386-bsd-user \
-x86_64-bsd-user \
-sparc-bsd-user \
-sparc64-bsd-user \
-"
+mak_wilds=""
+
+if [ "$softmmu" = "yes" ]; then
+    mak_wilds="${mak_wilds} $source_path/default-configs/*-softmmu.mak"
+fi
+if [ "$linux_user" = "yes" ]; then
+    mak_wilds="${mak_wilds} $source_path/default-configs/*-linux-user.mak"
+fi
+if [ "$bsd_user" = "yes" ]; then
+    mak_wilds="${mak_wilds} $source_path/default-configs/*-bsd-user.mak"
 fi
 
+for config in $mak_wilds; do
+    default_target_list="${default_target_list} $(basename "$config" .mak)"
+done
+
 if test x"$show_help" = x"yes" ; then
 cat << EOF