* [PATCH] partial fix for zlib cross compilation
@ 2013-12-10 10:49 John Darrington
2013-12-10 13:00 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: John Darrington @ 2013-12-10 10:49 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 364 bytes --]
zlib in its wisdom, doesn't use autoconf. Hence there are special
methods for cross compiling. This patch implements one of these methods.
Certain targets will need further patches ...
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
[-- Attachment #2: 0001-gnu-compression-Fix-cross-compilation-of-zlib.patch --]
[-- Type: text/x-diff, Size: 1441 bytes --]
From 592a7329b446d2d8e8a1f7c2e5e6bcb622c7c69c Mon Sep 17 00:00:00 2001
From: John Darrington <jmd@gnu.org>
Date: Mon, 9 Dec 2013 22:57:15 +0100
Subject: [PATCH] gnu: compression: Fix cross-compilation of zlib.
* gnu/packages/compression.scm : Zlib uses a non-standard
way of configuring for cross-compilation. Thanks to Ludovic
for showing me the correct way to fix this.
---
gnu/packages/compression.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index efffa92..723caa8 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -48,8 +48,11 @@
;; extra flags like `--enable-fast-install', so we need to
;; invoke it with just what it understand.
(let ((out (assoc-ref outputs "out")))
- (zero? (system* "./configure"
- (string-append "--prefix=" out)))))
+ ,@(if (%current-target-system) `((setenv "CHOST"
+ ,(%current-target-system))) '())
+ (zero?
+ (system* "./configure"
+ (string-append "--prefix=" out)))))
%standard-phases)))
(home-page "http://zlib.net/")
(synopsis "The zlib compression library")
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] partial fix for zlib cross compilation
2013-12-10 10:49 [PATCH] partial fix for zlib cross compilation John Darrington
@ 2013-12-10 13:00 ` Ludovic Courtès
2013-12-10 13:47 ` John Darrington
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2013-12-10 13:00 UTC (permalink / raw)
To: John Darrington; +Cc: guix-devel
John Darrington <john@darrington.wattle.id.au> skribis:
> From 592a7329b446d2d8e8a1f7c2e5e6bcb622c7c69c Mon Sep 17 00:00:00 2001
> From: John Darrington <jmd@gnu.org>
> Date: Mon, 9 Dec 2013 22:57:15 +0100
> Subject: [PATCH] gnu: compression: Fix cross-compilation of zlib.
>
> * gnu/packages/compression.scm : Zlib uses a non-standard
> way of configuring for cross-compilation. Thanks to Ludovic
> for showing me the correct way to fix this.
Applied with proper formatting. Thanks!
> - (zero? (system* "./configure"
> - (string-append "--prefix=" out)))))
> + ,@(if (%current-target-system) `((setenv "CHOST"
> + ,(%current-target-system))) '())
Do you know whether all GNU triplets are recognized, or if there’s some
special treatment going on? (I confirm it does the right thing for
‘mips64el-linux-gnu’.)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] partial fix for zlib cross compilation
2013-12-10 13:00 ` Ludovic Courtès
@ 2013-12-10 13:47 ` John Darrington
0 siblings, 0 replies; 3+ messages in thread
From: John Darrington @ 2013-12-10 13:47 UTC (permalink / raw)
To: Ludovic Court??s; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]
On Tue, Dec 10, 2013 at 02:00:15PM +0100, Ludovic Court??s wrote:
John Darrington <john@darrington.wattle.id.au> skribis:
> - (zero? (system* "./configure"
> - (string-append "--prefix=" out)))))
> + ,@(if (%current-target-system) `((setenv "CHOST"
> + ,(%current-target-system))) '())
Do you know whether all GNU triplets are recognized, or if there???s some
special treatment going on? (I confirm it does the right thing for
???mips64el-linux-gnu???.)
Most work without special treatment. The main exception is mingw compiled targets,
for which ./configure should not be called at all. Instead there is a dedicated
Makefile for the purpose.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-10 13:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 10:49 [PATCH] partial fix for zlib cross compilation John Darrington
2013-12-10 13:00 ` Ludovic Courtès
2013-12-10 13:47 ` John Darrington
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.