mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
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.
This commit is contained in:
parent
f3b2d6681c
commit
1059d1570b
1 changed files with 13 additions and 1 deletions
|
@ -315,7 +315,7 @@ (define-public ustr
|
|||
(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 @@ (define-public ustr
|
|||
"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
|
||||
|
|
Loading…
Reference in a new issue