From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Cross-compilation, Guix "system", and GNU "triplet" Date: Thu, 23 Nov 2017 16:46:23 -0800 Message-ID: <87shd4sduo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eI28Y-0004nx-Qb for guix-devel@gnu.org; Thu, 23 Nov 2017 19:46:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eI28V-0000B0-Lt for guix-devel@gnu.org; Thu, 23 Nov 2017 19:46:34 -0500 Received: from mail-pl0-x229.google.com ([2607:f8b0:400e:c01::229]:42392) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eI28V-0000An-FI for guix-devel@gnu.org; Thu, 23 Nov 2017 19:46:31 -0500 Received: by mail-pl0-x229.google.com with SMTP id z3so3457692plh.9 for ; Thu, 23 Nov 2017 16:46:31 -0800 (PST) Received: from garuda.local (c-24-18-253-84.hsd1.wa.comcast.net. [24.18.253.84]) by smtp.gmail.com with ESMTPSA id g77sm41584327pfd.75.2017.11.23.16.46.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Nov 2017 16:46:27 -0800 (PST) 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" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, As mentioned in bug 29402 [1], Guix uses strings like "armhf-linux" to identify a system platform. However, to cross-compile a package using Guix, you need to specify the target platform's "GNU triplet", which looks like "arm-linux-gnueabihf" (e.g. by invoking "guix build =2D-target=3Darm-linux-gnueabihf hello"). These are not the same thing. OK, so Guix system "armhf-linux" maps to GNU triplet "arm-linux-gnueabihf". Or perhaps a better way to think of this is that Guix system "armhf-linux" refers to a very specific platform choice - and it happens to be the case that that platform can also be identified by the GNU triplet "arm-linux-gnueabihf". What about other ARM variants? When we eventually get Guix running on two variants of ARM, will we just define another special string, like "the-second-arm-linux", to identify its Guix system? My understanding is that multiple GNU triplets can refer to the same platform. For example, I believe "arm-linux-gnueabihf" is the same as "arm-unknown-linux-gnueabihf" because config.sub in Autoconf translates the former to the latter. Do they refer to the same platform? Guix seems to treat them differently: =2D-8<---------------cut here---------------start------------->8--- [0] [env] marusich@garuda.local:~/guix $ ./pre-inst-env guix build --no-substitutes --target=3Darm-linux-gnueabihf= hello /gnu/store/g7cmg23ssqwknpmbbrvap60iv524i9fw-hello-2.10 [0] [env] marusich@garuda.local:~/guix $ ./pre-inst-env guix build --no-substitutes --target=3Darm-unknown-linux-g= nueabihf hello @ build-started /gnu/store/9kk7b46s836n5r0jh0sb00v8p3i5vlhg-gcc-cross-arm-u= nknown-linux-gnueabihf-5.4.0.drv - x86_64-linux /var/log/guix/drvs/9k//k7b4= 6s836n5r0jh0sb00v8p3i5vlhg-gcc-cross-arm-unknown-linux-gnueabihf-5.4.0.drv.= bz2 ... =2D-8<---------------cut here---------------end--------------->8--- As you can see, Guix initiated a build even though the targets are "the same" as far as Autoconf is concerned. Perhaps this is because the strings "arm-linux-gnueabihf" and "arm-unknown-linux-gnueabihf" differ, which causes the derivations' output paths to differ? I don't know, but if that's the case, then it would explain why the second invocation above resulted in a build, even though these two targets refer to the same platform. Finally, I want to ask for some clarification regarding the "GNU triplet" concept in general. Using the language of the section titled "Specifying Target Triplets" in the Autoconf manual, I understand that a GNU triplet takes the following form: `CPU-VENDOR-OS', where OS can be `SYSTEM' or `KERNEL-SYSTEM' It seems to me that "SYSTEM" here always denotes an ABI, such as "gnueabihf". Can SYSTEM ever refer to something that is NOT an ABI? The reason I ask is because in the Autoconf manual, this part of the "triplet" is sometimes referred to as the SYSTEM (in the section mentioned above), and sometimes it is referred to as the OS (in the section titled "System Type"). But it seems to me that it is neither a "system" nor an "os"; it is always an ABI. Am I right? Thank you for taking the time to help me understand! Footnotes:=20 [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D29402 =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAloXa98ACgkQ3UCaFdgi Rp0b7Q//Y0zZx1C2IPSij8iuFc9pN5nFLkrnMolU88/KD5elhIs4S+GUk6Pc6IlH 9cHhX9aQdhpBX+OFHStiDPNft0iKauxLcVfyRNvEifawvuiloKpr8rB0vFD1/RVx S2BFhbVhjEEpywM38T47A+RirJ7VqGZ3llHXIZNurADPdR9U1TfbAJu2ya4Iptud q9hwOXbvFUW4iNfo1SRUAajoECZ2XjMAJQFpwFGXErvFt320LXF9Nq6RrvB+WAd/ 4Itb4sssWnqtm8zUxx9t9rez3HCPLd/kmOgSgN4BLe5rY5hXzKI58BMrXFYqpSbd iU/17RObLyXq7/myE/wIiPD+vvTufotZriTRYY0WqCXyN4LwGrrmJCy2qVjrmCkv DECrfsqHMHvkjKeT/WDfijMFXaY3Xb/IAYc7vMnH/b9x7fOhIFQTdapEU2PdzFxC PXWGxj+T5U30GB3yntlGyOZI7S6nMoyFVkXAhWn3DsI360e8X4WV/wIod6ubepfe EbZiPhRDUYk9ztGxSv2XoDf131vr8bWrQePLxcExHBzHyHXiSbHYHNk0DKcyL0Yl 4tZvA2IVzD+gjBqCZXYmc1NT33NmYRwEINlraP6htxl9y/EJYUBYzobzTlLHeGrD mIRmk2ddwM/NvJS1aCcB/8wTNDCqi090rXJMD6poZ+DXI1RuEZw= =aRxI -----END PGP SIGNATURE----- --=-=-=--