From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sC3lBb8S9mASdwEAgWs5BA (envelope-from ) for ; Tue, 20 Jul 2021 02:03:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QIzTAL8S9mDMCwAA1q6Kng (envelope-from ) for ; Tue, 20 Jul 2021 00:03:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 28DC61D593 for ; Tue, 20 Jul 2021 02:03:10 +0200 (CEST) Received: from localhost ([::1]:33348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5dE5-0004ET-3d for larch@yhetil.org; Mon, 19 Jul 2021 20:03:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5dDy-0004DF-2k for guix-patches@gnu.org; Mon, 19 Jul 2021 20:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5dDx-000453-RC for guix-patches@gnu.org; Mon, 19 Jul 2021 20:03:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m5dDx-0005cH-Oe for guix-patches@gnu.org; Mon, 19 Jul 2021 20:03:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49565] [PATCH core-updates v2] gnu: bootstrap: Use %current-target-system to decide bootstrap path Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Jul 2021 00:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49565 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49565@debbugs.gnu.org Cc: Maxime Devos , Thiago Jung Bauermann Received: via spool by 49565-submit@debbugs.gnu.org id=B49565.162673934821543 (code B ref 49565); Tue, 20 Jul 2021 00:03:01 +0000 Received: (at 49565) by debbugs.gnu.org; 20 Jul 2021 00:02:28 +0000 Received: from localhost ([127.0.0.1]:60609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5dDP-0005bP-9v for submit@debbugs.gnu.org; Mon, 19 Jul 2021 20:02:27 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:23956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5dDK-0005b8-Hm for 49565@debbugs.gnu.org; Mon, 19 Jul 2021 20:02:26 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 516F4700; Tue, 20 Jul 2021 02:02:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1626739330; x=1628553731; bh=pGlnbirxZk7JUJCQvFNYiH09kbSIQ/mmLM+ jPxWPzQc=; b=E35Pn5Fwvf5hrfaUGAb/WAZzCnz4etXD/IfwHDKtwveUKtzcqG1 sZw7Henwy6jvEmNGa9WGlSOjQimHRvhPOBShf3ruTY7bTi7CUkFBzsmh3BPY6MOP /7BDVtNUuX2kOeXi9dY4uLulhXZLYtddgERdqijzrGsuJSoPpLryOV1G1sFagWUd 59bRUtqv/gwVMYolemAsGfdjcnMZ4NRfmAWyVUSOhJzmCmGWyoXjeXWUt6qiorGu zhipcVYHYM9vWgBuR3R6zoqw0HGGnPXH2XgI3/btIuNhN1pTMZkpvcDDL84ABIZS 3T+QY2Q6kWQ7GO+NQowkEkE9/UQsGuYCSlOBb8merRrh+ySTGX0AgKzmugYqUur3 hMM3uFEyiPHOMLmgT6RL/kjS/BUcMiTa2g0zdUeDmEcdDVtyT3kyg5BYWreS2zSY Uxg9/rJ4lOx/ndHxunl4o9MeOvYEEOh6Uku63+GiLbz6h0+4SpqCAxfM3JPps3eu qD3SB0ShYGbfFMxiXo7cinObCZPA96smcAIf7h0kzoHmcBXuwAqjD5LbadvnE7BD 6iKfXDt8neuUkSckq6MvXlbsKjZpv0U33fz7SJkXKR6nWtDJ3TUYS4vtPssTCbMS Ff3dMwm4I6zz8Wwh2OAjmEqF1Jnn22jNic2GQtVCYPhWyFACV3xOkn2s= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iNUzKvw26O7Y; Tue, 20 Jul 2021 02:02:10 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id C47F1206; Tue, 20 Jul 2021 02:02:05 +0200 (CEST) Received: from ext-subm001.mykolab.com (unknown [10.9.6.1]) by int-mx002.mykolab.com (Postfix) with ESMTPS id 5CEA44713; Tue, 20 Jul 2021 02:02:03 +0200 (CEST) Date: Mon, 19 Jul 2021 21:01:33 -0300 Message-Id: <20210720000133.1619640-1-bauermann@kolabnow.com> In-Reply-To: <27e26df84bc02d681b1ff0904bdd63dfa80313bf.camel@telenet.be> References: <27e26df84bc02d681b1ff0904bdd63dfa80313bf.camel@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches From: Thiago Jung Bauermann via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626739390; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pGlnbirxZk7JUJCQvFNYiH09kbSIQ/mmLM+jPxWPzQc=; b=fMbxyLm8zeeoTE+yPaBi1oFJRcZcN5Fxw4g3FBMUjsljzqQsgOAtzMXwCXT7MERS6eaMpr qmZOiM0QEBVJXaMs6/bmANLS5OAZlUxcxjKfvAIK/f1AwySAs1cHMFpmqgtW49IRrQ6SMr 1OiedB9kQ8IdH3Mx3vsCGzd/8BS8r0MRsFaERpAoZW9LgHgnDK/0O278RixRXrv9tjJ3Z/ UQi0zl1TC/TUW0PIxyMpK2tDnN0S01dGJgM3wrYv/UfDeQPmcg9RHq+M5Zs2qyOGfQJ1y0 q1lvA1jkXHFyutTpV/6LzrCG7rD7yxS9fjB62Ot5yDACGAziVLENfnLeb9lwoQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626739390; a=rsa-sha256; cv=none; b=DGU0vrYIwZ6aOGD2OIb9kWdgJXXdkAk71O8IN/7libmv0Oqc/aqk81vyenA9PvpYADWn2K UEZwGGC0pwgdi6+JCG42O7VhdwULz0EESBcPFrOr8QWClrD8I9gHw25yJ7+m1itcJX9/br oYropWvsu44k4e2I+MpvUIcNI7M5zgTV/DlBO4MAtwJUklTLjAagJgK5QZooqXeH3Ru9Fu I3j2y2eZS1OpPTdHDHFJ8kyvcoPX/SEL5s6gVr9TjwN6N9FI3IW5OXa7BtoDkFwDwrKMu9 wbODxwSAzxFQQNWXu+h13WFubJlBq75Vt9O5hkW09lcQiXWIx1o+sN6iMyBcZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=E35Pn5Fw; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=E35Pn5Fw; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 28DC61D593 X-Spam-Score: -2.92 X-Migadu-Scanner: scn1.migadu.com X-TUID: AllDs5m9XxSK When cross-building a non-x86 gcc-toolchain on an x86 machine, ‘%current-target’ has the x86 system value and Guix tries to use the mesboot packages for the bootstrap – which don’t work because they’re currently x86-only. So introduce the ‘current-target-nix-system’ procedure which looks at ‘%current-target-system’ first (converting it to a Nix system string) and use it to decide the bootstrap path. The procedure is factored out from ‘glibc-dynamic-linker’. Also use it in ‘package-from-tarball’, which needs to take the target system into account as well – thanks to Maxime Devos for pointing it out. * gnu/packages/bootstrap.scm (package-from-tarball): Pass result of ‘current-target-nix-system’ to ‘source’ procedure. (glibc-dynamic-linker): Use result of ‘current-target-nix-system’ as default value for ‘system’ argument. (%bootstrap-inputs): Use ‘current-target-nix-system’ to decide whether to use the mesboot path. * gnu/packages/commencement.scm (%bootstrap-inputs+toolchain): Likewise. * guix/utils.scm (current-target-nix-system): Define. --- gnu/packages/bootstrap.scm | 8 +++----- gnu/packages/commencement.scm | 2 +- guix/utils.scm | 7 +++++++ 3 files changed, 11 insertions(+), 6 deletions(-) Hi, This is the new version of this patch. Thank you Maxime Devos for reviewing the previous version and pointing out the change needed in ‘package-from-tarball’. This version makes that change, and also defines a helper function in `(guix utils)` which returns the Nix system identifier for the current target – regardless of whether we are cross-building or not. Before the patch, these are the derivations that Guix tries to build when cross-compiling gcc-toolchain@11. Note the ‘mesboot’ packages: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build --target=powerpc64le-linux-gnu gcc-toolchain@11 substitute: atualizando substitutos de "https://ci.guix.gnu.org"... 100.0% substitute: atualizando substitutos de "https://bordeaux.guix.gnu.org"... 100.0% The following derivations will be built: /gnu/store/3hrzq7fxj0cxgxkjybki2yi7dj70sgg8-gcc-toolchain-11.1.0.drv /gnu/store/2xpiffvzzizrjx48ghqac3rgh1cnljv7-linux-libre-headers-5.10.35.drv /gnu/store/4xlm78m6wl56gn4gpifvy8721amhi81j-binutils-2.36.1.drv /gnu/store/05lnycy4lmn0768r41sgikg795zk9mqg-binutils-cross-boot0-2.36.1.drv /gnu/store/1q62fcaj2gc9mnwvv6cicch6gc7qrnp0-binutils-mesboot-2.20.1a.drv /gnu/store/1yjrfb846y1mnc7mgab38jbv7pv0hgbh-tar-boot0-1.34.drv /gnu/store/9c7a2p899ivz16636prf44q0q61i4376-patch-mesboot-2.5.9.drv /gnu/store/9rmnv55i966wfkx0di4h6p8197hy2836-grep-mesboot-2.0.drv /gnu/store/advn8cgpcf9fi6424l8bs16r5mvfqs04-gcc-mesboot-wrapper-4.9.4.drv /gnu/store/bpghw1m585q2wjc0z4in9w0hcpxgiidw-gzip-mesboot-1.2.4.drv /gnu/store/bx9lr1bg5491dc9i5p2b6zgsq0ahajxb-gcc-mesboot-4.9.4.drv /gnu/store/dfijxa9mnlymzmsl571qlxx0qc65kxzi-tar-mesboot-1.22.drv /gnu/store/hp2f5sw9d189p7z930b63wr8k3j9k6j0-coreutils-mesboot-8.32.drv /gnu/store/i584nxkb39n67vzq5r3yh6spqppzrj43-bzip2-mesboot-1.0.8.drv /gnu/store/j1accym68y6l8pxz8095jpkwgp3ciphi-gawk-mesboot-3.1.8.drv /gnu/store/jlwyxh3k6hvpmy60g0ygwnncq66kn590-gash-utils-boot-0.1.0.drv /gnu/store/9mxvccmf0b8fwq0k7lw0ndsdsbz9y8vn-gash-boot-0.2.0.drv /gnu/store/p43yklj8d615y68jhcvycg9i3k3bqj2g-xz-mesboot-5.0.0.drv /gnu/store/rxn5c166a6p0p3y2hlyk67f91a504kfa-make-mesboot-3.82.drv /gnu/store/sgwdni3iwwrb4ahsnwm43528fzr5csiv-sed-mesboot-4.0.6.drv /gnu/store/xxaccspqlg90v3cxrbvslva6s8gwxzi9-make-boot0-4.3.drv /gnu/store/zghmr1xyw5ip3wpi1qw2ysc7p6i75d54-glibc-mesboot-2.16.0.drv /gnu/store/64cway6pvw5fk7csym2k9i77rhp1pl46-coreutils-boot0-8.32.drv /gnu/store/7hvyky0i1hf3xbd698rr305br881pwz6-diffutils-boot0-3.7.drv /gnu/store/hq1lijdac3vqx811jzsg0wizsbgwgpaa-gawk-boot0-5.1.0.drv /gnu/store/i173n23qpssi7idck4jn7399bfkldlfs-sed-boot0-4.8.drv /gnu/store/l8kbhm6m9rbwkxn7zv1d06wbl2gi88wp-findutils-boot0-4.8.0.drv /gnu/store/pfq7g9jx16jlk3829312h88n0k1jnfns-patch-boot0-2.7.6.drv /gnu/store/qp3yg441ybh6bv44lrcxyp6rzyf0djii-file-boot0-5.39.drv /gnu/store/x4m7lff1ps5mas719815d54x6x1zwcv3-bzip2-boot0-1.0.8.drv /gnu/store/h5hwcnr7z57hb9b8bhhx7s22kfawqr0d-ld-wrapper-boot0-0.drv /gnu/store/v9p5fm974mj4d99vdpp9dhrvpwd4kfgs-glibc-2.33.drv /gnu/store/0kjyjcxzk5mv6zm86x8f18sbsb9m48k8-bash-static-5.1.8.drv /gnu/store/6h220skb9ak8ppv5417i8cbry1byv73a-glibc-intermediate-2.33.drv /gnu/store/rwczga96661d70jcqds8w8pr5s084mh4-gcc-cross-boot0-10.3.0.drv /gnu/store/cglgsds6hxy9swdyymgam9l3rfwizyfr-libstdc++-boot0-4.9.4.drv /gnu/store/c63lqgh0x2rx1az0ds4b2ma9vgiry31j-gcc-11.1.0.drv /gnu/store/f4fwnxsha5h2pk750r2p09cnhbhc3nm3-ld-wrapper-0.drv /gnu/store/605p0jq8wv879n3y6fbqxvaiww1kjaql-libunistring-0.9.10.drv /gnu/store/5irbp0c5zzvs50wlznpfxcxr8mfndwy9-gcc-10.3.0.drv /gnu/store/byfbnlkwj9pjwnkx69fi2ycnqdvz2znv-ld-wrapper-boot3-0.drv /gnu/store/fbm3gv13nggw2qcvxmlccqgi0izzgdwn-libstdc++-10.3.0.drv /gnu/store/vhwmw9p8l3sysqlm8bh14xkfw1afqqcj-zlib-1.2.11.drv /gnu/store/60jiv5k1lg2krj3b0f9x7f26ywrda0mw-bash-minimal-5.1.8.drv /gnu/store/i0lk6zd2vwqqlhn8kkf0529x896lnzr1-guile-3.0.7.drv /gnu/store/r25wjwjbb13yk8yc4bm77dxxcq9qvx9y-libatomic-ops-7.6.10.drv /gnu/store/ry3zxxjsnhpdphvnnr991x9yk7gljxy9-libffi-3.3.drv /gnu/store/y26kx37mkidni8jj4sjn0ryy1wq1pqvs-libgc-8.0.4.drv /gnu/store/v9p5fm974mj4d99vdpp9dhrvpwd4kfgs-glibc-2.33.drv --8<---------------cut here---------------end--------------->8--- These are the derivations built after the patch is applied. Note that there is no ‘mesboot’ package: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build --target=powerpc64le-linux-gnu gcc-toolchain@11 substitute: atualizando substitutos de "https://ci.guix.gnu.org"... 100.0% substitute: atualizando substitutos de "https://bordeaux.guix.gnu.org"... 100.0% The following derivations will be built: /gnu/store/wnllxi9hz868ymmhl9y1izry825azal7-gcc-toolchain-11.1.0.drv /gnu/store/3mzbrsijxql7np8zzgs5z6svl4iw3si8-ld-wrapper-0.drv /gnu/store/2qbrgj46x4ywkl5icxl13iqalzy1y464-libgc-8.0.4.drv /gnu/store/0d3sx0dvn32afifnhsz28yvf9p8shh49-findutils-boot0-4.8.0.drv /gnu/store/c497lf15zqz2xx75idh091sp4i3il5zh-make-boot0-4.3.drv /gnu/store/dnycxgnzfpj1vc8aaxgnb4gj1m8cv2fa-diffutils-boot0-3.7.drv /gnu/store/11z204mvwgimbwifvwd7di76k49kwh1n-tar-boot0-1.34.drv /gnu/store/2ykvg2wms8f5bqgqn0fw28grssmkx43f-libatomic-ops-7.6.10.drv /gnu/store/3lyp33ib5v3zmykgk53m3plmm7n122j0-file-boot0-5.39.drv /gnu/store/4942syn0qn16cg97x27l26rddv5pf297-gawk-boot0-5.1.0.drv /gnu/store/5jzrc7l0yjd3wagbfkgdb29jb7cxl97i-bash-minimal-5.1.8.drv /gnu/store/7ivfiaav5af41jcpij0lg8ig2vhl46cz-patch-boot0-2.7.6.drv /gnu/store/975bjay86c67q0agahxjbalbphd6i2dn-ld-wrapper-boot0-0.drv /gnu/store/gbzc67364szqynv0k8ncgvb4r9v0s8gl-binutils-cross-boot0-2.36.1.drv /gnu/store/aa1pb63rgm7mgmljq4nqxw5dxlgf1x0k-coreutils-boot0-8.32.drv /gnu/store/i33n2m4883668c26kfbcn4r6k5mb6i3q-bzip2-boot0-1.0.8.drv /gnu/store/rdigl19v5302arib6i0ic2nhdl8588yv-sed-boot0-4.8.drv /gnu/store/d407z0m02m85hbrgf6c0bbvbc72v9wp8-gcc-10.3.0.drv /gnu/store/6qy66x2s6izvkiggild5bwi7b1p3i14c-zlib-1.2.11.drv /gnu/store/rfji2zr6yicw3vjcksjzk7zc7hxmh0pa-glibc-2.33.drv /gnu/store/1knbpbymgj1rggdlkdpz2k9i2sh1hjwk-bash-static-5.1.8.drv /gnu/store/05667q3f8yl7fbny1sxkli66rcl8gyrf-glibc-intermediate-2.33.drv /gnu/store/5lmmwvhf8gjzw31a0fv7gkl9zcaj76r6-gcc-cross-boot0-10.3.0.drv /gnu/store/wkmp9i5il6afhrn6d3lkzf7wminx6rax-libstdc++-boot0-4.9.4.drv /gnu/store/b2bjf70ks7f55z1ady9ng34m7iyk8w5a-binutils-2.36.1.drv /gnu/store/dqgshra3sbikll475m95slnyqzkmagsn-libstdc++-10.3.0.drv /gnu/store/fr2q75l4rdymmcy6wdmjc560vn4l7lxi-ld-wrapper-boot3-0.drv /gnu/store/c7i6v0w124ckyvb6pizbg4fqhgwf6gi5-guile-3.0.7.drv /gnu/store/ar81shvadvhzkyq4ygln66gpy7xrvjy4-libffi-3.3.drv /gnu/store/w8p9y4llj6a91blrf574yjns09vbnkbl-libunistring-0.9.10.drv /gnu/store/c63lqgh0x2rx1az0ds4b2ma9vgiry31j-gcc-11.1.0.drv /gnu/store/rfji2zr6yicw3vjcksjzk7zc7hxmh0pa-glibc-2.33.drv --8<---------------cut here---------------end--------------->8--- This is all on today's core-updates branch, at commit: db5962c68099 gnu: ghostscript: Improve reproducibility of PDF document generation diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 5a8028a4652c..d1493e4c7ec7 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -266,7 +266,7 @@ or false to signal an error." (inputs `(("tar" ,(bootstrap-executable "tar" (%current-system))) ("xz" ,(bootstrap-executable "xz" (%current-system))) - ("tarball" ,(bootstrap-origin (source (%current-system)))))) + ("tarball" ,(bootstrap-origin (source (current-target-nix-system)))))) (source #f) (synopsis description) (description description) @@ -299,9 +299,7 @@ or false to signal an error." package-with-bootstrap-guile))))) (define* (glibc-dynamic-linker - #:optional (system (or (and=> (%current-target-system) - gnu-triplet->nix-system) - (%current-system)))) + #:optional (system (current-target-nix-system))) "Return the name of Glibc's dynamic linker for SYSTEM." ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc. (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2") @@ -927,7 +925,7 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \ (define (%bootstrap-inputs) ;; The initial, pre-built inputs. From now on, we can start building our ;; own packages. - (match (%current-system) + (match (current-target-nix-system) ((or "i686-linux" "x86_64-linux") `(("linux-libre-headers" ,%bootstrap-linux-libre-headers) ("bootstrap-mescc-tools" ,%bootstrap-mescc-tools) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index a04bb83c3d2d..030dfad970a7 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -2396,7 +2396,7 @@ exec " gcc "/bin/" program (define (%bootstrap-inputs+toolchain) ;; The traditional bootstrap-inputs. For the i686-linux, x86_64-linux ;; Scheme-only bootstrap the actual reduced set with bootstrapped toolchain. - (match (%current-system) + (match (current-target-nix-system) ((or "i686-linux" "x86_64-linux") (%boot-mesboot6-inputs)) (_ diff --git a/guix/utils.scm b/guix/utils.scm index c5a3a52f9dbc..0d438a00ce00 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -85,6 +85,7 @@ gnu-triplet->nix-system %current-system %current-target-system + current-target-nix-system package-name->name+version target-linux? target-hurd? @@ -630,6 +631,12 @@ returned by `config.guess'." ;; cross-building to. (make-parameter #f)) +(define (current-target-nix-system) + "Return the Nix system identifier for the current target, whether we are +cross-building or not." + (or (and=> (%current-target-system) gnu-triplet->nix-system) + (%current-system))) + (define* (package-name->name+version spec #:optional (delimiter #\@)) "Given SPEC, a package name like \"foo@0.9.1b\", return two values: \"foo\"