guix-commits
[Top][All Lists]
Advanced

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

03/03: gnu: isc-dhcp: Fix cross-compilation.


From: guix-commits
Subject: 03/03: gnu: isc-dhcp: Fix cross-compilation.
Date: Wed, 11 Mar 2020 14:11:40 -0400 (EDT)

mbakke pushed a commit to branch master
in repository guix.

commit f8cbe98e65c9cabcad420f98c855aa20ac1a25a0
Author: Marius Bakke <address@hidden>
AuthorDate: Wed Mar 11 19:02:46 2020 +0100

    gnu: isc-dhcp: Fix cross-compilation.
    
    * gnu/packages/admin.scm (isc-dhcp)[arguments]: Set BUILD_CC in
    'fix-bind-cross-compilation' phase.  While at it, make the phase conditional
    on %CURRENT-TARGET-SYSTEM.
---
 gnu/packages/admin.scm | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 51a7430..0f27e63 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -18,7 +18,7 @@
 ;;; Copyright © 2017 Ben Sturmfels <address@hidden>
 ;;; Copyright © 2017 Ethan R. Jones <address@hidden>
 ;;; Copyright © 2017 Christopher Allan Webber <address@hidden>
-;;; Copyright © 2017, 2018 Marius Bakke <address@hidden>
+;;; Copyright © 2017, 2018, 2020 Marius Bakke <address@hidden>
 ;;; Copyright © 2018, 2019 Arun Isaac <address@hidden>
 ;;; Copyright © 2018 Pierre-Antoine Rouby <address@hidden>
 ;;; Copyright © 2018 Rutger Helling <address@hidden>
@@ -809,12 +809,17 @@ connection alive.")
                  (("^RELEASEVER=.*")
                   (format #f "RELEASEVER=~a\n" ,bind-release-version)))
                #t))
-           (add-before 'configure 'fix-bind-cross-compilation
-             (lambda _
-               (substitute* "configure"
-                 (("--host=\\$host")
-                  "--host=$host_alias"))
-               #t))
+           ,@(if (%current-target-system)
+                 '((add-before 'configure 'fix-bind-cross-compilation
+                     (lambda _
+                       (substitute* "configure"
+                         (("--host=\\$host")
+                          "--host=$host_alias"))
+                       ;; BIND needs a native compiler because the DHCP
+                       ;; build system uses the built 'gen' executable.
+                       (setenv "BUILD_CC" "gcc")
+                       #t)))
+                 '())
            (add-after 'configure 'post-configure
              (lambda* (#:key outputs #:allow-other-keys)
                ;; Point to the right client script, which will be



reply via email to

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