guix-commits
[Top][All Lists]
Advanced

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

02/03: gnu: efibootmgr: Fix cross compiling.


From: guix-commits
Subject: 02/03: gnu: efibootmgr: Fix cross compiling.
Date: Sun, 15 May 2022 09:02:01 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 00838bd41ce7f1e4bf0d9d65bcf0f96fa781f6f4
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun May 15 15:56:13 2022 +0300

    gnu: efibootmgr: Fix cross compiling.
    
    Fixes <https://issues.guix.gnu.org/55373>.
    
    * gnu/packages/linux.scm (efibootmgr)[arguments]: When cross-compiling
    add make-flags to find and use the correct binaries and libraries.
---
 gnu/packages/linux.scm | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 95f2e96f17..eb92ac3f9f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -6805,14 +6805,22 @@ interface to the variable facility of UEFI boot 
firmware.")
     (arguments
      (list
       #:tests? #f                       ;no tests
-      #:make-flags #~(list (string-append "prefix=" #$output)
-                           (string-append "libdir=" #$output "/lib")
-                           ;; EFIDIR denotes a subdirectory relative to the
-                           ;; EFI System Partition where the loader will be
-                           ;; installed (known as OS_VENDOR in the code).
-                           ;; GRUB overrides this, as such it's only used if
-                           ;; nothing else is specified on the command line.
-                           "EFIDIR=gnu")
+      #:make-flags
+      #~(append (list (string-append "prefix=" #$output)
+                      (string-append "libdir=" #$output "/lib")
+                      ;; EFIDIR denotes a subdirectory relative to the
+                      ;; EFI System Partition where the loader will be
+                      ;; installed (known as OS_VENDOR in the code).
+                      ;; GRUB overrides this, as such it's only used if
+                      ;; nothing else is specified on the command line.
+                      "EFIDIR=gnu")
+                #$(if (%current-target-system)
+                    #~(list
+                        (string-append "CC=" #$(cc-for-target))
+                        (string-append "PKG_CONFIG=" #$(pkg-config-for-target))
+                        (string-append "EXTRAINCDIRS="
+                                       #$(this-package-input "efivar") 
"/include"))
+                    #~'()))
       #:phases #~(modify-phases %standard-phases (delete 'configure))))
     (native-inputs
      (list pkg-config))



reply via email to

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