From 08e6d08acea8ac91619c5be4223d44e49f6476a7 Mon Sep 17 00:00:00 2001 From: dramforever Date: Sat, 4 Feb 2023 11:39:08 +0800 Subject: [PATCH] qemu: Remove --cpu= flag './configure --cpu=$(uname -m)' (essentially) breaks the case of riscv, where the configure script expects '--cpu=riscv', but 'uname -m' gives 'riscv{32,64}'. This eventually leads to user-mode emulation being disabled. Since the configure script can auto-detect the parameter based on compilers, remove this flag. Originally added in #147692, but apparently it's not needed and @NickCao couldn't remember why it was added. See also mailing list discussion at https://lore.kernel.org/qemu-devel/20230204112502.2558739-1-mjt@msgid.tls.msk.ru/T/ --- pkgs/applications/virtualization/qemu/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 6d40ba2660e3f..c20a2c53d6002 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -149,7 +149,6 @@ stdenv.mkDerivation rec { # have our patches and will be subtly broken because of that. "--meson=meson" "--cross-prefix=${stdenv.cc.targetPrefix}" - "--cpu=${stdenv.hostPlatform.uname.processor}" (lib.enableFeature guestAgentSupport "guest-agent") ] ++ lib.optional numaSupport "--enable-numa" ++ lib.optional seccompSupport "--enable-seccomp"