From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:51161) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5Ugl-0006Wx-Sj for guix-patches@gnu.org; Wed, 04 Sep 2019 08:47:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5Ugk-0008IW-30 for guix-patches@gnu.org; Wed, 04 Sep 2019 08:47:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52167) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5Ugg-0008Gd-6I for guix-patches@gnu.org; Wed, 04 Sep 2019 08:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i5Ugg-0005B1-22 for guix-patches@gnu.org; Wed, 04 Sep 2019 08:47:02 -0400 Subject: [bug#36477] [PATCH v3 46/48] system: vm: Support cross-compilation. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190902153333.11190-1-m.othacehe@gmail.com> <20190902153333.11190-47-m.othacehe@gmail.com> Date: Wed, 04 Sep 2019 14:46:35 +0200 In-Reply-To: <20190902153333.11190-47-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Mon, 2 Sep 2019 17:33:31 +0200") Message-ID: <878sr444b8.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 Mathieu Othacehe skribis: > * gnu/system.scm (system-linux-image-file-name): Add support for cross-bu= ilt > systems. Remove system argument that was ignored, > (operating-system-kernel-file): adapt by removing ignored os argument. > * gnu/system/vm.scm (expression->derivation-in-linux-vm): Add target argu= ment, > move qemu from inputs list to a new native-inputs list and adapt > set-path-environment-variable call accordingly. Pass target to qemu-comma= nd > and gexp->derivation calls. > (iso9660-image): Move qemu from inputs to a new native-inputs list and ad= apt > set-path-environment-variable accordingly. > (qemu-image): Add target argument, move qemu from inputs list to a new > native-inputs list and adapt set-path-environment-variable call > accordingly. Pass target argument to expression->derivation-in-linux-vm c= all. [...] > (define (operating-system-kernel-file os) > "Return an object representing the absolute file name of the kernel im= age of > OS." > (file-append (operating-system-kernel os) > - "/" (system-linux-image-file-name os))) > + "/" (system-linux-image-file-name))) Uh, passing =E2=80=98os=E2=80=99 to =E2=80=98system-linux-image-file-name= =E2=80=99 never worked, right? [...] > - (let* ((inputs '#$(list qemu (canonical-package coreutils= ))) > + (let* ((inputs '#$(list (canonical-package coreutils))) > + (native-inputs '#+(list qemu)) All these inputs are added to $PATH just after, which shows that we run them natively. Thus, they must all be native. IOW, all we have to do is replace #$ by #+. (Also, make sure to test all this without a qemu-binfmt service set up.) > (let ((inputs > - '#$(append (list qemu parted e2fsprogs dosfstools xorr= iso) > + '#$(append (list parted e2fsprogs dosfstools xorriso) > (map canonical-package > (list sed grep coreutils findutils gaw= k)))) > + (native-inputs '#+(list qemu)) Same here: this is added to $PATH so it must be native. > (let ((inputs > - '#$(append (list qemu parted e2fsprogs dosfstools) > + '#$(append (list util-linux parted e2fsprogs dosfstool= s) > (map canonical-package > (list sed grep coreutils findutils gaw= k)))) > + (native-inputs '#+(list qemu)) Likewise. Thanks, Ludo=E2=80=99.