guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: grub: Fix build on i686.


From: Ludovic Courtès
Subject: 01/01: gnu: grub: Fix build on i686.
Date: Fri, 15 Jun 2018 10:42:42 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit a7c8716928a240ba2c36d360e4ffeb447671fa6b
Author: Mark H Weaver <address@hidden>
Date:   Fri Jun 15 13:48:51 2018 +0200

    gnu: grub: Fix build on i686.
    
    Fixes <https://bugs.gnu.org/31380>.
    
    * gnu/packages/bootloaders.scm (grub)[native-inputs]: Add "ld-wrapper"
    and "binutils".
    
    Co-authored-by: Ludovic Courtès <address@hidden>
---
 gnu/packages/bootloaders.scm | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index c58fe07..eb1e433 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès 
<address@hidden>
 ;;; Copyright © 2015, 2018 Mark H Weaver <address@hidden>
 ;;; Copyright © 2015 Leo Famulari <address@hidden>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <address@hidden>
@@ -61,7 +61,8 @@
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26))
+  #:use-module (srfi srfi-26)
+  #:use-module (ice-9 regex))
 
 (define unifont
   ;; GNU Unifont, <http://gnu.org/s/unifont>.
@@ -144,6 +145,22 @@
        ("texinfo" ,texinfo)
        ("help2man" ,help2man)
 
+       ;; XXX: When building GRUB 2.02 on 32-bit x86, we need a binutils
+       ;; capable of assembling 64-bit instructions.  However, our default
+       ;; binutils on 32-bit x86 is not 64-bit capable.
+       ,@(if (string-match "^i[3456]86-" (%current-system))
+             (let ((binutils (package/inherit
+                              binutils
+                              (name "binutils-i386")
+                              (arguments
+                               (substitute-keyword-arguments 
(package-arguments binutils)
+                                 ((#:configure-flags flags ''())
+                                  `(cons "--enable-64-bit-bfd" ,flags)))))))
+               `(("ld-wrapper" ,(make-ld-wrapper "ld-wrapper-i386"
+                                                 #:binutils binutils))
+                 ("binutils" ,binutils)))
+             '())
+
        ;; Dependencies for the test suite.  The "real" QEMU is needed here,
        ;; because several targets are used.
        ("parted" ,parted)



reply via email to

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