unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: 36322@debbugs.gnu.org
Subject: [bug#36322] [PATCH 2/4] gnu: make-bootstrap: Restore cross-compilation workarounds.
Date: Fri, 21 Jun 2019 14:26:26 +0200	[thread overview]
Message-ID: <20190621122628.18174-2-mbakke@fastmail.com> (raw)
In-Reply-To: <20190621122628.18174-1-mbakke@fastmail.com>

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

* gnu/packages/make-bootstrap.scm (%static-inputs)[coreutils, tar]: Add
<#:configure-flags>.
---
 gnu/packages/make-bootstrap.scm | 37 ++++++++++++++++++++++-----------
 1 file changed, 25 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index ec477da7c8..561a286d26 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -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
-- 
2.22.0

  reply	other threads:[~2019-06-21 12:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 12:24 [bug#36322] [PATCH 0/4] [core-updates] Fix cross-compiling bootstrap tarballs Marius Bakke
2019-06-21 12:26 ` [bug#36322] [PATCH 1/4] gnu: make-bootstrap: Remove obsolete header file Marius Bakke
2019-06-21 12:26   ` Marius Bakke [this message]
2019-06-21 12:26   ` [bug#36322] [PATCH 3/4] gnu: make-bootstrap: Adjust for GCC 7 Marius Bakke
2019-06-21 12:26   ` [bug#36322] [PATCH 4/4] gnu: bootstrap-tarballs: Don't include the native mes when cross-compiling Marius Bakke
2022-04-07 13:18 ` [bug#36322] [PATCH 0/4] [core-updates] Fix cross-compiling bootstrap tarballs zimoun
2022-04-07 21:15   ` bug#36322: " Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190621122628.18174-2-mbakke@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=36322@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).