unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 41074@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#41074] [PATCH] gnu: qemu-minimal: Only build for the host's architecture.
Date: Mon,  4 May 2020 13:25:15 +0300	[thread overview]
Message-ID: <20200504102515.18650-1-efraim@flashner.co.il> (raw)

* gnu/packages/virtualization.scm (qemu-minimal)[arguments]: Adjust
configure-flags so that each architecture only builds for its native
architectures.
[synopsis]: Adjust to clarify it's only for the host's architecture.
---

I tested this with building grub and a vm-image and both seem to have
worked without any regressions.

---
 gnu/packages/virtualization.scm | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index b9ac18820f..e5d678e685 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2017, 2018. 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018. 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017 Andy Patterson <ajpatter@uwaterloo.ca>
@@ -99,7 +99,8 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
-  #:use-module (srfi srfi-1))
+  #:use-module (srfi srfi-1)
+  #:use-module (ice-9 match))
 
 (define (qemu-patch commit file-name sha256)
   "Return an origin for COMMIT."
@@ -274,15 +275,33 @@ server and embedded PowerPC, and S390 guests.")
     (supported-systems (delete "mips64el-linux" %supported-systems))))
 
 (define-public qemu-minimal
-  ;; QEMU without GUI support.
+  ;; QEMU without GUI support, only supporting the host's architecture
   (package (inherit qemu)
     (name "qemu-minimal")
-    (synopsis "Machine emulator and virtualizer (without GUI)")
+    (synopsis
+     "Machine emulator and virtualizer (without GUI) for the host architecture")
     (arguments
      (substitute-keyword-arguments (package-arguments qemu)
        ((#:configure-flags _ '(list))
-        ;; 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 (or (%current-system)
+                       (%current-target-system))
+             ("x86-64-linux"
+              ''("--target-list=i386-softmmu,x86_64-softmmu"))
+             ("i686-linux"
+              ''("--target-list=i386-softmmu"))
+             ("mips64el-linux"
+              ''("--target-list=mips64el-softmmu"))
+             ("aarch64-linux"
+              ''("--target-list=arm-softmmu,aarch64-softmmu"))
+             ("armhf-linux"
+              ''("--target-list=arm-softmmu"))
+             ((or "powerpc64-linux" "powerpc64le-linux")
+              ''("--target-list=ppc-softmmu,ppc64-softmmu"))
+             ("powerpc-linux"
+              ''("--target-list=ppc-softmmu"))
+             (_ ; An empty list actually builds all the targets.
+              ''()))))))
 
     ;; Remove dependencies on optional libraries, notably GUI libraries.
     (native-inputs (fold alist-delete (package-native-inputs qemu)
-- 
2.26.2





             reply	other threads:[~2020-05-04 10:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 10:25 Efraim Flashner [this message]
2020-05-05 16:10 ` [bug#41074] [PATCH] gnu: qemu-minimal: Only build for the host's architecture Leo Famulari
2020-05-06  7:16   ` Efraim Flashner
2020-05-08 10:01 ` Mathieu Othacehe
2020-05-14 14:24   ` bug#41074: " Efraim Flashner

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200504102515.18650-1-efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=41074@debbugs.gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).