diff mbox series

[bug#36477,v3,17/48] gnu: lvm2: Fix cross-compilation.

Message ID 20190902153333.11190-18-m.othacehe@gmail.com
State Accepted
Headers show
Series Add --target support to guix system | expand

Commit Message

Mathieu Othacehe Sept. 2, 2019, 3:33 p.m. UTC
* gnu/packages/linux.scm (lvm2)[arguments]: Add cross-compilation specific
configure-flags.
---
 gnu/packages/linux.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0225f8c376..afa860830b 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2654,7 +2654,7 @@  time.")
     (inputs
      `(("udev" ,eudev)))
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-after 'configure 'set-makefile-shell
            (lambda _
@@ -2689,7 +2689,12 @@  time.")
                                               (assoc-ref %outputs "out")
                                               "/lib,-rpath="
                                               (assoc-ref %outputs "out")
-                                              "/lib/device-mapper"))
+                                              "/lib/device-mapper")
+                               ;; This is needed when cross-compiling.
+                               ,@(if (%current-target-system)
+                                     '("ac_cv_func_malloc_0_nonnull=yes"
+                                       "ac_cv_func_realloc_0_nonnull=yes")
+                                     '()))
 
        ;; The tests use 'mknod', which requires root access.
        #:tests? #f))