tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX
PATCH 1/1 tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX
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.
--- 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(-)
tests/tcg/configure.sh +7 -1
@@ -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 ;; *-softmmu)
tests/tcg/multiarch/Makefile.target +1 -1
@@ -10,7 +10,7 @@ MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch # Set search path for all sources VPATH += $(MULTIARCH_SRC) MULTIARCH_SRCS = $(notdir $(wildcard $(MULTIARCH_SRC)/*.c)) -ifneq ($(CONFIG_LINUX),) +ifneq ($(CONFIG_LINUX_USER),) VPATH += $(MULTIARCH_SRC)/linux MULTIARCH_SRCS += $(notdir $(wildcard $(MULTIARCH_SRC)/linux/*.c)) endif
tests/tcg/x86_64/Makefile.target +1 -1
@@ -8,7 +8,7 @@ include $(SRC_PATH)/tests/tcg/i386/Makefile.target -ifneq ($(CONFIG_LINUX),) +ifneq ($(CONFIG_LINUX_USER),) X86_64_TESTS += vsyscall TESTS=$(MULTIARCH_TESTS) $(X86_64_TESTS) test-x86_64 else
Signature · 1 line
2.33.1
Quoted 21 lines · Paolo Bonzini
The two more or less overlap, because
CONFIG_LINUXis a requirement for Linux user-mode emulation. However,CONFIG_LINUXis technically a host symbol that applies even to system emulation. DefiningCONFIG_LINUX_USER, andCONFIG_BSD_USERfor eventual future use, is cleaner.Signed-off-by Paolo Bonzini <[email protected]>--- 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(-)tests/tcg/configure.sh +0
-0@@ -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
tests/tcg/configure.sh for target in $target_list; do · line 236
Quoted 10 lines
tests/tcg/configure.sh +7
-1- *-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
Quoted 6 lines · Paolo Bonzini
The two more or less overlap, because
CONFIG_LINUXis a requirement for Linux user-mode emulation. However,CONFIG_LINUXis technically a host symbol that applies even to system emulation. DefiningCONFIG_LINUX_USER, andCONFIG_BSD_USERfor eventual future use, is cleaner.Signed-off-by Paolo Bonzini <[email protected]>
Queued to testing/next, thanks.
Signature · 1 line
Alex Bennée