[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/06: gnu: ustr: Cross-compile.
From: |
guix-commits |
Subject: |
06/06: gnu: ustr: Cross-compile. |
Date: |
Wed, 28 Apr 2021 14:50:20 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 1059d1570b7078e6a83e067577b42ed24ee25b55
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Wed Apr 28 20:33:44 2021 +0200
gnu: ustr: Cross-compile.
Also fix <http://issues.guix.gnu.org/48084>.
* gnu/packages/text-utils.scm (ustr)[arguments]: Use CC-FOR-TARGET.
Add a new 'fix-cross-compilation phase.
---
gnu/packages/textutils.scm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index e7968c3..b04abbd 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -315,7 +315,7 @@ input bits thoroughly but are not suitable for
cryptography.")
(build-system gnu-build-system)
(arguments
`(#:make-flags
- (list "CC=gcc"
+ (list (string-append "CC=" ,(cc-for-target))
"HIDE="
;; Override "/sbin/ldconfig" with "echo" because we don't need
;; "ldconfig".
@@ -324,6 +324,18 @@ input bits thoroughly but are not suitable for
cryptography.")
"all-shared")
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-cross-compilation
+ ;; The Makefile contains more insults than cross-compilation
support.
+ ;; It poorly reinvents autotools by compiling C programmes with $CC,
+ ;; then tries to run them during the build. Hard-code the results.
+ (lambda _
+ (substitute* "Makefile"
+ (("\\./autoconf_64b")
+ ,(if (target-64bit? (or (%current-target-system)
+ (%current-system)))
+ "echo 1"
+ "echo 0"))
+ (("\\./autoconf_vsnprintf") "echo 1"))))
(add-after 'unpack 'disable-check-for-stdint
(lambda _
;; Of course we have stdint.h, just not in /usr/include
- branch master updated (8dcbd8a -> 1059d15), guix-commits, 2021/04/28
- 03/06: gnu: folly: Update to 2021.04.26.00., guix-commits, 2021/04/28
- 04/06: gnu: iproute2: Update to 5.12.0., guix-commits, 2021/04/28
- 01/06: gnu: fcitx-qt5: Update to 1.2.6., guix-commits, 2021/04/28
- 02/06: gnu: xsimd: Update to 7.5.0., guix-commits, 2021/04/28
- 06/06: gnu: ustr: Cross-compile.,
guix-commits <=
- 05/06: gnu: less: Update to 581.2., guix-commits, 2021/04/28