From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH 6/9] configure: move CONFIG_* symbols to meson
Date: Sun, 20 Sep 2020 09:07:05 -0400 [thread overview]
Message-ID: <20200920130708.1156310-7-pbonzini@redhat.com> (raw)
In-Reply-To: <20200920130708.1156310-1-pbonzini@redhat.com>
These symbols are easily computed from just the target name,
so remove them from config-target.mak.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 11 +----------
meson.build | 27 ++++++++++++++++++++++++---
2 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index df3b031b1c..e64327e0f8 100755
--- a/configure
+++ b/configure
@@ -7612,7 +7612,6 @@ upper() {
target_arch_name="$(upper $TARGET_ARCH)"
echo "TARGET_$target_arch_name=y" >> $config_target_mak
-echo "TARGET_NAME=$target_name" >> $config_target_mak
echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
if [ "$TARGET_ABI_DIR" = "" ]; then
TARGET_ABI_DIR=$TARGET_ARCH
@@ -7630,21 +7629,15 @@ if test "$target_bigendian" = "yes" ; then
echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak
fi
if test "$target_softmmu" = "yes" ; then
- echo "CONFIG_SOFTMMU=y" >> $config_target_mak
if test "$mttcg" = "yes" ; then
echo "TARGET_SUPPORTS_MTTCG=y" >> $config_target_mak
fi
fi
if test "$target_user_only" = "yes" ; then
- echo "CONFIG_USER_ONLY=y" >> $config_target_mak
- echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
symlink "../qemu-$target_name" "$target_dir/qemu-$target_name"
else
symlink "../qemu-system-$target_name" "$target_dir/qemu-system-$target_name"
fi
-if test "$target_linux_user" = "yes" ; then
- echo "CONFIG_LINUX_USER=y" >> $config_target_mak
-fi
list=""
if test ! -z "$gdb_xml_files" ; then
for x in $gdb_xml_files; do
@@ -7656,9 +7649,6 @@ fi
if test "$target_user_only" = "yes" && test "$bflt" = "yes"; then
echo "TARGET_HAS_BFLT=y" >> $config_target_mak
fi
-if test "$target_bsd_user" = "yes" ; then
- echo "CONFIG_BSD_USER=y" >> $config_target_mak
-fi
done # for target in $targets
@@ -7668,6 +7658,7 @@ fi
if [ "$capstone" = "git" -o "$capstone" = "internal" ]; then
subdirs="$subdirs capstone"
fi
+echo "CONFIG_QEMU_INTERP_PREFIX=$interp_prefix" | sed 's/%M/@0@/' >> $config_host_mak
echo "SUBDIRS=$subdirs" >> $config_host_mak
if test -n "$LIBCAPSTONE"; then
echo "LIBCAPSTONE=$LIBCAPSTONE" >> $config_host_mak
diff --git a/meson.build b/meson.build
index 7a5eced5f0..6863b9febf 100644
--- a/meson.build
+++ b/meson.build
@@ -639,12 +639,15 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]
config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2])
+ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
strings = ['HOST_DSOSUF', 'CONFIG_IASL', 'bindir', 'prefix', 'qemu_confdir', 'qemu_datadir',
'qemu_moddir', 'qemu_localstatedir', 'qemu_helperdir', 'qemu_localedir',
'qemu_icondir', 'qemu_desktopdir', 'qemu_firmwarepath', 'sysconfdir']
foreach k, v: config_host
- if arrays.contains(k)
+ if ignored.contains(k)
+ # do nothing
+ elif arrays.contains(k)
if v != ''
v = '"' + '", "'.join(v.split()) + '", '
endif
@@ -720,7 +723,23 @@ kconfig_external_symbols = [
ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
foreach target : target_dirs
- config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
+ config_target = { 'TARGET_NAME': target.split('-')[0] }
+ if target.endswith('linux-user')
+ assert(targetos == 'linux')
+ config_target += { 'CONFIG_LINUX_USER': 'y' }
+ elif target.endswith('bsd-user')
+ assert('CONFIG_BSD' in config_host)
+ config_target += { 'CONFIG_BSD_USER': 'y' }
+ elif target.endswith('softmmu')
+ config_target += { 'CONFIG_SOFTMMU': 'y' }
+ endif
+ if target.endswith('-user')
+ config_target += {
+ 'CONFIG_USER_ONLY': 'y',
+ 'CONFIG_QEMU_INTERP_PREFIX':
+ config_host['CONFIG_QEMU_INTERP_PREFIX'].format(config_target['TARGET_NAME'])
+ }
+ endif
have_accel = false
foreach sym: accelerators
@@ -735,6 +754,8 @@ foreach target : target_dirs
endforeach
assert(have_accel)
+ config_target += keyval.load('default-configs/targets' / target + '.mak')
+
foreach k, v: disassemblers
if config_host['ARCH'].startswith(k) or config_target['TARGET_BASE_ARCH'].startswith(k)
foreach sym: v
@@ -752,7 +773,7 @@ foreach target : target_dirs
# do nothing
elif k == 'TARGET_BASE_ARCH'
config_target_data.set('TARGET_' + v.to_upper(), 1)
- elif k == 'TARGET_NAME'
+ elif k == 'TARGET_NAME' or k == 'CONFIG_QEMU_INTERP_PREFIX'
config_target_data.set_quoted(k, v)
elif v == 'y'
config_target_data.set(k, 1)
--
2.26.2
next prev parent reply other threads:[~2020-09-20 13:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 13:06 [RFC PATCH 0/9] Move target configuration to meson Paolo Bonzini
2020-09-20 13:07 ` [PATCH 1/9] default-configs: move files to default-configs/devices/ Paolo Bonzini
2020-09-20 23:56 ` Richard Henderson
2020-09-20 13:07 ` [PATCH 2/9] configure: convert accelerator variables to meson options Paolo Bonzini
2020-09-21 0:04 ` Richard Henderson
2020-09-20 13:07 ` [PATCH 3/9] configure: rewrite accelerator defaults as tests Paolo Bonzini
2020-09-21 0:06 ` Richard Henderson
2020-09-20 13:07 ` [PATCH 4/9] configure: move accelerator logic to meson Paolo Bonzini
2020-09-21 0:17 ` Richard Henderson
2020-09-20 13:07 ` [PATCH 5/9] configure: remove dead variable Paolo Bonzini
2020-09-21 0:17 ` Richard Henderson
2020-09-20 13:07 ` Paolo Bonzini [this message]
2020-09-21 0:20 ` [PATCH 6/9] configure: move CONFIG_* symbols to meson Richard Henderson
2020-09-20 13:07 ` [PATCH 7/9] configure: remove target configuration Paolo Bonzini
2020-09-20 13:13 ` 罗勇刚(Yonggang Luo)
2020-09-20 16:44 ` Paolo Bonzini
2020-09-20 13:07 ` [PATCH 8/9] default-configs/targets: remove useless lines Paolo Bonzini
2020-09-21 0:29 ` Richard Henderson
2020-09-21 7:50 ` Paolo Bonzini
2020-09-20 13:07 ` [PATCH 9/9] default-configs: remove default-configs/devices for user-mode targets Paolo Bonzini
2020-09-21 0:30 ` Richard Henderson
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=20200920130708.1156310-7-pbonzini@redhat.com \
--to=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).