unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: coreutils: Fix cross-compilation.
@ 2017-01-25 15:06 manolis837
  2017-01-25 18:01 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: manolis837 @ 2017-01-25 15:06 UTC (permalink / raw)
  To: guix-devel

From: Manolis Ragkousis <manolis837@gmail.com>

* gnu/packages/patches/coreutils-fix-cross-compilation.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/base.scm [source]: Use it.
---
 gnu/local.mk                                              |  1 +
 gnu/packages/base.scm                                     |  3 ++-
 .../patches/coreutils-fix-cross-compilation.patch         | 15 +++++++++++++++
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/coreutils-fix-cross-compilation.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 532ea51dd..82bf89cf7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -510,6 +510,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/clx-remove-demo.patch			\
   %D%/packages/patches/cmake-fix-tests.patch			\
   %D%/packages/patches/coda-use-system-libs.patch		\
+  %D%/packages/patches/coreutils-fix-cross-compilation.patch    \
   %D%/packages/patches/cpio-CVE-2016-2037.patch			\
   %D%/packages/patches/cpufrequtils-fix-aclocal.patch		\
   %D%/packages/patches/cracklib-CVE-2016-6318.patch		\
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index f6946f3c9..703274d0c 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -291,7 +291,8 @@ used to apply commands with arbitrarily long arguments.")
                                 version ".tar.xz"))
             (sha256
              (base32
-              "13lspazc7xkviy93qz7ks9jv4sldvgmwpq36ghrbrqpq93br8phm"))))
+              "13lspazc7xkviy93qz7ks9jv4sldvgmwpq36ghrbrqpq93br8phm"))
+            (patches (search-patches "coreutils-fix-cross-compilation.patch"))))
    (build-system gnu-build-system)
    (inputs `(("acl"  ,acl)                        ; TODO: add SELinux
              ("gmp"  ,gmp)                        ;bignums in 'expr', yay!
diff --git a/gnu/packages/patches/coreutils-fix-cross-compilation.patch b/gnu/packages/patches/coreutils-fix-cross-compilation.patch
new file mode 100644
index 000000000..3f0d35c33
--- /dev/null
+++ b/gnu/packages/patches/coreutils-fix-cross-compilation.patch
@@ -0,0 +1,15 @@
+Coreutils fails to cross compile for other platforms because cu_install_program
+is not being evaluated properly. This patch fixes it.
+See <https://lists.gnu.org/archive/html/coreutils/2017-01/msg00039.html>
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -5023,7 +5023,7 @@ pr = progs-readme
+ @CROSS_COMPILING_FALSE@cu_install_program = src/ginstall
+ 
+ # Use the just-built 'ginstall', when not cross-compiling.
+-@CROSS_COMPILING_TRUE@cu_install_program = @INSTALL_PROGRAM@
++@CROSS_COMPILING_TRUE@cu_install_program := @INSTALL@
+ info_TEXINFOS = doc/coreutils.texi
+ doc_coreutils_TEXINFOS = \
+   doc/perm.texi \
+
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: coreutils: Fix cross-compilation.
  2017-01-25 15:06 [PATCH] gnu: coreutils: Fix cross-compilation manolis837
@ 2017-01-25 18:01 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2017-01-25 18:01 UTC (permalink / raw)
  To: manolis837; +Cc: guix-devel

Hi Manolis!

manolis837@gmail.com skribis:

> From: Manolis Ragkousis <manolis837@gmail.com>
>
> * gnu/packages/patches/coreutils-fix-cross-compilation.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/base.scm [source]: Use it.

[...]

> --- /dev/null
> +++ b/gnu/packages/patches/coreutils-fix-cross-compilation.patch
> @@ -0,0 +1,15 @@
> +Coreutils fails to cross compile for other platforms because cu_install_program
> +is not being evaluated properly. This patch fixes it.
> +See <https://lists.gnu.org/archive/html/coreutils/2017-01/msg00039.html>
> +--- a/Makefile.in
> ++++ b/Makefile.in
> +@@ -5023,7 +5023,7 @@ pr = progs-readme
> + @CROSS_COMPILING_FALSE@cu_install_program = src/ginstall
> + 
> + # Use the just-built 'ginstall', when not cross-compiling.
> +-@CROSS_COMPILING_TRUE@cu_install_program = @INSTALL_PROGRAM@
> ++@CROSS_COMPILING_TRUE@cu_install_program := @INSTALL@
> + info_TEXINFOS = doc/coreutils.texi

LGTM!  Even if upstream settles on a different approach, this patch is
fine for our purposes.

Thanks for investigating!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-25 18:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-25 15:06 [PATCH] gnu: coreutils: Fix cross-compilation manolis837
2017-01-25 18:01 ` Ludovic Courtès

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).