From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwpaF-0006Lq-7d for guix-patches@gnu.org; Mon, 03 Sep 2018 10:12:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwpaE-0006qb-7w for guix-patches@gnu.org; Mon, 03 Sep 2018 10:12:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:39427) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fwpaE-0006qR-3f for guix-patches@gnu.org; Mon, 03 Sep 2018 10:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fwpaD-0003fU-Mw for guix-patches@gnu.org; Mon, 03 Sep 2018 10:12:01 -0400 Subject: [bug#32624] [PATCH] gnu: perl: Add support for cross-compilation Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwpZ5-000632-Ew for guix-patches@gnu.org; Mon, 03 Sep 2018 10:10:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwpZ4-0006T9-9h for guix-patches@gnu.org; Mon, 03 Sep 2018 10:10:51 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:43245) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fwpZ2-0006SC-Qj for guix-patches@gnu.org; Mon, 03 Sep 2018 10:10:49 -0400 Received: by mail-ed1-x52f.google.com with SMTP id z27-v6so878805edb.10 for ; Mon, 03 Sep 2018 07:10:48 -0700 (PDT) Received: from junian ([2a02:a03f:3cac:be00:605f:1663:ba9e:cd9e]) by smtp.gmail.com with ESMTPSA id l48-v6sm8657879eda.94.2018.09.03.07.10.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Sep 2018 07:10:46 -0700 (PDT) From: "=?UTF-8?Q?Rapha=C3=ABl_?= =?UTF-8?Q?M=C3=A9lotte?=" Date: Mon, 03 Sep 2018 16:10:44 +0200 Message-ID: <87bm9er7rv.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32624@debbugs.gnu.org --=-=-= Content-Type: text/plain This patch adds support for cross-compilation for perl. I only applied the suggestion made by Chris here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31221 I tested it by running the following command, which builds perl successfully: sudo -E ./pre-inst-env guix build --target=i686-pc-linux-gnu perl --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-perl-Add-support-for-cross-compilation.patch >From 1aa61436c6c85ebfdea9aceeb3949ac97fdbe289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= Date: Mon, 3 Sep 2018 10:20:06 +0200 Subject: [PATCH] gnu: perl: Add support for cross-compilation * gnu/packages/perl.scm (perl): use cross-libc when cross-compiling --- gnu/packages/perl.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 4d70e019b..b10be9567 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -48,6 +48,7 @@ #:use-module (guix utils) ;substitute-keyword-arguments for perl-5.26.2 #:use-module (gnu packages base) #:use-module (gnu packages compression) + #:use-module (gnu packages cross-base) #:use-module (gnu packages freedesktop) #:use-module (gnu packages perl-check) #:use-module (gnu packages perl-web) @@ -79,7 +80,7 @@ "perl-reproducible-build-date.patch")))) (build-system gnu-build-system) (arguments - '(#:tests? #f + `(#:tests? #f #:configure-flags (let ((out (assoc-ref %outputs "out")) (libc (assoc-ref %build-inputs "libc"))) @@ -128,7 +129,10 @@ (add-after 'install 'remove-extra-references (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (libc (assoc-ref inputs "libc")) + (libc (assoc-ref inputs + (if ,(%current-target-system) + "cross-libc" + "libc"))) (config1 (car (find-files (string-append out "/lib/perl5") "^Config_heavy\\.pl$"))) (config2 (find-files (string-append out "/lib/perl5") -- 2.11.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 DQotLSANClJhcGhhw6tsIE3DqWxvdHRlDQo= --=-=-=--