[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/48: gnu: automake: Support cross-build.
From: |
guix-commits |
Subject: |
03/48: gnu: automake: Support cross-build. |
Date: |
Sun, 19 Apr 2020 10:22:06 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit ec04ee6809979e7987058d366a9b00b81e984d37
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Sat Apr 18 19:50:06 2020 +0200
gnu: automake: Support cross-build.
Automake cannot be cross-built properly: it lacks the concept of
<tool>-for-build. It runs the host `autoconf' during build.
* gnu/packages/autotools.scm (automake)[inputs]: When cross-building, add
autoconf and perl.
[native-inputs]: when cross-building, use -for-build names.
[arguments]: When cross-building, add `fake-cross-build' phase to substitute
autoconf and perl.
---
gnu/packages/autotools.scm | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 91d2c8a..b57ab17 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -286,15 +286,23 @@ output is indexed in many ways to simplify browsing.")
(patches
(search-patches "automake-skip-amhello-tests.patch"))))
(build-system gnu-build-system)
+ (inputs
+ (if (%current-target-system)
+ `(("autoconf" ,autoconf-wrapper)
+ ("perl" ,perl))
+ '()))
(native-inputs
- `(("autoconf" ,autoconf-wrapper)
- ("perl" ,perl)))
+ (if (%current-target-system)
+ `(("autoconf-for-build" ,autoconf-wrapper)
+ ("perl-for-build" ,perl))
+ `(("autoconf" ,autoconf-wrapper)
+ ("perl" ,perl))))
(native-search-paths
(list (search-path-specification
(variable "ACLOCAL_PATH")
(files '("share/aclocal")))))
(arguments
- '(#:modules ((guix build gnu-build-system)
+ `(#:modules ((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1)
(srfi srfi-26)
@@ -323,6 +331,21 @@ output is indexed in many ways to simplify browsing.")
(string-append "exit 77\n" all "\n")))
#t))
+ ,@(if (%current-target-system)
+ ;; Automake cannot be cross-built properly; it lacks the
+ ;; concept of tool-for-build: it uses a single $PERL during
+ ;; build and for host
+ `((add-after 'install 'fake-cross-build
+ (lambda* (#:key build inputs outputs #:allow-other-keys)
+ (let ((autoconf (assoc-ref inputs "autoconf"))
+ (perl (assoc-ref inputs "perl"))
+ (out (assoc-ref outputs "out")))
+ (substitute* (find-files (string-append out "/bin"))
+ (("/gnu/store/[^/]*-autoconf-[^/]*") autoconf)
+ (("/gnu/store/[^/]*-perl-[^/]*") perl))
+ #t))))
+ '())
+
;; Files like `install-sh', `mdate.sh', etc. must use
;; #!/bin/sh, otherwise users could leak erroneous shebangs
;; in the wild. See <http://bugs.gnu.org/14201> for an
- branch wip-hurd-vm created (now ba6bdb0), guix-commits, 2020/04/19
- 01/48: gnu: perl: Actually produce a host perl when cross-compiling., guix-commits, 2020/04/19
- 05/48: vm: Make the device node procedure a parameter., guix-commits, 2020/04/19
- 04/48: gnu: texinfo: Cross-build fix: Use host perl in host scripts., guix-commits, 2020/04/19
- 02/48: gnu: autoconf: Support cross-build., guix-commits, 2020/04/19
- 03/48: gnu: automake: Support cross-build.,
guix-commits <=
- 06/48: syscalls: 'readdir*' chooses between the Linux and Hurd code at run time., guix-commits, 2020/04/19
- 08/48: gnu: hurd: Fix references to /bin/w., guix-commits, 2020/04/19
- 11/48: gnu: Add dde-sources., guix-commits, 2020/04/19
- 13/48: gnu: hurd: Add NFS support., guix-commits, 2020/04/19
- 12/48: gnu: Add netdde., guix-commits, 2020/04/19
- 17/48: services: Add hurd-ttys-service-type., guix-commits, 2020/04/19
- 18/48: services: Add hurd-user-services-service-type., guix-commits, 2020/04/19
- 22/48: services: Add openssh-service as a Hurd service., guix-commits, 2020/04/19
- 15/48: services: Add hurd., guix-commits, 2020/04/19
- 14/48: gnu: Add libtirpc/hurd., guix-commits, 2020/04/19