gnu: make-bootstrap: Restore cross-compilation workarounds.

These workarounds were removed in cf82643647 and
218eb6e611, but were needed for %BOOTSTRAP-TARBALLS.

* gnu/packages/make-bootstrap.scm (%static-inputs)[coreutils, tar]: Add
<#:configure-flags>.
This commit is contained in:
Marius Bakke 2019-06-21 09:33:31 +02:00
parent 209214aaef
commit 7c836efacc
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 25 additions and 12 deletions

View File

@ -150,7 +150,15 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
"--disable-silent-rules"
"--enable-no-install-program=stdbuf,libstdbuf.so"
"CFLAGS=-Os -g0" ; smaller, please
"LDFLAGS=-static -pthread")
"LDFLAGS=-static -pthread"
;; Work around a cross-compilation bug whereby libcoreutils.a
;; would provide '__mktime_internal', which conflicts with the
;; one in libc.a.
,@(if (%current-target-system)
`("gl_cv_func_working_mktime=yes")
'()))
#:tests? #f ; signal-related Gnulib tests fail
,@(package-arguments coreutils)))
@ -213,17 +221,22 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
'()))))
(tar (package (inherit tar)
(arguments
(substitute-keyword-arguments (package-arguments tar)
((#:phases phases)
`(modify-phases ,phases
(replace 'set-shell-file-name
(lambda _
;; Do not use "/bin/sh" to run programs; see
;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg02272.html>.
(substitute* "src/system.c"
(("/bin/sh") "sh")
(("execv ") "execvp "))
#t))))))))
`(;; Work around a cross-compilation bug whereby libgnu.a would provide
;; '__mktime_internal', which conflicts with the one in libc.a.
,@(if (%current-target-system)
`(#:configure-flags '("gl_cv_func_working_mktime=yes"))
'())
,@(substitute-keyword-arguments (package-arguments tar)
((#:phases phases)
`(modify-phases ,phases
(replace 'set-shell-file-name
(lambda _
;; Do not use "/bin/sh" to run programs; see
;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg02272.html>.
(substitute* "src/system.c"
(("/bin/sh") "sh")
(("execv ") "execvp "))
#t)))))))))
;; We don't want to retain a reference to /gnu/store in the bootstrap
;; versions of egrep/fgrep, so we remove the custom phase added since
;; grep@2.25. The effect is 'egrep' and 'fgrep' look for 'grep' in