From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: alex.bennee@linaro.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX
Date: Fri, 10 Dec 2021 10:47:33 +0000 [thread overview]
Message-ID: <CAFEAcA_Nh4ay7885nOnmA21d3Q2e1BE82zXHtmG6ResDxtYpXQ@mail.gmail.com> (raw)
In-Reply-To: <20211210084836.25202-1-pbonzini@redhat.com>
On Fri, 10 Dec 2021 at 09:41, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The two more or less overlap, because CONFIG_LINUX is a requirement for Linux
> user-mode emulation. However, CONFIG_LINUX is technically a host symbol
> that applies even to system emulation. Defining CONFIG_LINUX_USER, and
> CONFIG_BSD_USER for eventual future use, is cleaner.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> tests/tcg/configure.sh | 8 +++++++-
> tests/tcg/multiarch/Makefile.target | 2 +-
> tests/tcg/x86_64/Makefile.target | 2 +-
> 3 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
> index 9ef913df5b..f859b61d90 100755
> --- a/tests/tcg/configure.sh
> +++ b/tests/tcg/configure.sh
> @@ -225,8 +225,14 @@ for target in $target_list; do
> echo "TARGET_NAME=$arch" >> $config_target_mak
> echo "target=$target" >> $config_target_mak
> case $target in
> - *-linux-user | *-bsd-user)
> + *-linux-user)
> echo "CONFIG_USER_ONLY=y" >> $config_target_mak
> + echo "CONFIG_LINUX_USER=y" >> $config_target_mak
> + echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak
> + ;;
> + *-bsd-user)
> + echo "CONFIG_USER_ONLY=y" >> $config_target_mak
> + echo "CONFIG_BSD_USER=y" >> $config_target_mak
> echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak
I note that this is very subtly different from the logic
used in meson.build for setting CONFIG_LINUX_USER,
which uses "target.endswith('linux-user')" without the
leading hyphen...
Vaguely relatedly, gdbstub.c has some ifdefs:
#if defined(CONFIG_USER_ONLY) && defined(CONFIG_LINUX_USER)
Is it possible for CONFIG_LINUX_USER to be defined when
CONFIG_USER_ONLY is not, or is the first clause in the #if
redundant?
thanks
-- PMM
next prev parent reply other threads:[~2021-12-10 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 8:48 [PATCH] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX Paolo Bonzini
2021-12-10 10:47 ` Peter Maydell [this message]
2021-12-10 11:48 ` Alex Bennée
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=CAFEAcA_Nh4ay7885nOnmA21d3Q2e1BE82zXHtmG6ResDxtYpXQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.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).