From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: [PATCH] partial fix for zlib cross compilation Date: Tue, 10 Dec 2013 11:49:06 +0100 Message-ID: <20131210104905.GA27631@jocasta.intra> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="pWyiEgJYm5f9v55/" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqKsS-0001hm-Av for guix-devel@gnu.org; Tue, 10 Dec 2013 05:49:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqKsO-0007u0-Bw for guix-devel@gnu.org; Tue, 10 Dec 2013 05:49:20 -0500 Received: from de.cellform.com ([88.217.224.109]:46864 helo=jocasta.intra) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqKsN-0007sx-UJ for guix-devel@gnu.org; Tue, 10 Dec 2013 05:49:16 -0500 Received: from jocasta.intra (localhost [127.0.0.1]) by jocasta.intra (8.14.4/8.14.4/Debian-4) with ESMTP id rBAAn6Fn027811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 10 Dec 2013 11:49:06 +0100 Received: (from john@localhost) by jocasta.intra (8.14.4/8.14.4/Submit) id rBAAn6ZU027810 for guix-devel@gnu.org; Tue, 10 Dec 2013 11:49:06 +0100 Content-Disposition: inline List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --pWyiEgJYm5f9v55/ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-compression-Fix-cross-compilation-of-zlib.patch" >From 592a7329b446d2d8e8a1f7c2e5e6bcb622c7c69c Mon Sep 17 00:00:00 2001 From: John Darrington 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 --pWyiEgJYm5f9v55/--