From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:56176) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn7Ww-0000Ka-VL for guix-patches@gnu.org; Mon, 15 Jul 2019 16:25:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn7Ww-0001j6-2z for guix-patches@gnu.org; Mon, 15 Jul 2019 16:25:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40399) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn7Wv-0001it-Ux for guix-patches@gnu.org; Mon, 15 Jul 2019 16:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hn7Wv-0001Cy-L1 for guix-patches@gnu.org; Mon, 15 Jul 2019 16:25:01 -0400 Subject: [bug#36477] [PATCH 07/31] gnu: libgpg-error: Fix cross compilation. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190708095913.3460-1-m.othacehe@gmail.com> <20190708095913.3460-8-m.othacehe@gmail.com> Date: Mon, 15 Jul 2019 22:24:38 +0200 In-Reply-To: <20190708095913.3460-8-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Mon, 8 Jul 2019 11:58:49 +0200") Message-ID: <877e8jhwqh.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Mathieu Othacehe Cc: 36477@debbugs.gnu.org Hello, Mathieu Othacehe skribis: > * gnu/packages/gnupg.scm (libgpg-error)[arguments]: Add a lock-obj header= to > the target platform when cross-compiling, > [native-inputs]: add gettext that is needed when cross-compiling. [...] > + (arguments > + (if (%current-target-system) > + `(#:modules ((ice-9 match) > + (guix build gnu-build-system) > + (guix build utils)) > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'cross-symlinks > + (lambda* (#:key inputs #:allow-other-keys) > + (let* ((target ,(%current-target-system)) > + (tuple > + (match (string-take target (string-index target= #\-)) > + ("armhf" "arm-unknown-linux-gnueabi") > + (x > + (string-append x "-unknown-linux-gnu"))))) Two things: 1. s/tuple/triplet/ 2. The target triplet is actually passed as a keyword argument to phases. So if I=E2=80=99m not mistaken, you can write: (lambda* (#:key target =E2=80=A6) =E2=80=A6) and get rid of the =E2=80=98match=E2=80=99 form above. > + (symlink > + (string-append "lock-obj-pub." tuple ".h") > + "src/syscfg/lock-obj-pub.linux-gnu.h")) If possible, a short comment or a link to some upstream discussion that explains this would be helpful. Could you send an updated patch? Thank you, Ludo=E2=80=99.