diff mbox series

[bug#36477,01/31] gnu: perl: Fix cross-compilation.

Message ID 20190708095913.3460-2-m.othacehe@gmail.com
State Accepted
Headers show
Series Fix cross-compilation issues | expand

Commit Message

Mathieu Othacehe July 8, 2019, 9:58 a.m. UTC
* gnu/packages/perl.scm (perl)[arguments]: Use cross-libc instead of libc when
cross-compiling.
---
 gnu/packages/perl.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Marius Bakke July 8, 2019, 5:39 p.m. UTC | #1
Mathieu Othacehe <m.othacehe@gmail.com> writes:

> * gnu/packages/perl.scm (perl)[arguments]: Use cross-libc instead of libc when
> cross-compiling.

[...]

> @@ -81,7 +82,7 @@
>                         "perl-reproducible-build-date.patch"))))
>      (build-system gnu-build-system)
>      (arguments
> -     '(#:tests? #f
> +     `(#:tests? #f
>         #:configure-flags
>         (let ((out  (assoc-ref %outputs "out"))
>               (libc (assoc-ref %build-inputs "libc")))
> @@ -130,7 +131,9 @@
>           (add-after 'install 'remove-extra-references
>             (lambda* (#:key inputs outputs #:allow-other-keys)
>               (let* ((out     (assoc-ref outputs "out"))
> -                    (libc    (assoc-ref inputs "libc"))
> +                    (libc    (assoc-ref inputs
> +                                        ,(if (%current-target-system)
> +                                             "cross-libc" "libc")))
>                      (config1 (car (find-files (string-append out "/lib/perl5")
>                                                "^Config_heavy\\.pl$")))
>                      (config2 (find-files (string-append out "/lib/perl5")

OK!
diff mbox series

Patch

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 63b8e387b8..b348a3e088 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -22,6 +22,7 @@ 
 ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -81,7 +82,7 @@ 
                        "perl-reproducible-build-date.patch"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f
+     `(#:tests? #f
        #:configure-flags
        (let ((out  (assoc-ref %outputs "out"))
              (libc (assoc-ref %build-inputs "libc")))
@@ -130,7 +131,9 @@ 
          (add-after 'install 'remove-extra-references
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out     (assoc-ref outputs "out"))
-                    (libc    (assoc-ref inputs "libc"))
+                    (libc    (assoc-ref inputs
+                                        ,(if (%current-target-system)
+                                             "cross-libc" "libc")))
                     (config1 (car (find-files (string-append out "/lib/perl5")
                                               "^Config_heavy\\.pl$")))
                     (config2 (find-files (string-append out "/lib/perl5")