unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Leo Nikkilä" <hello@lnikki.la>
To: 59085@debbugs.gnu.org
Cc: "Leo Nikkilä" <hello@lnikki.la>
Subject: [bug#59085] [PATCH] services: Add x86_64 QEMU target.
Date: Mon,  7 Nov 2022 02:09:45 +0200	[thread overview]
Message-ID: <20221107000945.13446-1-hello@lnikki.la> (raw)

Greetings,

I was trying to build an x86_64 binary on an aarch64 machine, and noticed that
`qemu-binfmt-service-type' was missing the x86_64 platform definition.

* gnu/services/virtualization.scm (%x86_64): Add variable.
(%qemu-platforms) Add it.
---
 gnu/packages/virtualization.scm | 1 +
 gnu/services/virtualization.scm | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 981e5e0cf3..4c8662f770 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -28,6 +28,7 @@
 ;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index cb6227403b..b3dc9d2114 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -611,6 +611,13 @@ (define %i386
    (magic (bv "\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00"))
    (mask (bv "\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff"))))
 
+(define %x86_64
+  (qemu-platform
+   (name "x86_64")
+   (family "i386")
+   (magic (bv "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00"))
+   (mask (bv "\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff"))))
+
 (define %alpha
   (qemu-platform
    (name "alpha")
@@ -767,7 +774,7 @@ (define %hppa
    (mask (bv "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff"))))
 
 (define %qemu-platforms
-  (list %i386 %alpha %arm %sparc32plus %ppc %ppc64 %ppc64le %m68k
+  (list %i386 %x86_64 %alpha %arm %sparc32plus %ppc %ppc64 %ppc64le %m68k
         %mips %mipsel %mipsn32 %mipsn32el %mips64 %mips64el
         %riscv32 %riscv64 %sh4 %sh4eb %s390x %aarch64 %hppa))
 
-- 
2.38.0





             reply	other threads:[~2022-11-07  0:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07  0:09 Leo Nikkilä [this message]
2022-11-07 20:03 ` [bug#59085] [PATCH] services: Add x86_64 QEMU target Christopher Baines
2022-11-07 20:55 ` [bug#59085] [PATCH] gnu: Fix copyright line Leo Nikkilä
2022-11-20 12:07   ` Christopher Baines

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=20221107000945.13446-1-hello@lnikki.la \
    --to=hello@lnikki.la \
    --cc=59085@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).