* [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists
@ 2013-05-20 15:16 Peter Maydell
2013-05-20 15:16 ` [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list Peter Maydell
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Peter Maydell @ 2013-05-20 15:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, John Rigby, patches
These patches clean up configure's handling of the list of known
targets. Firstly we autogenerate the default list based on the
set of default-config files; this reduces by 1 the number of
places that need editing when a new target is added to QEMU.
Secondly we improve the quality of our error message if you
ask configure to build for something we don't recognise.
NB that autogenerating the default list changes configure's
--help output very slightly, in that the alpha sort means that
i386 and x86_64 are no longer together at the top of the list.
(It is entirely coincidental that aarch64 will now be at the
top of the list when it is added :-) )
Peter Maydell (2):
configure: Autogenerate default target list
configure: Report unknown target names more helpfully
configure | 97 +++++++++++++++++--------------------------------------------
1 file changed, 27 insertions(+), 70 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list
2013-05-20 15:16 [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
@ 2013-05-20 15:16 ` Peter Maydell
2013-05-20 21:11 ` Andreas Färber
2013-05-20 15:16 ` [Qemu-devel] [PATCH 2/2] configure: Report unknown target names more helpfully Peter Maydell
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2013-05-20 15:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, John Rigby, patches
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(-)
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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list
2013-05-20 15:16 ` [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list Peter Maydell
@ 2013-05-20 21:11 ` Andreas Färber
2013-05-20 23:09 ` Peter Maydell
0 siblings, 1 reply; 10+ messages in thread
From: Andreas Färber @ 2013-05-20 21:11 UTC (permalink / raw)
To: Peter Maydell; +Cc: John Rigby, Anthony Liguori, qemu-devel, patches
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
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list
2013-05-20 21:11 ` Andreas Färber
@ 2013-05-20 23:09 ` Peter Maydell
2013-06-04 15:27 ` Ed Maste
0 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2013-05-20 23:09 UTC (permalink / raw)
To: Andreas Färber; +Cc: John Rigby, Anthony Liguori, qemu-devel, patches
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list
2013-05-20 23:09 ` Peter Maydell
@ 2013-06-04 15:27 ` Ed Maste
2013-06-04 16:04 ` Peter Maydell
0 siblings, 1 reply; 10+ messages in thread
From: Ed Maste @ 2013-06-04 15:27 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
On 20 May 2013 19:09, Peter Maydell <peter.maydell@linaro.org> wrote:
> 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.)
We do have some targets in the tree not enabled by default: arm and
mips bsd-user. There's work in progress on both of these, and both
are working with the patch set currently in the FreeBSD ports tree,
but they don't currently build in git head.
I'll send a patch to temporarily revert the bsd-user list to an
explicit set until the WIP is ready to submit, if that's acceptable.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list
2013-06-04 15:27 ` Ed Maste
@ 2013-06-04 16:04 ` Peter Maydell
2013-06-04 16:33 ` Ed Maste
0 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2013-06-04 16:04 UTC (permalink / raw)
To: Ed Maste; +Cc: qemu-devel
On 4 June 2013 16:27, Ed Maste <emaste@freebsd.org> wrote:
> On 20 May 2013 19:09, Peter Maydell <peter.maydell@linaro.org> wrote:
>> 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.)
>
> We do have some targets in the tree not enabled by default: arm and
> mips bsd-user. There's work in progress on both of these, and both
> are working with the patch set currently in the FreeBSD ports tree,
> but they don't currently build in git head.
>
> I'll send a patch to temporarily revert the bsd-user list to an
> explicit set until the WIP is ready to submit, if that's acceptable.
You don't need to do this, because there are no config files
in default-configs/ for these, so this patch set will not
change the behaviour for them.
(I checked that the set of defaults doesn't change from the
previous specific list to the generated list.)
Do you need the "have a config in experimental-configs"
functionality?
thanks
-- PMM
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list
2013-06-04 16:04 ` Peter Maydell
@ 2013-06-04 16:33 ` Ed Maste
0 siblings, 0 replies; 10+ messages in thread
From: Ed Maste @ 2013-06-04 16:33 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
On 4 June 2013 12:04, Peter Maydell <peter.maydell@linaro.org> wrote:
> You don't need to do this, because there are no config files
> in default-configs/ for these, so this patch set will not
> change the behaviour for them.
Oh, my apologies; I tested the bsd-user WIP at some point in the past,
and it seems I have arm- and mips-bsd-user untracked files left over
in default-configs/, so they started getting picked up after this
change.
> Do you need the "have a config in experimental-configs"
> functionality?
No, I don't think it's necessary. We'll just submit the target config
along with the patch to get it working.
-Ed
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH 2/2] configure: Report unknown target names more helpfully
2013-05-20 15:16 [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
2013-05-20 15:16 ` [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list Peter Maydell
@ 2013-05-20 15:16 ` Peter Maydell
2013-06-03 17:17 ` [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
2013-06-10 21:48 ` Anthony Liguori
3 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2013-05-20 15:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, John Rigby, patches
If the user specifies a target list themselves, check each entry
to make sure it's a target we recognise. This allows us to print
a helpful error message, rather than falling through (where we
would probably eventually end up hitting the uninformative
"ERROR: Unsupported target CPU").
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
configure | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/configure b/configure
index e0fa143..4b74a94 100755
--- a/configure
+++ b/configure
@@ -1338,6 +1338,19 @@ if test -z "${target_list+xxx}" ; then
else
target_list=`echo "$target_list" | sed -e 's/,/ /g'`
fi
+
+# Check that we recognised the target name; this allows a more
+# friendly error message than if we let it fall through.
+for target in $target_list; do
+ case " $default_target_list " in
+ *" $target "*)
+ ;;
+ *)
+ error_exit "Unknown target name '$target'"
+ ;;
+ esac
+done
+
# see if system emulation was really requested
case " $target_list " in
*"-softmmu "*) softmmu=yes
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists
2013-05-20 15:16 [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
2013-05-20 15:16 ` [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list Peter Maydell
2013-05-20 15:16 ` [Qemu-devel] [PATCH 2/2] configure: Report unknown target names more helpfully Peter Maydell
@ 2013-06-03 17:17 ` Peter Maydell
2013-06-10 21:48 ` Anthony Liguori
3 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2013-06-03 17:17 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, John Rigby, patches
On 20 May 2013 16:16, Peter Maydell <peter.maydell@linaro.org> wrote:
> These patches clean up configure's handling of the list of known
> targets. Firstly we autogenerate the default list based on the
> set of default-config files; this reduces by 1 the number of
> places that need editing when a new target is added to QEMU.
> Secondly we improve the quality of our error message if you
> ask configure to build for something we don't recognise.
>
> NB that autogenerating the default list changes configure's
> --help output very slightly, in that the alpha sort means that
> i386 and x86_64 are no longer together at the top of the list.
> (It is entirely coincidental that aarch64 will now be at the
> top of the list when it is added :-) )
Ping!
thanks
-- PMM
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists
2013-05-20 15:16 [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
` (2 preceding siblings ...)
2013-06-03 17:17 ` [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
@ 2013-06-10 21:48 ` Anthony Liguori
3 siblings, 0 replies; 10+ messages in thread
From: Anthony Liguori @ 2013-06-10 21:48 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: Anthony Liguori, John Rigby, patches
Applied. Thanks.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-06-10 21:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20 15:16 [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
2013-05-20 15:16 ` [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list Peter Maydell
2013-05-20 21:11 ` Andreas Färber
2013-05-20 23:09 ` Peter Maydell
2013-06-04 15:27 ` Ed Maste
2013-06-04 16:04 ` Peter Maydell
2013-06-04 16:33 ` Ed Maste
2013-05-20 15:16 ` [Qemu-devel] [PATCH 2/2] configure: Report unknown target names more helpfully Peter Maydell
2013-06-03 17:17 ` [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
2013-06-10 21:48 ` Anthony Liguori
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).