Browse Source
Allow users to build QEMU with system-mode emulation
I'm trying to clean up some of my test scripts, and one issue is that
I've got two QEMU builds: one for user-mode emulation and one for
system-mode emulation. This adds an autoconf flag that allows me to
avoid the duplication.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
pull/1073/head
Palmer Dabbelt
4 years ago
No known key found for this signature in database
GPG Key ID: 2E1319F35FBB1889
2 changed files with
13 additions and
1 deletions
Makefile.in
configure.ac
@ -36,6 +36,7 @@ WITH_TUNE ?= @WITH_TUNE@
WITH_ISA_SPEC ?= @WITH_ISA_SPEC@
SYSROOT := $( INSTALL_DIR) /sysroot
ENABLE_LIBSANITIZER ?= @enable_libsanitizer@
QEMU_TARGETS ?= @qemu_targets@
SHELL := /bin/sh
AWK := @GAWK@
@ -848,7 +849,7 @@ stamps/build-qemu: $(QEMU_SRCDIR) $(QEMU_SRC_GIT)
mkdir $( notdir $@ )
cd $( notdir $@ ) && $</configure \
--prefix= $( INSTALL_DIR) \
--target-list= riscv64-linux-user,riscv32-linux-user \
--target-list= $( QEMU_TARGETS) \
--interp-prefix= $( INSTALL_DIR) /sysroot \
--python= python3
$( MAKE) -C $( notdir $@ )
@ -257,4 +257,15 @@ AS_IF([test "x$enable_libsanitizer" != xno],
[AC_SUBST(enable_libsanitizer, --enable-libsanitizer)],
[AC_SUBST(enable_libsanitizer, --disable-libsanitizer)])
AC_ARG_ENABLE(qemu_system,
[AS_HELP_STRING([--enable-qemu-system],
[Build qemu with system-mode emulation])],
[],
[enable_qemu_system=no]
)
AS_IF([test "x$enable_qemu_system" != xno],
[AC_SUBST(qemu_targets, [riscv64-linux-user,riscv32-linux-user,riscv64-softmmu,riscv32-softmmu])],
[AC_SUBST(qemu_targets, [riscv64-linux-user,riscv32-linux-user])])
AC_OUTPUT