- ;; Restrict to the targets supported by Guix.
- ''("--target-list=i386-softmmu,x86_64-softmmu,mips64el-softmmu,arm-softmmu,aarch64-softmmu"))))
+ ;; Restrict to the host's architecture.
+ (match (car (string-split (or (%current-target-system)
+ (%current-system))
+ #\-))
+ ("i686"
+ '(list "--target-list=i386-softmmu"))
+ ("x86_64"
+ '(list "--target-list=i386-softmmu,x86_64-softmmu"))
+ ("mips64"
+ '(list (string-append "--target-list=mips-softmmu,mipsel-softmmu,"
+ "mips64-softmmu,mips64el-softmmu")))
+ ("mips"
+ '(list "--target-list=mips-softmmu,mipsel-softmmu"))
+ ("aarch64"
+ '(list "--target-list=arm-softmmu,aarch64-softmmu"))
+ ("arm"
+ '(list "--target-list=arm-softmmu"))
+ ("alpha"
+ '(list "--target-list=alpha-softmmu"))
+ ("powerpc64"
+ '(list "--target-list=ppc-softmmu,ppc64-softmmu"))
+ ("powerpc"
+ '(list "--target-list=ppc-softmmu"))
+ ("s390"
+ '(list "--target-list=s390x-softmmu"))
+ ("riscv"
+ '(list "--target-list=riscv32-softmmu,riscv64-softmmu"))
+ (else ; An empty list actually builds all the targets.
+ ''())))))