[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: coreutils: Fix cross-compilation.
From: |
Ludovic Courtès |
Subject: |
01/02: gnu: coreutils: Fix cross-compilation. |
Date: |
Fri, 29 Dec 2017 07:45:35 -0500 (EST) |
civodul pushed a commit to branch core-updates
in repository guix.
commit f3c294a2abdfd358c57276b42d535266e2f19984
Author: Ludovic Courtès <address@hidden>
Date: Fri Dec 29 13:15:42 2017 +0100
gnu: coreutils: Fix cross-compilation.
Previously cross-compiling coreutils would fail with:
aarch64-linux-gnu-gcc -Os -g0 -Wl,--as-needed -static -pthread -o
src/uptime src/uptime.o src/libver.a lib/libcoreutils.a lib/libcoreutils.a
/gnu/store/hk8615wmmzk28k5z06g69jm6vbhc8lgk-glibc-cross-aarch64-linux-gnu-2.26.105-g0890d5379c-static/lib/libc.a(mktime.o):
In function `__mktime_internal':
/tmp/guix-build-glibc-cross-aarch64-linux-gnu-2.26.105-g0890d5379c.drv-0/glibc-2.26-105-g0890d5379c/time/mktime.c:353:
multiple definition of `__mktime_internal'
lib/libcoreutils.a(mktime.o):mktime.c:(.text+0x214): first defined here
collect2: error: ld returned 1 exit status
* gnu/packages/base.scm (coreutils)[arguments]: Add #:configure-flags
when cross-compiling.
---
gnu/packages/base.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 022ee00..53db5fe 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -339,7 +339,13 @@ used to apply commands with arbitrarily long arguments.")
(("/bin/sh") (which "sh")))
(substitute* (find-files "tests" "\\.sh$")
(("#!/bin/sh") (which "sh")))
- #t)))))
+ #t)))
+
+ ;; 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)
+ `(#:configure-flags '("gl_cv_func_working_mktime=yes"))
+ '())))
(synopsis "Core GNU utilities (file, text, shell)")
(description
"GNU Coreutils includes all of the basic command-line tools that are