guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: ipxe-qemu: Fix building on 32-bit systems.


From: guix-commits
Subject: branch master updated: gnu: ipxe-qemu: Fix building on 32-bit systems.
Date: Thu, 22 Dec 2022 15:12:47 -0500

This is an automated email from the git hooks/post-receive script.

efraim pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 6ce7904a85 gnu: ipxe-qemu: Fix building on 32-bit systems.
6ce7904a85 is described below

commit 6ce7904a85154fece2c159d26b39bfa54b36101a
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Dec 22 22:09:58 2022 +0200

    gnu: ipxe-qemu: Fix building on 32-bit systems.
    
    * gnu/packages/bootloaders.scm (ipxe-qemu)[native-inputs]: When building
    from a 32-bit system add a binutils variant capable of assembling 64-bit
    instructions and an ld-wrapper using it.
---
 gnu/packages/bootloaders.scm | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 464a6f54c1..57705cf596 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1547,10 +1547,27 @@ the features of iPXE without the hassle of reflashing.")
      (if (target-x86-64?)
          (modify-inputs (package-native-inputs ipxe)
            (prepend edk2-tools))
-         (modify-inputs (package-native-inputs ipxe)
-           (prepend edk2-tools
-                    (cross-gcc "x86_64-linux-gnu")
-                    (cross-binutils "x86_64-linux-gnu")))))
+         (if (target-64bit?)
+           (modify-inputs (package-native-inputs ipxe)
+             (prepend edk2-tools
+                      (cross-gcc "x86_64-linux-gnu")
+                      (cross-binutils "x86_64-linux-gnu")))
+           ;; Our default 32-bit binutils is not 64-bit capable.
+           (let ((binutils-64-bit-bfd
+                   (package/inherit
+                     binutils
+                     (name "binutils-64-bit-bfd")
+                     (arguments
+                       (substitute-keyword-arguments (package-arguments 
binutils)
+                        ((#:configure-flags flags ''())
+                         `(cons "--enable-64-bit-bfd" ,flags)))))))
+             (modify-inputs (package-native-inputs ipxe)
+               (prepend edk2-tools
+                        (make-ld-wrapper "ld-wrapper-64-bit-bfd"
+                                         #:binutils binutils)
+                        binutils-64-bit-bfd
+                        (cross-gcc "x86_64-linux-gnu")
+                        (cross-binutils "x86_64-linux-gnu")))))))
     (arguments
      (let ((roms
             ;; Alist of ROM -> (VID . DID) entries.  This list and below



reply via email to

[Prev in Thread] Current Thread [Next in Thread]